diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 07435dd..215d5b7 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 24fc7546-e445-46cb-91d2-49cbb44a86ac management: - docChecksum: 256e7d68eaf807fc9ef86f8311e8a13f + docChecksum: 95abafd64f919da72bea9db4df1fd39f docVersion: "2018-02-08" - speakeasyVersion: 1.447.0 - generationVersion: 2.463.0 - releaseVersion: 5.0.0-beta.9 - configChecksum: 3671fecd164d670575a5fadc76984fa8 + speakeasyVersion: 1.459.2 + generationVersion: 2.483.1 + releaseVersion: 5.0.0-beta.10 + configChecksum: 7dc9f9bcc95976d1774705d3cd4ae64a repoURL: https://github.com/goshippo/shippo-csharp-sdk.git published: true features: csharp: additionalDependencies: 0.1.0 constsAndDefaults: 0.0.1 - core: 3.10.6 + core: 3.10.10 flattening: 2.81.3 globalSecurity: 2.83.6 globalSecurityCallbacks: 0.1.0 @@ -186,7 +186,6 @@ generatedFiles: - Shippo/Models/Components/ParcelInsuranceProvider.cs - Shippo/Models/Components/ParcelPaginatedList.cs - Shippo/Models/Components/ParcelTemplateAramexAustraliaEnum.cs - - Shippo/Models/Components/ParcelTemplateCouriersPleaseEnum.cs - Shippo/Models/Components/ParcelTemplateDHLeCommerceEnum.cs - Shippo/Models/Components/ParcelTemplateDPDUKEnum.cs - Shippo/Models/Components/ParcelTemplateEnumSet.cs @@ -230,7 +229,6 @@ generatedFiles: - Shippo/Models/Components/ServiceLevelChronopostEnum.cs - Shippo/Models/Components/ServiceLevelColissimoEnum.cs - Shippo/Models/Components/ServiceLevelCorreosEspanaEnum.cs - - Shippo/Models/Components/ServiceLevelCouriersPleaseEnum.cs - Shippo/Models/Components/ServiceLevelDHLExpressEnum.cs - Shippo/Models/Components/ServiceLevelDHLGermanyEnum.cs - Shippo/Models/Components/ServiceLevelDHLeCommerceEnum.cs @@ -558,7 +556,6 @@ generatedFiles: - docs/Models/Components/ParcelInsuranceProvider.md - docs/Models/Components/ParcelPaginatedList.md - docs/Models/Components/ParcelTemplateAramexAustraliaEnum.md - - docs/Models/Components/ParcelTemplateCouriersPleaseEnum.md - docs/Models/Components/ParcelTemplateDHLeCommerceEnum.md - docs/Models/Components/ParcelTemplateDPDUKEnum.md - docs/Models/Components/ParcelTemplateEnumSet.md @@ -602,7 +599,6 @@ generatedFiles: - docs/Models/Components/ServiceLevelChronopostEnum.md - docs/Models/Components/ServiceLevelColissimoEnum.md - docs/Models/Components/ServiceLevelCorreosEspanaEnum.md - - docs/Models/Components/ServiceLevelCouriersPleaseEnum.md - docs/Models/Components/ServiceLevelDHLExpressEnum.md - docs/Models/Components/ServiceLevelDHLGermanyEnum.md - docs/Models/Components/ServiceLevelDHLeCommerceEnum.md @@ -843,7 +839,7 @@ examples: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": "d799c2679e644279b59fe661ac8fa489", "customs_declaration": "adcfdddf8ec64b84ad22772bce3ea37a", "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": ["", "", {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "USPS_SmallFlatRateEnvelope"}]}}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [], "non_delivery_option": "RETURN", "test": true}, "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": [{"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "couriersplease_1kg_satchel"}, {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "DHLeC_SM_Flats"}]}}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": "d799c2679e644279b59fe661ac8fa488", "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": "d799c2679e644279b59fe661ac8fa489", "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [{"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}], "non_delivery_option": "RETURN", "test": true}, "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": ["", "", ""]}}] + application/json: [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": "d799c2679e644279b59fe661ac8fa489", "customs_declaration": "adcfdddf8ec64b84ad22772bce3ea37a", "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": ["", "", {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "USPS_SmallFlatRateEnvelope"}]}}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [], "non_delivery_option": "RETURN", "test": true}, "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": ["", {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "DHLeC_SM_Flats"}]}}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": "d799c2679e644279b59fe661ac8fa488", "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": "d799c2679e644279b59fe661ac8fa489", "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [{"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}], "non_delivery_option": "RETURN", "test": true}, "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": ["", "", ""]}}] responses: "200": application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": []}, "label_url": ["", ""], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} @@ -1458,4 +1454,13 @@ examples: parameters: path: webhookId: "" + batch: {} + track: + speakeasy-default-track: + requestBody: + application/json: {"data": {"address_from": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "address_to": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "carrier": "usps", "messages": [""], "metadata": "Order 000123", "original_eta": "2021-07-23T00:00:00Z", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "tracking_history": [{"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2023-07-25T17:47:12.180Z", "object_id": "", "object_updated": "2023-02-21T22:35:19.645Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}], "tracking_number": "9205590164917312751089", "tracking_status": {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2024-05-20T11:37:56.914Z", "object_id": "", "object_updated": "2023-06-07T16:48:30.895Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}}} + transaction: + speakeasy-default-transaction: + requestBody: + application/json: {"data": {"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": {"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "provider": "USPS", "carrier_account": "078870331023437cb917f5187429b093", "servicelevel_name": "Priority Mail", "servicelevel_token": "fedex_ground"}, "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"}} generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a954293..541c7b8 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false csharp: - version: 5.0.0-beta.9 + version: 5.0.0-beta.10 additionalDependencies: [] author: Shippo clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 2ef0d2d..892a948 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.447.0 +speakeasyVersion: 1.459.2 sources: openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:33370e133d3ed110a28d8f54ab74952099de562bdc22dc5386cb760f0fe01b2d - sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5 + sourceRevisionDigest: sha256:2fff240d749b54e310180850573addb6dc76b773500099dd5733050589813766 + sourceBlobDigest: sha256:cd9da3407a166b3f3649622b362cd9710086eee23be01fef701736f0c030f6ed tags: - latest - - speakeasy-sdk-regen-1732636811 + - speakeasy-sdk-regen-1733098817 - "2018-02-08" targets: csharp: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:33370e133d3ed110a28d8f54ab74952099de562bdc22dc5386cb760f0fe01b2d - sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5 - codeSamplesNamespace: openapi-code-samples - codeSamplesRevisionDigest: sha256:647654e9271aa56042482d39883ea26ee4daadfc87152727f13dfbf47db42237 + sourceRevisionDigest: sha256:2fff240d749b54e310180850573addb6dc76b773500099dd5733050589813766 + sourceBlobDigest: sha256:cd9da3407a166b3f3649622b362cd9710086eee23be01fef701736f0c030f6ed + codeSamplesNamespace: openapi-csharp-code-samples + codeSamplesRevisionDigest: sha256:07dc36953b1ecd672b9175c578e955dd31a9eaa8199c9f84295ee575ebe374fb workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -34,5 +34,5 @@ workflow: apiKey: $nuget_api_key codeSamples: registry: - location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples + location: registry.speakeasyapi.dev/shippo/shippo/openapi-csharp-code-samples blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 52cd929..1721ab9 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -15,5 +15,5 @@ targets: apiKey: $nuget_api_key codeSamples: registry: - location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples + location: registry.speakeasyapi.dev/shippo/shippo/openapi-csharp-code-samples blocking: false diff --git a/NUGET.md b/NUGET.md index 38bdfc8..f2cb6f3 100644 --- a/NUGET.md +++ b/NUGET.md @@ -8,7 +8,32 @@ ```csharp using Shippo; -using Shippo.Models.Requests; +using Shippo.Models.Components; + +var sdk = new ShippoSDK(shippoApiVersion: "2018-02-08"); + +WebhookPayloadBatch req = new WebhookPayloadBatch() {}; + +await sdk.BatchAsync(req); + +// handle response +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| -------------- | ------ | ------- | +| `APIKeyHeader` | apiKey | API key | + +To authenticate with the API the `APIKeyHeader` parameter must be set when initializing the SDK client instance. For example: +```csharp +using Shippo; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -24,7 +49,7 @@ var res = await sdk.Addresses.ListAsync( // handle response ``` - + ## Error Handling @@ -53,10 +78,9 @@ When custom error responses are specified for an operation, the SDK may also thr ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; -using System; using Shippo.Models.Errors; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -108,7 +132,6 @@ catch (Exception ex) The default server can also be overridden globally by passing a URL to the `serverUrl: string` optional parameter when initializing the SDK client instance. For example: ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -127,36 +150,4 @@ var res = await sdk.Addresses.ListAsync( ``` - -## Authentication - -### Per-Client Security Schemes - -This SDK supports the following security scheme globally: - -| Name | Type | Scheme | -| -------------- | ------ | ------- | -| `APIKeyHeader` | apiKey | API key | - -To authenticate with the API the `APIKeyHeader` parameter must be set when initializing the SDK client instance. For example: -```csharp -using Shippo; -using Shippo.Models.Requests; -using Shippo.Models.Components; - -var sdk = new ShippoSDK( - apiKeyHeader: "", - shippoApiVersion: "2018-02-08" -); - -var res = await sdk.Addresses.ListAsync( - page: 1, - results: 5, - shippoApiVersion: "2018-02-08" -); - -// handle response -``` - - \ No newline at end of file diff --git a/README.md b/README.md index e8ea2b3..59556df 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,17 @@ Shippo external API.: Use this API to integrate with the Shippo service ## Table of Contents + +* [Shippo logo Shippo C# SDK](#img-srchttpsdocsgoshippocomimageslogopng-width30-altshippo-logo-shippo-c-sdk) + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Custom HTTP Client](#custom-http-client) + * [Documentation](#documentation) + * [Available Resources and Operations](#available-resources-and-operations) +* [Development](#development) + * [Contributions](#contributions) + * [About Shippo](#about-shippo) -* [SDK Installation](#sdk-installation) -* [SDK Example Usage](#sdk-example-usage) -* [Available Resources and Operations](#available-resources-and-operations) -* [Error Handling](#error-handling) -* [Server Selection](#server-selection) -* [Authentication](#authentication) @@ -55,19 +59,13 @@ dotnet add reference Shippo/Shippo.csproj ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; -var sdk = new ShippoSDK( - apiKeyHeader: "", - shippoApiVersion: "2018-02-08" -); +var sdk = new ShippoSDK(shippoApiVersion: "2018-02-08"); -var res = await sdk.Addresses.ListAsync( - page: 1, - results: 5, - shippoApiVersion: "2018-02-08" -); +WebhookPayloadBatch req = new WebhookPayloadBatch() {}; + +await sdk.BatchAsync(req); // handle response ``` diff --git a/RELEASES.md b/RELEASES.md index 0e39aac..6af0c72 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -108,4 +108,14 @@ Based on: ### Generated - [csharp v5.0.0-beta.9] . ### Releases -- [NuGet v5.0.0-beta.9] https://www.nuget.org/packages/Shippo/5.0.0-beta.9 - . \ No newline at end of file +- [NuGet v5.0.0-beta.9] https://www.nuget.org/packages/Shippo/5.0.0-beta.9 - . + +## 2024-12-23 00:18:40 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v5.0.0-beta.10] . +### Releases +- [NuGet v5.0.0-beta.10] https://www.nuget.org/packages/Shippo/5.0.0-beta.10 - . \ No newline at end of file diff --git a/Shippo/Addresses.cs b/Shippo/Addresses.cs index 4683c83..ca24dba 100644 --- a/Shippo/Addresses.cs +++ b/Shippo/Addresses.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Addresses are the locations a parcel is being shipped **from** and **to**. They represent company and residential places. Among other things, you can use address objects to create shipments, calculate shipping rates, and purchase shipping labels.
@@ -80,10 +80,10 @@ public class Addresses: IAddresses { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Batches.cs b/Shippo/Batches.cs index 62ddd0c..9587676 100644 --- a/Shippo/Batches.cs +++ b/Shippo/Batches.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A batch is a technique for creating multiple labels at once. Use the batch object to create and purchase many shipments in two API calls. After creating the batch, retrieve the batch to verify that all shipments are valid. You can add and remove shipments after you have created the batch. When all shipments are valid you can purchase the batch and retrieve all the shipping labels.
@@ -111,10 +111,10 @@ public class Batches: IBatches { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/CarrierAccounts.cs b/Shippo/CarrierAccounts.cs index c90f8ca..6363b63 100644 --- a/Shippo/CarrierAccounts.cs +++ b/Shippo/CarrierAccounts.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Carriers are the companies who deliver your package. Shippo uses Carrier account objects as credentials to retrieve shipping rates and purchase labels from shipping Carriers.
@@ -113,10 +113,10 @@ public class CarrierAccounts: ICarrierAccounts { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/CarrierParcelTemplates.cs b/Shippo/CarrierParcelTemplates.cs index ff60796..a247215 100644 --- a/Shippo/CarrierParcelTemplates.cs +++ b/Shippo/CarrierParcelTemplates.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A carrier parcel template represents a package used for shipping that has preset dimensions defined by a carrier. Some examples of a carrier parcel template include USPS Flat Rate Box and Fedex Small Pak. When using a carrier parcel template, the rates returned may be limited to the carrier that provides the box. You can create user parcel templates using a carrier parcel template. Shippo takes the dimensions of the carrier parcel template but you must configure the weight.
@@ -70,10 +70,10 @@ public class CarrierParcelTemplates: ICarrierParcelTemplates { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/CustomsDeclarations.cs b/Shippo/CustomsDeclarations.cs index 35f3899..4e8592c 100644 --- a/Shippo/CustomsDeclarations.cs +++ b/Shippo/CustomsDeclarations.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Customs declarations are relevant information, including one or multiple customs items, you need to provide for
@@ -73,10 +73,10 @@ public class CustomsDeclarations: ICustomsDeclarations { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/CustomsItems.cs b/Shippo/CustomsItems.cs index 772cd59..bd6708d 100644 --- a/Shippo/CustomsItems.cs +++ b/Shippo/CustomsItems.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments.
@@ -71,10 +71,10 @@ public class CustomsItems: ICustomsItems { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Manifests.cs b/Shippo/Manifests.cs index 687ff5e..efca02d 100644 --- a/Shippo/Manifests.cs +++ b/Shippo/Manifests.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A manifest is a single-page document with a barcode that carriers can scan to accept all packages into transit without the need to scan each item individually.
@@ -83,10 +83,10 @@ public class Manifests: IManifests { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Models/Components/AddressFrom.cs b/Shippo/Models/Components/AddressFrom.cs index 91fdfdb..a6edcf5 100644 --- a/Shippo/Models/Components/AddressFrom.cs +++ b/Shippo/Models/Components/AddressFrom.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class AddressFromType diff --git a/Shippo/Models/Components/AddressReturn.cs b/Shippo/Models/Components/AddressReturn.cs index aa5232c..4342ee3 100644 --- a/Shippo/Models/Components/AddressReturn.cs +++ b/Shippo/Models/Components/AddressReturn.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class AddressReturnType diff --git a/Shippo/Models/Components/AddressTo.cs b/Shippo/Models/Components/AddressTo.cs index 31d59f4..e2fbfa1 100644 --- a/Shippo/Models/Components/AddressTo.cs +++ b/Shippo/Models/Components/AddressTo.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class AddressToType diff --git a/Shippo/Models/Components/CarrierAccountBaseParameters.cs b/Shippo/Models/Components/CarrierAccountBaseParameters.cs index 545ebd3..000005a 100644 --- a/Shippo/Models/Components/CarrierAccountBaseParameters.cs +++ b/Shippo/Models/Components/CarrierAccountBaseParameters.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class CarrierAccountBaseParametersType diff --git a/Shippo/Models/Components/CarrierAccountParameters.cs b/Shippo/Models/Components/CarrierAccountParameters.cs index 8647aef..db119b4 100644 --- a/Shippo/Models/Components/CarrierAccountParameters.cs +++ b/Shippo/Models/Components/CarrierAccountParameters.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class CarrierAccountParametersType diff --git a/Shippo/Models/Components/CarriersEnum.cs b/Shippo/Models/Components/CarriersEnum.cs index e902fd5..a240634 100644 --- a/Shippo/Models/Components/CarriersEnum.cs +++ b/Shippo/Models/Components/CarriersEnum.cs @@ -35,7 +35,6 @@ namespace Shippo.Models.Components /// | collect_plus | CollectPlus|
/// | correios_br | CorreiosBR|
/// | correos_espana | Correos España |
- /// | couriersplease | Couriers Please|
/// | colissimo | Colissimo|
/// | deutsche_post | Deutsche Post|
/// | dhl_benelux | DHL Benelux|
@@ -61,7 +60,6 @@ namespace Shippo.Models.Components /// | new_zealand_post | New Zealand Post (also used for Pace and CourierPost)|
/// | nippon_express | Nippon Express|
/// | ontrac | OnTrac|
- /// | orangeds | OrangeDS|
/// | parcelforce | Parcelforce|
/// | passport | Passport|
/// | pcf | PCF|
@@ -118,8 +116,6 @@ public enum CarriersEnum CorreiosBr, [JsonProperty("correos_espana")] CorreosEspana, - [JsonProperty("couriersplease")] - Couriersplease, [JsonProperty("colissimo")] Colissimo, [JsonProperty("deutsche_post")] @@ -170,8 +166,6 @@ public enum CarriersEnum NipponExpress, [JsonProperty("ontrac")] Ontrac, - [JsonProperty("orangeds")] - Orangeds, [JsonProperty("parcelforce")] Parcelforce, [JsonProperty("passport")] diff --git a/Shippo/Models/Components/ConnectExistingOwnAccountRequestParameters.cs b/Shippo/Models/Components/ConnectExistingOwnAccountRequestParameters.cs index 6ce9505..5b1b97c 100644 --- a/Shippo/Models/Components/ConnectExistingOwnAccountRequestParameters.cs +++ b/Shippo/Models/Components/ConnectExistingOwnAccountRequestParameters.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ConnectExistingOwnAccountRequestParametersType diff --git a/Shippo/Models/Components/CustomsDeclaration.cs b/Shippo/Models/Components/CustomsDeclaration.cs index 100cc5f..4f73f9d 100644 --- a/Shippo/Models/Components/CustomsDeclaration.cs +++ b/Shippo/Models/Components/CustomsDeclaration.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; public class CustomsDeclaration { diff --git a/Shippo/Models/Components/Latitude.cs b/Shippo/Models/Components/Latitude.cs index 5198192..6f18299 100644 --- a/Shippo/Models/Components/Latitude.cs +++ b/Shippo/Models/Components/Latitude.cs @@ -9,13 +9,13 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class LatitudeType diff --git a/Shippo/Models/Components/LiveRateCreateRequestAddressFrom.cs b/Shippo/Models/Components/LiveRateCreateRequestAddressFrom.cs index 3b9da6e..8a0c44f 100644 --- a/Shippo/Models/Components/LiveRateCreateRequestAddressFrom.cs +++ b/Shippo/Models/Components/LiveRateCreateRequestAddressFrom.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class LiveRateCreateRequestAddressFromType diff --git a/Shippo/Models/Components/LiveRateCreateRequestAddressTo.cs b/Shippo/Models/Components/LiveRateCreateRequestAddressTo.cs index 26e6ca1..a6ffb88 100644 --- a/Shippo/Models/Components/LiveRateCreateRequestAddressTo.cs +++ b/Shippo/Models/Components/LiveRateCreateRequestAddressTo.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class LiveRateCreateRequestAddressToType diff --git a/Shippo/Models/Components/LiveRateCreateRequestParcel.cs b/Shippo/Models/Components/LiveRateCreateRequestParcel.cs index aa6eb23..0c0d3e8 100644 --- a/Shippo/Models/Components/LiveRateCreateRequestParcel.cs +++ b/Shippo/Models/Components/LiveRateCreateRequestParcel.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class LiveRateCreateRequestParcelType diff --git a/Shippo/Models/Components/Longitude.cs b/Shippo/Models/Components/Longitude.cs index cd24376..e5e6cc1 100644 --- a/Shippo/Models/Components/Longitude.cs +++ b/Shippo/Models/Components/Longitude.cs @@ -9,13 +9,13 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class LongitudeType diff --git a/Shippo/Models/Components/Manifest.cs b/Shippo/Models/Components/Manifest.cs index 270735d..28056aa 100644 --- a/Shippo/Models/Components/Manifest.cs +++ b/Shippo/Models/Components/Manifest.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; public class Manifest { diff --git a/Shippo/Models/Components/ManifestCreateRequestAddressFrom.cs b/Shippo/Models/Components/ManifestCreateRequestAddressFrom.cs index 3535d8e..679c630 100644 --- a/Shippo/Models/Components/ManifestCreateRequestAddressFrom.cs +++ b/Shippo/Models/Components/ManifestCreateRequestAddressFrom.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ManifestCreateRequestAddressFromType diff --git a/Shippo/Models/Components/Parameters.cs b/Shippo/Models/Components/Parameters.cs index 3c2201e..01f5a72 100644 --- a/Shippo/Models/Components/Parameters.cs +++ b/Shippo/Models/Components/Parameters.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ParametersType diff --git a/Shippo/Models/Components/ParcelTemplateCouriersPleaseEnum.cs b/Shippo/Models/Components/ParcelTemplateCouriersPleaseEnum.cs deleted file mode 100644 index e2079d6..0000000 --- a/Shippo/Models/Components/ParcelTemplateCouriersPleaseEnum.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Shippo.Models.Components -{ - using Newtonsoft.Json; - using Shippo.Utils; - using System; - - /// - /// |Token | Name | Dimensions|
- /// - /// - /// |:---|:---|:---|
- /// | couriersplease_500g_satchel | 500g Satchel | 22.00 x 33.50 x 0.10 cm|
- /// | couriersplease_1kg_satchel | 1kg Satchel | 28.00 x 35.00 x 0.10 cm|
- /// | couriersplease_3kg_satchel | 3kg Satchel | 34.00 x 42.00 x 0.10 cm|
- /// | couriersplease_5kg_satchel | 5kg Satchel | 43.70 x 59.70 x 0.10 cm|
- /// - ///
- ///
- public enum ParcelTemplateCouriersPleaseEnum - { - [JsonProperty("couriersplease_500g_satchel")] - Couriersplease500gSatchel, - [JsonProperty("couriersplease_1kg_satchel")] - Couriersplease1kgSatchel, - [JsonProperty("couriersplease_3kg_satchel")] - Couriersplease3kgSatchel, - [JsonProperty("couriersplease_5kg_satchel")] - Couriersplease5kgSatchel, - } - - public static class ParcelTemplateCouriersPleaseEnumExtension - { - public static string Value(this ParcelTemplateCouriersPleaseEnum value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static ParcelTemplateCouriersPleaseEnum ToEnum(this string value) - { - foreach(var field in typeof(ParcelTemplateCouriersPleaseEnum).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is ParcelTemplateCouriersPleaseEnum) - { - return (ParcelTemplateCouriersPleaseEnum)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum ParcelTemplateCouriersPleaseEnum"); - } - } - -} \ No newline at end of file diff --git a/Shippo/Models/Components/ParcelTemplateEnumSet.cs b/Shippo/Models/Components/ParcelTemplateEnumSet.cs index 64e6e36..941717c 100644 --- a/Shippo/Models/Components/ParcelTemplateEnumSet.cs +++ b/Shippo/Models/Components/ParcelTemplateEnumSet.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ParcelTemplateEnumSetType @@ -34,8 +34,6 @@ public class ParcelTemplateEnumSetType public static ParcelTemplateEnumSetType ParcelTemplateDPDUKEnum { get { return new ParcelTemplateEnumSetType("ParcelTemplateDPDUKEnum"); } } - public static ParcelTemplateEnumSetType ParcelTemplateCouriersPleaseEnum { get { return new ParcelTemplateEnumSetType("ParcelTemplateCouriersPleaseEnum"); } } - public static ParcelTemplateEnumSetType ParcelTemplateAramexAustraliaEnum { get { return new ParcelTemplateEnumSetType("ParcelTemplateAramexAustraliaEnum"); } } public static ParcelTemplateEnumSetType Null { get { return new ParcelTemplateEnumSetType("null"); } } @@ -49,7 +47,6 @@ public static ParcelTemplateEnumSetType FromString(string v) { case "ParcelTemplateUSPSEnum": return ParcelTemplateUSPSEnum; case "ParcelTemplateDHLeCommerceEnum": return ParcelTemplateDHLeCommerceEnum; case "ParcelTemplateDPDUKEnum": return ParcelTemplateDPDUKEnum; - case "ParcelTemplateCouriersPleaseEnum": return ParcelTemplateCouriersPleaseEnum; case "ParcelTemplateAramexAustraliaEnum": return ParcelTemplateAramexAustraliaEnum; case "null": return Null; default: throw new ArgumentException("Invalid value for ParcelTemplateEnumSetType"); @@ -95,9 +92,6 @@ public ParcelTemplateEnumSet(ParcelTemplateEnumSetType type) { [SpeakeasyMetadata("form:explode=true")] public ParcelTemplateDPDUKEnum? ParcelTemplateDPDUKEnum { get; set; } - [SpeakeasyMetadata("form:explode=true")] - public ParcelTemplateCouriersPleaseEnum? ParcelTemplateCouriersPleaseEnum { get; set; } - [SpeakeasyMetadata("form:explode=true")] public ParcelTemplateAramexAustraliaEnum? ParcelTemplateAramexAustraliaEnum { get; set; } @@ -144,14 +138,6 @@ public static ParcelTemplateEnumSet CreateParcelTemplateDPDUKEnum(ParcelTemplate return res; } - public static ParcelTemplateEnumSet CreateParcelTemplateCouriersPleaseEnum(ParcelTemplateCouriersPleaseEnum parcelTemplateCouriersPleaseEnum) { - ParcelTemplateEnumSetType typ = ParcelTemplateEnumSetType.ParcelTemplateCouriersPleaseEnum; - - ParcelTemplateEnumSet res = new ParcelTemplateEnumSet(typ); - res.ParcelTemplateCouriersPleaseEnum = parcelTemplateCouriersPleaseEnum; - return res; - } - public static ParcelTemplateEnumSet CreateParcelTemplateAramexAustraliaEnum(ParcelTemplateAramexAustraliaEnum parcelTemplateAramexAustraliaEnum) { ParcelTemplateEnumSetType typ = ParcelTemplateEnumSetType.ParcelTemplateAramexAustraliaEnum; @@ -282,26 +268,6 @@ public class ParcelTemplateEnumSetConverter : JsonConverter throw; } - try - { - return new ParcelTemplateEnumSet(ParcelTemplateEnumSetType.ParcelTemplateCouriersPleaseEnum) - { - ParcelTemplateCouriersPleaseEnum = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember(json) - }; - } - catch (ResponseBodyDeserializer.MissingMemberException) - { - fallbackCandidates.Add((typeof(ParcelTemplateCouriersPleaseEnum), new ParcelTemplateEnumSet(ParcelTemplateEnumSetType.ParcelTemplateCouriersPleaseEnum), "ParcelTemplateCouriersPleaseEnum")); - } - catch (ResponseBodyDeserializer.DeserializationException) - { - // try next option - } - catch (Exception) - { - throw; - } - try { return new ParcelTemplateEnumSet(ParcelTemplateEnumSetType.ParcelTemplateAramexAustraliaEnum) @@ -382,11 +348,6 @@ public override void WriteJson(JsonWriter writer, object? value, JsonSerializer writer.WriteRawValue(Utilities.SerializeJSON(res.ParcelTemplateDPDUKEnum)); return; } - if (res.ParcelTemplateCouriersPleaseEnum != null) - { - writer.WriteRawValue(Utilities.SerializeJSON(res.ParcelTemplateCouriersPleaseEnum)); - return; - } if (res.ParcelTemplateAramexAustraliaEnum != null) { writer.WriteRawValue(Utilities.SerializeJSON(res.ParcelTemplateAramexAustraliaEnum)); diff --git a/Shippo/Models/Components/Parcels.cs b/Shippo/Models/Components/Parcels.cs index 40a117d..2ea874b 100644 --- a/Shippo/Models/Components/Parcels.cs +++ b/Shippo/Models/Components/Parcels.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ParcelsType diff --git a/Shippo/Models/Components/Pickup.cs b/Shippo/Models/Components/Pickup.cs index d74fe6a..1dcb9f2 100644 --- a/Shippo/Models/Components/Pickup.cs +++ b/Shippo/Models/Components/Pickup.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; public class Pickup { diff --git a/Shippo/Models/Components/PickupBase.cs b/Shippo/Models/Components/PickupBase.cs index c0b3097..6991631 100644 --- a/Shippo/Models/Components/PickupBase.cs +++ b/Shippo/Models/Components/PickupBase.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; public class PickupBase { diff --git a/Shippo/Models/Components/Rate.cs b/Shippo/Models/Components/Rate.cs index f7e9dae..d7ee7d1 100644 --- a/Shippo/Models/Components/Rate.cs +++ b/Shippo/Models/Components/Rate.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; public class Rate { diff --git a/Shippo/Models/Components/ReturnServiceType.cs b/Shippo/Models/Components/ReturnServiceType.cs index 93726f7..968d5a9 100644 --- a/Shippo/Models/Components/ReturnServiceType.cs +++ b/Shippo/Models/Components/ReturnServiceType.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ReturnServiceTypeType diff --git a/Shippo/Models/Components/ServiceLevelCouriersPleaseEnum.cs b/Shippo/Models/Components/ServiceLevelCouriersPleaseEnum.cs deleted file mode 100644 index 904d5c0..0000000 --- a/Shippo/Models/Components/ServiceLevelCouriersPleaseEnum.cs +++ /dev/null @@ -1,94 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Shippo.Models.Components -{ - using Newtonsoft.Json; - using Shippo.Utils; - using System; - - /// - /// |Token | Service name|
- /// - /// - /// |:---|:---|
- /// | couriersplease_domestic_priority_auth_to_leave | Domestic Priority - Authority To Leave/POPPoints|
- /// | couriersplease_domestic_priority_sign_required | Domestic Priority - Signature Required|
- /// | couriersplease_gold_domestic_auth_to_leave | Gold Domestic - Authority To Leave/POPPoints|
- /// | couriersplease_gold_domestic_sign_required | Gold Domestic - Signature Required|
- /// | couriersplease_off_peak_auth_to_leave | Off Peak - Authority To Leave/POPPoints|
- /// | couriersplease_off_peak_sign_required | Off Peak - Signature Required|
- /// | couriersplease_parcel_auth_to_leave | Parcel - Authority To Leave|
- /// | couriersplease_parcel_sign_required | Parcel - Signature Required|
- /// | couriersplease_road_express | Road Express|
- /// | couriersplease_satchel_auth_to_leave | Satchel - Authority To Leave|
- /// | couriersplease_satchel_sign_required | Satchel - Signature Required|
- /// - ///
- ///
- public enum ServiceLevelCouriersPleaseEnum - { - [JsonProperty("couriersplease_domestic_priority_auth_to_leave")] - CourierspleaseDomesticPriorityAuthToLeave, - [JsonProperty("couriersplease_domestic_priority_sign_required")] - CourierspleaseDomesticPrioritySignRequired, - [JsonProperty("couriersplease_gold_domestic_auth_to_leave")] - CourierspleaseGoldDomesticAuthToLeave, - [JsonProperty("couriersplease_gold_domestic_sign_required")] - CourierspleaseGoldDomesticSignRequired, - [JsonProperty("couriersplease_off_peak_auth_to_leave")] - CourierspleaseOffPeakAuthToLeave, - [JsonProperty("couriersplease_off_peak_sign_required")] - CourierspleaseOffPeakSignRequired, - [JsonProperty("couriersplease_parcel_auth_to_leave")] - CourierspleaseParcelAuthToLeave, - [JsonProperty("couriersplease_parcel_sign_required")] - CourierspleaseParcelSignRequired, - [JsonProperty("couriersplease_road_express")] - CourierspleaseRoadExpress, - [JsonProperty("couriersplease_satchel_auth_to_leave")] - CourierspleaseSatchelAuthToLeave, - [JsonProperty("couriersplease_satchel_sign_required")] - CourierspleaseSatchelSignRequired, - } - - public static class ServiceLevelCouriersPleaseEnumExtension - { - public static string Value(this ServiceLevelCouriersPleaseEnum value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static ServiceLevelCouriersPleaseEnum ToEnum(this string value) - { - foreach(var field in typeof(ServiceLevelCouriersPleaseEnum).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is ServiceLevelCouriersPleaseEnum) - { - return (ServiceLevelCouriersPleaseEnum)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum ServiceLevelCouriersPleaseEnum"); - } - } - -} \ No newline at end of file diff --git a/Shippo/Models/Components/ServiceLevelEnumSet.cs b/Shippo/Models/Components/ServiceLevelEnumSet.cs index ec0d0e9..e27c5c5 100644 --- a/Shippo/Models/Components/ServiceLevelEnumSet.cs +++ b/Shippo/Models/Components/ServiceLevelEnumSet.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ServiceLevelEnumSetType @@ -48,8 +48,6 @@ public class ServiceLevelEnumSetType public static ServiceLevelEnumSetType ServiceLevelChronopostEnum { get { return new ServiceLevelEnumSetType("ServiceLevelChronopostEnum"); } } - public static ServiceLevelEnumSetType ServiceLevelCouriersPleaseEnum { get { return new ServiceLevelEnumSetType("ServiceLevelCouriersPleaseEnum"); } } - public static ServiceLevelEnumSetType ServiceLevelCorreosEspanaEnum { get { return new ServiceLevelEnumSetType("ServiceLevelCorreosEspanaEnum"); } } public static ServiceLevelEnumSetType ServiceLevelColissimoEnum { get { return new ServiceLevelEnumSetType("ServiceLevelColissimoEnum"); } } @@ -120,7 +118,6 @@ public static ServiceLevelEnumSetType FromString(string v) { case "ServiceLevelCanadaPostEnum": return ServiceLevelCanadaPostEnum; case "ServiceLevelCDLEnum": return ServiceLevelCDLEnum; case "ServiceLevelChronopostEnum": return ServiceLevelChronopostEnum; - case "ServiceLevelCouriersPleaseEnum": return ServiceLevelCouriersPleaseEnum; case "ServiceLevelCorreosEspanaEnum": return ServiceLevelCorreosEspanaEnum; case "ServiceLevelColissimoEnum": return ServiceLevelColissimoEnum; case "ServiceLevelPurolatorEnum": return ServiceLevelPurolatorEnum; @@ -209,9 +206,6 @@ public ServiceLevelEnumSet(ServiceLevelEnumSetType type) { [SpeakeasyMetadata("form:explode=true")] public ServiceLevelChronopostEnum? ServiceLevelChronopostEnum { get; set; } - [SpeakeasyMetadata("form:explode=true")] - public ServiceLevelCouriersPleaseEnum? ServiceLevelCouriersPleaseEnum { get; set; } - [SpeakeasyMetadata("form:explode=true")] public ServiceLevelCorreosEspanaEnum? ServiceLevelCorreosEspanaEnum { get; set; } @@ -389,14 +383,6 @@ public static ServiceLevelEnumSet CreateServiceLevelChronopostEnum(ServiceLevelC return res; } - public static ServiceLevelEnumSet CreateServiceLevelCouriersPleaseEnum(ServiceLevelCouriersPleaseEnum serviceLevelCouriersPleaseEnum) { - ServiceLevelEnumSetType typ = ServiceLevelEnumSetType.ServiceLevelCouriersPleaseEnum; - - ServiceLevelEnumSet res = new ServiceLevelEnumSet(typ); - res.ServiceLevelCouriersPleaseEnum = serviceLevelCouriersPleaseEnum; - return res; - } - public static ServiceLevelEnumSet CreateServiceLevelCorreosEspanaEnum(ServiceLevelCorreosEspanaEnum serviceLevelCorreosEspanaEnum) { ServiceLevelEnumSetType typ = ServiceLevelEnumSetType.ServiceLevelCorreosEspanaEnum; @@ -867,26 +853,6 @@ public class ServiceLevelEnumSetConverter : JsonConverter throw; } - try - { - return new ServiceLevelEnumSet(ServiceLevelEnumSetType.ServiceLevelCouriersPleaseEnum) - { - ServiceLevelCouriersPleaseEnum = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember(json) - }; - } - catch (ResponseBodyDeserializer.MissingMemberException) - { - fallbackCandidates.Add((typeof(ServiceLevelCouriersPleaseEnum), new ServiceLevelEnumSet(ServiceLevelEnumSetType.ServiceLevelCouriersPleaseEnum), "ServiceLevelCouriersPleaseEnum")); - } - catch (ResponseBodyDeserializer.DeserializationException) - { - // try next option - } - catch (Exception) - { - throw; - } - try { return new ServiceLevelEnumSet(ServiceLevelEnumSetType.ServiceLevelCorreosEspanaEnum) @@ -1502,11 +1468,6 @@ public override void WriteJson(JsonWriter writer, object? value, JsonSerializer writer.WriteRawValue(Utilities.SerializeJSON(res.ServiceLevelChronopostEnum)); return; } - if (res.ServiceLevelCouriersPleaseEnum != null) - { - writer.WriteRawValue(Utilities.SerializeJSON(res.ServiceLevelCouriersPleaseEnum)); - return; - } if (res.ServiceLevelCorreosEspanaEnum != null) { writer.WriteRawValue(Utilities.SerializeJSON(res.ServiceLevelCorreosEspanaEnum)); diff --git a/Shippo/Models/Components/Shipment.cs b/Shippo/Models/Components/Shipment.cs index f37b994..8eeb405 100644 --- a/Shippo/Models/Components/Shipment.cs +++ b/Shippo/Models/Components/Shipment.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; /// /// Shipment represents the parcel as retrieved from the database diff --git a/Shippo/Models/Components/ShipmentCreateRequestCustomsDeclaration.cs b/Shippo/Models/Components/ShipmentCreateRequestCustomsDeclaration.cs index aab8dae..a40da06 100644 --- a/Shippo/Models/Components/ShipmentCreateRequestCustomsDeclaration.cs +++ b/Shippo/Models/Components/ShipmentCreateRequestCustomsDeclaration.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class ShipmentCreateRequestCustomsDeclarationType diff --git a/Shippo/Models/Components/Track.cs b/Shippo/Models/Components/Track.cs index 92df871..13da519 100644 --- a/Shippo/Models/Components/Track.cs +++ b/Shippo/Models/Components/Track.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; public class Track { diff --git a/Shippo/Models/Components/Transaction.cs b/Shippo/Models/Components/Transaction.cs index 9d2b813..c49ce1f 100644 --- a/Shippo/Models/Components/Transaction.cs +++ b/Shippo/Models/Components/Transaction.cs @@ -12,8 +12,8 @@ namespace Shippo.Models.Components using Newtonsoft.Json; using Shippo.Models.Components; using Shippo.Utils; - using System.Collections.Generic; using System; + using System.Collections.Generic; public class Transaction { diff --git a/Shippo/Models/Components/TransactionRate.cs b/Shippo/Models/Components/TransactionRate.cs index 2c1e89e..6ce9a62 100644 --- a/Shippo/Models/Components/TransactionRate.cs +++ b/Shippo/Models/Components/TransactionRate.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class TransactionRateType diff --git a/Shippo/Models/Components/UserParcelTemplateCreateRequest.cs b/Shippo/Models/Components/UserParcelTemplateCreateRequest.cs index af93332..d9fac87 100644 --- a/Shippo/Models/Components/UserParcelTemplateCreateRequest.cs +++ b/Shippo/Models/Components/UserParcelTemplateCreateRequest.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class UserParcelTemplateCreateRequestType diff --git a/Shippo/Models/Components/WebhookPayload.cs b/Shippo/Models/Components/WebhookPayload.cs index f1b167c..57df3c4 100644 --- a/Shippo/Models/Components/WebhookPayload.cs +++ b/Shippo/Models/Components/WebhookPayload.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Components { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class WebhookPayloadType diff --git a/Shippo/Models/Requests/CreateParcelRequestBody.cs b/Shippo/Models/Requests/CreateParcelRequestBody.cs index f33246e..fa170cc 100644 --- a/Shippo/Models/Requests/CreateParcelRequestBody.cs +++ b/Shippo/Models/Requests/CreateParcelRequestBody.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Requests { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class CreateParcelRequestBodyType diff --git a/Shippo/Models/Requests/CreateTransactionRequestBody.cs b/Shippo/Models/Requests/CreateTransactionRequestBody.cs index 9c4cfed..19f63e2 100644 --- a/Shippo/Models/Requests/CreateTransactionRequestBody.cs +++ b/Shippo/Models/Requests/CreateTransactionRequestBody.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Requests { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class CreateTransactionRequestBodyType diff --git a/Shippo/Models/Requests/RegisterCarrierAccountRequestBody.cs b/Shippo/Models/Requests/RegisterCarrierAccountRequestBody.cs index e84cdea..82140f3 100644 --- a/Shippo/Models/Requests/RegisterCarrierAccountRequestBody.cs +++ b/Shippo/Models/Requests/RegisterCarrierAccountRequestBody.cs @@ -9,14 +9,14 @@ #nullable enable namespace Shippo.Models.Requests { - using Newtonsoft.Json.Linq; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; using Shippo.Models.Components; using Shippo.Utils; + using System; using System.Collections.Generic; using System.Numerics; using System.Reflection; - using System; public class RegisterCarrierAccountRequestBodyType diff --git a/Shippo/Orders.cs b/Shippo/Orders.cs index 1ae51c0..cf67289 100644 --- a/Shippo/Orders.cs +++ b/Shippo/Orders.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// An order is a request from a customer to purchase goods from a merchant.
@@ -93,10 +93,10 @@ public class Orders: IOrders { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Parcels.cs b/Shippo/Parcels.cs index 35de370..f5ceb0e 100644 --- a/Shippo/Parcels.cs +++ b/Shippo/Parcels.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates.
@@ -79,10 +79,10 @@ public class Parcels: IParcels { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Pickups.cs b/Shippo/Pickups.cs index 61e9941..37685df 100644 --- a/Shippo/Pickups.cs +++ b/Shippo/Pickups.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A pickup is when you schedule a carrier to collect a package for delivery.
@@ -55,10 +55,10 @@ public class Pickups: IPickups { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Rates.cs b/Shippo/Rates.cs index 644b075..adc49b3 100644 --- a/Shippo/Rates.cs +++ b/Shippo/Rates.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A rate is the cost to ship a parcel from a carrier. The rate object details the service level including the cost and transit time.
@@ -77,10 +77,10 @@ public class Rates: IRates { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/RatesAtCheckout.cs b/Shippo/RatesAtCheckout.cs index 7a61f2b..68148fd 100644 --- a/Shippo/RatesAtCheckout.cs +++ b/Shippo/RatesAtCheckout.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Rates at checkout is a tool for merchants to display up-to-date shipping estimates based on what's in their customers cart and where they’re shipping to.
@@ -97,10 +97,10 @@ public class RatesAtCheckout: IRatesAtCheckout { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Refunds.cs b/Shippo/Refunds.cs index 63228ed..d79faef 100644 --- a/Shippo/Refunds.cs +++ b/Shippo/Refunds.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Refunds are reimbursements for successfully created but unused shipping labels or other charges.
@@ -71,10 +71,10 @@ public class Refunds: IRefunds { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/ServiceGroups.cs b/Shippo/ServiceGroups.cs index ae19393..067180d 100644 --- a/Shippo/ServiceGroups.cs +++ b/Shippo/ServiceGroups.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A service group is a set of service levels grouped together.
@@ -82,10 +82,10 @@ public class ServiceGroups: IServiceGroups { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Shipments.cs b/Shippo/Shipments.cs index 19c4df5..a46ff74 100644 --- a/Shippo/Shipments.cs +++ b/Shippo/Shipments.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A shipment is the act of transporting goods. A shipment object contains **to** and **from** addresses, and the parcel details that you are shipping. You can use the shipment object to retrieve shipping rates and purchase a shipping label.
@@ -96,10 +96,10 @@ public class Shipments: IShipments { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Shippo.csproj b/Shippo/Shippo.csproj index 031724d..a66dc61 100644 --- a/Shippo/Shippo.csproj +++ b/Shippo/Shippo.csproj @@ -3,7 +3,7 @@ true Shippo - 5.0.0-beta.9 + 5.0.0-beta.10 net6.0 Shippo Copyright (c) Shippo 2024 diff --git a/Shippo/ShippoAccounts.cs b/Shippo/ShippoAccounts.cs index a0001a9..bc22d50 100644 --- a/Shippo/ShippoAccounts.cs +++ b/Shippo/ShippoAccounts.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Shippo Accounts are used by Shippo Platform Accounts to create and manage Managed Shippo Accounts.
@@ -84,10 +84,10 @@ public class ShippoAccounts: IShippoAccounts { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/ShippoSDK.cs b/Shippo/ShippoSDK.cs index 36df9b7..17aa541 100644 --- a/Shippo/ShippoSDK.cs +++ b/Shippo/ShippoSDK.cs @@ -13,12 +13,12 @@ namespace Shippo using Shippo.Hooks; using Shippo.Models.Components; using Shippo.Models.Errors; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; - using System; /// /// Shippo external API.: Use this API to integrate with the Shippo service @@ -316,10 +316,10 @@ public class ShippoSDK: IShippoSDK public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _client; diff --git a/Shippo/TrackingStatus.cs b/Shippo/TrackingStatus.cs index b24fb82..a6340c3 100644 --- a/Shippo/TrackingStatus.cs +++ b/Shippo/TrackingStatus.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// <p style="text-align: center; background-color: #F2F3F4;"></br>
@@ -80,10 +80,10 @@ public class TrackingStatus: ITrackingStatus { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Transactions.cs b/Shippo/Transactions.cs index 55b6d60..d6a69c6 100644 --- a/Shippo/Transactions.cs +++ b/Shippo/Transactions.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and used them to ship a parcel with a carrier, such as USPS or FedEx.
@@ -71,10 +71,10 @@ public class Transactions: ITransactions { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/UserParcelTemplates.cs b/Shippo/UserParcelTemplates.cs index c0a5f7a..54a8ac7 100644 --- a/Shippo/UserParcelTemplates.cs +++ b/Shippo/UserParcelTemplates.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// A user parcel template represents a package used for shipping that has preset dimensions and attributes defined
@@ -106,10 +106,10 @@ public class UserParcelTemplates: IUserParcelTemplates { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/Shippo/Utils/RequestBodySerializer.cs b/Shippo/Utils/RequestBodySerializer.cs index 1b5ecf5..fc44af9 100644 --- a/Shippo/Utils/RequestBodySerializer.cs +++ b/Shippo/Utils/RequestBodySerializer.cs @@ -276,7 +276,7 @@ private static HttpContent SerializeMultipart(object request, string mediaType) byte[]? content = null; string fileName = ""; - string fieldName = ""; + string fieldName = metadata.Name; foreach (var fileProp in fileProps) { @@ -297,12 +297,11 @@ private static HttpContent SerializeMultipart(object request, string mediaType) } else { - fieldName = fileMetadata.Name ?? fileProp.Name; fileName = fileProp.GetValue(value)?.ToString() ?? ""; } } - if (fieldName == "" || fileName == "" || content == null) + if (fileName == "" || content == null) { throw new Exception("Invalid multipart/form-data file"); } diff --git a/Shippo/Webhooks.cs b/Shippo/Webhooks.cs index 442d0f7..da9f071 100644 --- a/Shippo/Webhooks.cs +++ b/Shippo/Webhooks.cs @@ -14,13 +14,13 @@ namespace Shippo using Shippo.Models.Components; using Shippo.Models.Errors; using Shippo.Models.Requests; - using Shippo.Utils.Retries; using Shippo.Utils; + using Shippo.Utils.Retries; + using System; using System.Collections.Generic; - using System.Net.Http.Headers; using System.Net.Http; + using System.Net.Http.Headers; using System.Threading.Tasks; - using System; /// /// Webhooks are a way for Shippo to notify your application when a specific event occurs. For example, when a label is purchased or when a shipment tracking status has changed. You can use webhooks to trigger actions in your application, such as sending an email or updating a database.
@@ -97,10 +97,10 @@ public class Webhooks: IWebhooks { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "5.0.0-beta.9"; - private const string _sdkGenVersion = "2.463.0"; + private const string _sdkVersion = "5.0.0-beta.10"; + private const string _sdkGenVersion = "2.483.1"; private const string _openapiDocVersion = "2018-02-08"; - private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.9 2.463.0 2018-02-08 Shippo"; + private const string _userAgent = "speakeasy-sdk/csharp 5.0.0-beta.10 2.483.1 2018-02-08 Shippo"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/ShippoTests/Integration/TestShipments.cs b/ShippoTests/Integration/TestShipments.cs index 7ade832..6275693 100644 --- a/ShippoTests/Integration/TestShipments.cs +++ b/ShippoTests/Integration/TestShipments.cs @@ -112,12 +112,12 @@ public async void TestInternationalShipment() [Fact] public async void TestListAllShipments() { - ListShipmentsRequest request = new ListShipmentsRequest() {}; + ListShipmentsRequest request = new ListShipmentsRequest() { }; ShipmentPaginatedList response = await sdkFixture.SDK.Shipments.ListAsync(request); response.Should().NotBeNull(); response.Results.Should().NotBeNull(); - + if (response.Results != null) { AssertShipmentResults(response.Results); diff --git a/USAGE.md b/USAGE.md index e3c9d9b..97a4733 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,7 +1,6 @@ ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/Models/Components/CarriersEnum.md b/docs/Models/Components/CarriersEnum.md index c9a8e1f..06aeb06 100644 --- a/docs/Models/Components/CarriersEnum.md +++ b/docs/Models/Components/CarriersEnum.md @@ -19,7 +19,6 @@ | collect_plus | CollectPlus| | correios_br | CorreiosBR| | correos_espana | Correos España | -| couriersplease | Couriers Please| | colissimo | Colissimo| | deutsche_post | Deutsche Post| | dhl_benelux | DHL Benelux| @@ -45,7 +44,6 @@ | new_zealand_post | New Zealand Post (also used for Pace and CourierPost)| | nippon_express | Nippon Express| | ontrac | OnTrac| -| orangeds | OrangeDS| | parcelforce | Parcelforce| | passport | Passport| | pcf | PCF| @@ -87,7 +85,6 @@ | `CollectPlus` | collect_plus | | `CorreiosBr` | correios_br | | `CorreosEspana` | correos_espana | -| `Couriersplease` | couriersplease | | `Colissimo` | colissimo | | `DeutschePost` | deutsche_post | | `DhlBenelux` | dhl_benelux | @@ -113,7 +110,6 @@ | `NewZealandPost` | new_zealand_post | | `NipponExpress` | nippon_express | | `Ontrac` | ontrac | -| `Orangeds` | orangeds | | `Parcelforce` | parcelforce | | `Passport` | passport | | `Pcf` | pcf | diff --git a/docs/Models/Components/ParcelTemplateCouriersPleaseEnum.md b/docs/Models/Components/ParcelTemplateCouriersPleaseEnum.md deleted file mode 100644 index 0e860b5..0000000 --- a/docs/Models/Components/ParcelTemplateCouriersPleaseEnum.md +++ /dev/null @@ -1,19 +0,0 @@ -# ParcelTemplateCouriersPleaseEnum - -|Token | Name | Dimensions| -|:---|:---|:---| -| couriersplease_500g_satchel | 500g Satchel | 22.00 x 33.50 x 0.10 cm| -| couriersplease_1kg_satchel | 1kg Satchel | 28.00 x 35.00 x 0.10 cm| -| couriersplease_3kg_satchel | 3kg Satchel | 34.00 x 42.00 x 0.10 cm| -| couriersplease_5kg_satchel | 5kg Satchel | 43.70 x 59.70 x 0.10 cm| - - - -## Values - -| Name | Value | -| --------------------------- | --------------------------- | -| `Couriersplease500gSatchel` | couriersplease_500g_satchel | -| `Couriersplease1kgSatchel` | couriersplease_1kg_satchel | -| `Couriersplease3kgSatchel` | couriersplease_3kg_satchel | -| `Couriersplease5kgSatchel` | couriersplease_5kg_satchel | \ No newline at end of file diff --git a/docs/Models/Components/ParcelTemplateEnumSet.md b/docs/Models/Components/ParcelTemplateEnumSet.md index 24375b6..4da6578 100644 --- a/docs/Models/Components/ParcelTemplateEnumSet.md +++ b/docs/Models/Components/ParcelTemplateEnumSet.md @@ -35,12 +35,6 @@ ParcelTemplateEnumSet.CreateParcelTemplateDHLeCommerceEnum(/* values here */); ParcelTemplateEnumSet.CreateParcelTemplateDPDUKEnum(/* values here */); ``` -### ParcelTemplateCouriersPleaseEnum - -```csharp -ParcelTemplateEnumSet.CreateParcelTemplateCouriersPleaseEnum(/* values here */); -``` - ### ParcelTemplateAramexAustraliaEnum ```csharp diff --git a/docs/Models/Components/ServiceLevelCouriersPleaseEnum.md b/docs/Models/Components/ServiceLevelCouriersPleaseEnum.md deleted file mode 100644 index 2c5cdef..0000000 --- a/docs/Models/Components/ServiceLevelCouriersPleaseEnum.md +++ /dev/null @@ -1,33 +0,0 @@ -# ServiceLevelCouriersPleaseEnum - -|Token | Service name| -|:---|:---| -| couriersplease_domestic_priority_auth_to_leave | Domestic Priority - Authority To Leave/POPPoints| -| couriersplease_domestic_priority_sign_required | Domestic Priority - Signature Required| -| couriersplease_gold_domestic_auth_to_leave | Gold Domestic - Authority To Leave/POPPoints| -| couriersplease_gold_domestic_sign_required | Gold Domestic - Signature Required| -| couriersplease_off_peak_auth_to_leave | Off Peak - Authority To Leave/POPPoints| -| couriersplease_off_peak_sign_required | Off Peak - Signature Required| -| couriersplease_parcel_auth_to_leave | Parcel - Authority To Leave| -| couriersplease_parcel_sign_required | Parcel - Signature Required| -| couriersplease_road_express | Road Express| -| couriersplease_satchel_auth_to_leave | Satchel - Authority To Leave| -| couriersplease_satchel_sign_required | Satchel - Signature Required| - - - -## Values - -| Name | Value | -| ---------------------------------------------- | ---------------------------------------------- | -| `CourierspleaseDomesticPriorityAuthToLeave` | couriersplease_domestic_priority_auth_to_leave | -| `CourierspleaseDomesticPrioritySignRequired` | couriersplease_domestic_priority_sign_required | -| `CourierspleaseGoldDomesticAuthToLeave` | couriersplease_gold_domestic_auth_to_leave | -| `CourierspleaseGoldDomesticSignRequired` | couriersplease_gold_domestic_sign_required | -| `CourierspleaseOffPeakAuthToLeave` | couriersplease_off_peak_auth_to_leave | -| `CourierspleaseOffPeakSignRequired` | couriersplease_off_peak_sign_required | -| `CourierspleaseParcelAuthToLeave` | couriersplease_parcel_auth_to_leave | -| `CourierspleaseParcelSignRequired` | couriersplease_parcel_sign_required | -| `CourierspleaseRoadExpress` | couriersplease_road_express | -| `CourierspleaseSatchelAuthToLeave` | couriersplease_satchel_auth_to_leave | -| `CourierspleaseSatchelSignRequired` | couriersplease_satchel_sign_required | \ No newline at end of file diff --git a/docs/Models/Components/ServiceLevelEnumSet.md b/docs/Models/Components/ServiceLevelEnumSet.md index 850e120..ac73191 100644 --- a/docs/Models/Components/ServiceLevelEnumSet.md +++ b/docs/Models/Components/ServiceLevelEnumSet.md @@ -75,12 +75,6 @@ ServiceLevelEnumSet.CreateServiceLevelCDLEnum(/* values here */); ServiceLevelEnumSet.CreateServiceLevelChronopostEnum(/* values here */); ``` -### ServiceLevelCouriersPleaseEnum - -```csharp -ServiceLevelEnumSet.CreateServiceLevelCouriersPleaseEnum(/* values here */); -``` - ### ServiceLevelCorreosEspanaEnum ```csharp diff --git a/docs/sdks/addresses/README.md b/docs/sdks/addresses/README.md index 7727e3b..366e15c 100644 --- a/docs/sdks/addresses/README.md +++ b/docs/sdks/addresses/README.md @@ -21,7 +21,6 @@ Returns a list of all address objects that have been created in this account. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -64,7 +63,6 @@ Creates a new address object. You can use address objects to create new shipment ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -120,7 +118,6 @@ Returns an existing address using an object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -161,7 +158,6 @@ Validates an existing address using an object ID ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/batches/README.md b/docs/sdks/batches/README.md index bdeebdb..cfabc72 100644 --- a/docs/sdks/batches/README.md +++ b/docs/sdks/batches/README.md @@ -30,7 +30,6 @@ Creates a new batch object for purchasing shipping labels for many shipments at ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; using System.Collections.Generic; @@ -43,7 +42,7 @@ var res = await sdk.Batches.CreateAsync( batchCreateRequest: new BatchCreateRequest() { DefaultCarrierAccount = "078870331023437cb917f5187429b093", DefaultServicelevelToken = "usps_priority", - LabelFiletype = Shippo.Models.Components.LabelFileTypeEnum.Pdf4x6, + LabelFiletype = LabelFileTypeEnum.Pdf4x6, Metadata = "BATCH #1", BatchShipments = new List() { new BatchShipmentCreateRequest() { @@ -70,7 +69,7 @@ var res = await sdk.Batches.CreateAsync( Cod = new Cod() { Amount = "5.5", Currency = "USD", - PaymentMethod = Shippo.Models.Components.PaymentMethod.Cash, + PaymentMethod = PaymentMethod.Cash, }, CodNumber = new UPSReferenceFields() { Prefix = "ABC", @@ -195,13 +194,13 @@ var res = await sdk.Batches.CreateAsync( ), CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateCustomsDeclarationCreateRequest( new CustomsDeclarationCreateRequest() { - B13aFilingOption = Shippo.Models.Components.CustomsDeclarationB13AFilingOptionEnum.FiledElectronically, + B13aFilingOption = CustomsDeclarationB13AFilingOptionEnum.FiledElectronically, Certify = true, CertifySigner = "Shawn Ippotle", ContentsExplanation = "T-Shirt purchase", DutiesPayor = new DutiesPayor() { Account = "2323434543", - Type = Shippo.Models.Components.CustomsDeclarationCreateRequestType.ThirdParty, + Type = CustomsDeclarationCreateRequestType.ThirdParty, Address = new CustomsDeclarationCreateRequestAddress() { Name = "Patrick Kavanagh", Zip = "80331", @@ -212,7 +211,7 @@ var res = await sdk.Batches.CreateAsync( EoriNumber = "PL123456790ABCDE", TaxId = new CustomsTaxIdentification() { Number = "123456789", - Type = Shippo.Models.Components.CustomsTaxIdentificationType.Ein, + Type = CustomsTaxIdentificationType.Ein, }, }, Invoice = "#123123", @@ -231,13 +230,13 @@ var res = await sdk.Batches.CreateAsync( Email = "shippotle@shippo.com", IsResidential = true, }, - ContentsType = Shippo.Models.Components.CustomsDeclarationContentsTypeEnum.Merchandise, - EelPfc = Shippo.Models.Components.CustomsDeclarationEelPfcEnum.Noeei3037A, - Incoterm = Shippo.Models.Components.CustomsDeclarationIncotermEnum.Ddp, + ContentsType = CustomsDeclarationContentsTypeEnum.Merchandise, + EelPfc = CustomsDeclarationEelPfcEnum.Noeei3037A, + Incoterm = CustomsDeclarationIncotermEnum.Ddp, Items = new List() { new CustomsItemCreateRequest() { Description = "T-Shirt", - MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + MassUnit = WeightUnitEnum.Lb, Metadata = "Order ID \"123454\"", NetWeight = "5", OriginCountry = "", @@ -248,7 +247,7 @@ var res = await sdk.Batches.CreateAsync( ValueCurrency = "USD", }, }, - NonDeliveryOption = Shippo.Models.Components.CustomsDeclarationNonDeliveryOptionEnum.Return, + NonDeliveryOption = CustomsDeclarationNonDeliveryOptionEnum.Return, Test = true, } ), @@ -263,19 +262,19 @@ var res = await sdk.Batches.CreateAsync( Cod = new Cod() { Amount = "5.5", Currency = "USD", - PaymentMethod = Shippo.Models.Components.PaymentMethod.Cash, + PaymentMethod = PaymentMethod.Cash, }, Insurance = new ParcelInsurance() { Amount = "5.5", Content = "Laptop", Currency = "USD", - Provider = Shippo.Models.Components.ParcelInsuranceProvider.Ups, + Provider = ParcelInsuranceProvider.Ups, }, }, Metadata = "Customer ID 123456", - MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + MassUnit = WeightUnitEnum.Lb, Weight = "1", - DistanceUnit = Shippo.Models.Components.DistanceUnitEnum.In, + DistanceUnit = DistanceUnitEnum.In, Height = "1", Length = "1", Width = "1", @@ -320,8 +319,8 @@ For more details on filtering results, see our guide on ", @@ -361,9 +360,8 @@ Adds batch shipments to an existing batch. ```csharp using Shippo; -using Shippo.Models.Requests; -using System.Collections.Generic; using Shippo.Models.Components; +using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -397,7 +395,7 @@ var res = await sdk.Batches.AddShipmentsAsync( Cod = new Cod() { Amount = "5.5", Currency = "USD", - PaymentMethod = Shippo.Models.Components.PaymentMethod.Cash, + PaymentMethod = PaymentMethod.Cash, }, CodNumber = new UPSReferenceFields() { Prefix = "ABC", @@ -570,7 +568,6 @@ When all the shipments are purchased, the status will change to `PURCHASED` and ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -611,9 +608,8 @@ Removes shipments from an existing batch shipment. ```csharp using Shippo; -using Shippo.Models.Requests; -using System.Collections.Generic; using Shippo.Models.Components; +using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "", diff --git a/docs/sdks/carrieraccounts/README.md b/docs/sdks/carrieraccounts/README.md index 1d0a09b..53dda7c 100644 --- a/docs/sdks/carrieraccounts/README.md +++ b/docs/sdks/carrieraccounts/README.md @@ -29,8 +29,8 @@ By default, if the query parameter is omitted, the `service_levels` property wil ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -68,9 +68,7 @@ Creates a new carrier account or connects an existing carrier account to the Shi ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; -using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -127,7 +125,6 @@ Returns an existing carrier account using an object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -168,9 +165,7 @@ Updates an existing carrier account object. The account_id and carrier can't be ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; -using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -241,8 +236,8 @@ Used by client applications to setup or reconnect an existing carrier account wi ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -286,7 +281,6 @@ Adds a Shippo carrier account ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -332,8 +326,8 @@ Returns the registration status for the given account for the given carrier ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -341,7 +335,7 @@ var sdk = new ShippoSDK( ); var res = await sdk.CarrierAccounts.GetRegistrationStatusAsync( - carrier: Shippo.Models.Requests.Carrier.Usps, + carrier: Carrier.Usps, shippoApiVersion: "2018-02-08" ); diff --git a/docs/sdks/carrierparceltemplates/README.md b/docs/sdks/carrierparceltemplates/README.md index 386dcad..73ed771 100644 --- a/docs/sdks/carrierparceltemplates/README.md +++ b/docs/sdks/carrierparceltemplates/README.md @@ -26,8 +26,8 @@ List all carrier parcel template objects.
Use the following query string pa ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -35,7 +35,7 @@ var sdk = new ShippoSDK( ); var res = await sdk.CarrierParcelTemplates.ListAsync( - include: Shippo.Models.Requests.Include.Enabled, + include: Include.Enabled, carrier: "fedex", shippoApiVersion: "2018-02-08" ); @@ -69,7 +69,6 @@ Fetches the parcel template information for a specific carrier parcel template, ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/customsdeclarations/README.md b/docs/sdks/customsdeclarations/README.md index ea71c35..349529b 100644 --- a/docs/sdks/customsdeclarations/README.md +++ b/docs/sdks/customsdeclarations/README.md @@ -21,7 +21,6 @@ Returns a a list of all customs declaration objects ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -64,7 +63,6 @@ Creates a new customs declaration object ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; using System.Collections.Generic; @@ -75,13 +73,13 @@ var sdk = new ShippoSDK( var res = await sdk.CustomsDeclarations.CreateAsync( customsDeclarationCreateRequest: new CustomsDeclarationCreateRequest() { - B13aFilingOption = Shippo.Models.Components.CustomsDeclarationB13AFilingOptionEnum.FiledElectronically, + B13aFilingOption = CustomsDeclarationB13AFilingOptionEnum.FiledElectronically, Certify = true, CertifySigner = "Shawn Ippotle", ContentsExplanation = "T-Shirt purchase", DutiesPayor = new DutiesPayor() { Account = "2323434543", - Type = Shippo.Models.Components.CustomsDeclarationCreateRequestType.ThirdParty, + Type = CustomsDeclarationCreateRequestType.ThirdParty, Address = new CustomsDeclarationCreateRequestAddress() { Name = "Patrick Kavanagh", Zip = "80331", @@ -92,7 +90,7 @@ var res = await sdk.CustomsDeclarations.CreateAsync( EoriNumber = "PL123456790ABCDE", TaxId = new CustomsTaxIdentification() { Number = "123456789", - Type = Shippo.Models.Components.CustomsTaxIdentificationType.Ein, + Type = CustomsTaxIdentificationType.Ein, }, }, Invoice = "#123123", @@ -111,13 +109,13 @@ var res = await sdk.CustomsDeclarations.CreateAsync( Email = "shippotle@shippo.com", IsResidential = true, }, - ContentsType = Shippo.Models.Components.CustomsDeclarationContentsTypeEnum.Merchandise, - EelPfc = Shippo.Models.Components.CustomsDeclarationEelPfcEnum.Noeei3037A, - Incoterm = Shippo.Models.Components.CustomsDeclarationIncotermEnum.Ddp, + ContentsType = CustomsDeclarationContentsTypeEnum.Merchandise, + EelPfc = CustomsDeclarationEelPfcEnum.Noeei3037A, + Incoterm = CustomsDeclarationIncotermEnum.Ddp, Items = new List() { new CustomsItemCreateRequest() { Description = "T-Shirt", - MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + MassUnit = WeightUnitEnum.Lb, Metadata = "Order ID \"123454\"", NetWeight = "5", OriginCountry = "", @@ -128,7 +126,7 @@ var res = await sdk.CustomsDeclarations.CreateAsync( ValueCurrency = "USD", }, }, - NonDeliveryOption = Shippo.Models.Components.CustomsDeclarationNonDeliveryOptionEnum.Return, + NonDeliveryOption = CustomsDeclarationNonDeliveryOptionEnum.Return, Test = true, }, shippoApiVersion: "2018-02-08" @@ -162,7 +160,6 @@ Returns an existing customs declaration using an object ID ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/customsitems/README.md b/docs/sdks/customsitems/README.md index 205ac88..8752f62 100644 --- a/docs/sdks/customsitems/README.md +++ b/docs/sdks/customsitems/README.md @@ -20,7 +20,6 @@ Returns a list all customs items objects. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -63,7 +62,6 @@ Creates a new customs item object. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -74,7 +72,7 @@ var sdk = new ShippoSDK( var res = await sdk.CustomsItems.CreateAsync( customsItemCreateRequest: new CustomsItemCreateRequest() { Description = "T-Shirt", - MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + MassUnit = WeightUnitEnum.Lb, Metadata = "Order ID \"123454\"", NetWeight = "5", OriginCountry = "", @@ -115,7 +113,6 @@ Returns an existing customs item using an object ID ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/manifests/README.md b/docs/sdks/manifests/README.md index c431003..c9a991d 100644 --- a/docs/sdks/manifests/README.md +++ b/docs/sdks/manifests/README.md @@ -26,7 +26,6 @@ Returns a list of all manifest objects. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -69,7 +68,6 @@ Creates a new manifest object. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; using System.Collections.Generic; @@ -135,7 +133,6 @@ Returns an existing manifest using an object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/orders/README.md b/docs/sdks/orders/README.md index 8f74c69..47013ef 100644 --- a/docs/sdks/orders/README.md +++ b/docs/sdks/orders/README.md @@ -31,9 +31,9 @@ Returns a list of all order objects. ```csharp using Shippo; +using Shippo.Models.Components; using Shippo.Models.Requests; using System.Collections.Generic; -using Shippo.Models.Components; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -42,9 +42,9 @@ var sdk = new ShippoSDK( ListOrdersRequest req = new ListOrdersRequest() { OrderStatus = new List() { - Shippo.Models.Components.OrderStatusEnum.Paid, + OrderStatusEnum.Paid, }, - ShopApp = Shippo.Models.Components.OrderShopAppEnum.Shippo, + ShopApp = OrderShopAppEnum.Shippo, }; var res = await sdk.Orders.ListAsync(req); @@ -76,8 +76,8 @@ Creates a new order object. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using System; using System.Collections.Generic; var sdk = new ShippoSDK( @@ -90,7 +90,7 @@ var res = await sdk.Orders.CreateAsync( Currency = "USD", Notes = "This customer is a VIP", OrderNumber = "#1068", - OrderStatus = Shippo.Models.Components.OrderStatusEnum.Paid, + OrderStatus = OrderStatusEnum.Paid, PlacedAt = "2016-09-23T01:28:12Z", ShippingCost = "12.83", ShippingCostCurrency = "USD", @@ -99,7 +99,7 @@ var res = await sdk.Orders.CreateAsync( TotalPrice = "24.93", TotalTax = "0.0", Weight = "0.4", - WeightUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + WeightUnit = WeightUnitEnum.Lb, FromAddress = new AddressCreateRequest() { Name = "Shwan Ippotle", Company = "Shippo", @@ -144,7 +144,7 @@ var res = await sdk.Orders.CreateAsync( TotalPrice = "12.1", VariantTitle = "June Edition", Weight = "0.4", - WeightUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + WeightUnit = WeightUnitEnum.Lb, }, }, }, @@ -179,7 +179,6 @@ Retrieves an existing order using an object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/parcels/README.md b/docs/sdks/parcels/README.md index 2da8b8e..51801d7 100644 --- a/docs/sdks/parcels/README.md +++ b/docs/sdks/parcels/README.md @@ -24,7 +24,6 @@ Returns a list of all parcel objects. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -67,7 +66,6 @@ Creates a new parcel object. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -82,19 +80,19 @@ var res = await sdk.Parcels.CreateAsync( Cod = new Cod() { Amount = "5.5", Currency = "USD", - PaymentMethod = Shippo.Models.Components.PaymentMethod.Cash, + PaymentMethod = PaymentMethod.Cash, }, Insurance = new ParcelInsurance() { Amount = "5.5", Content = "Laptop", Currency = "USD", - Provider = Shippo.Models.Components.ParcelInsuranceProvider.Ups, + Provider = ParcelInsuranceProvider.Ups, }, }, Metadata = "Customer ID 123456", - MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + MassUnit = WeightUnitEnum.Lb, Weight = "1", - DistanceUnit = Shippo.Models.Components.DistanceUnitEnum.In, + DistanceUnit = DistanceUnitEnum.In, Height = "1", Length = "1", Width = "1", @@ -131,7 +129,6 @@ Returns parcel details using an existing parcel object ID (this will not return ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/pickups/README.md b/docs/sdks/pickups/README.md index 11de673..f558024 100644 --- a/docs/sdks/pickups/README.md +++ b/docs/sdks/pickups/README.md @@ -19,8 +19,8 @@ Creates a pickup object. This request is for a carrier to come to a specified lo ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using System; using System.Collections.Generic; var sdk = new ShippoSDK( @@ -48,8 +48,8 @@ var res = await sdk.Pickups.CreateAsync( Metadata = "Customer ID 123456", Validate = true, }, - BuildingLocationType = Shippo.Models.Components.BuildingLocationType.FrontDoor, - BuildingType = Shippo.Models.Components.BuildingType.Apartment, + BuildingLocationType = BuildingLocationType.FrontDoor, + BuildingType = BuildingType.Apartment, Instructions = "Behind screen door", }, RequestedEndTime = System.DateTime.Parse("2023-06-18T07:14:55.338Z"), diff --git a/docs/sdks/rates/README.md b/docs/sdks/rates/README.md index 579538f..1201810 100644 --- a/docs/sdks/rates/README.md +++ b/docs/sdks/rates/README.md @@ -20,7 +20,6 @@ Returns an existing rate using a rate object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -61,8 +60,8 @@ Returns a paginated list of rates associated with a shipment ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -108,8 +107,8 @@ Note: re-requesting the rates with a different currency code will re-queue the s ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", diff --git a/docs/sdks/ratesatcheckout/README.md b/docs/sdks/ratesatcheckout/README.md index f36baa5..36aeb59 100644 --- a/docs/sdks/ratesatcheckout/README.md +++ b/docs/sdks/ratesatcheckout/README.md @@ -31,8 +31,8 @@ template or a fully formed user parcel template object as the parcel value. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using System; using System.Collections.Generic; var sdk = new ShippoSDK( @@ -75,7 +75,7 @@ var res = await sdk.RatesAtCheckout.CreateAsync( TotalPrice = "12.1", VariantTitle = "June Edition", Weight = "0.4", - WeightUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + WeightUnit = WeightUnitEnum.Lb, ObjectId = "abf7d5675d744b6ea9fdb6f796b28f28", }, }, @@ -114,7 +114,6 @@ Retrieve and display the currently configured default parcel template for live r ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -151,7 +150,6 @@ Update the currently configured default parcel template for live rates. The obje ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -194,7 +192,6 @@ Clears the currently configured default parcel template for live rates. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/refunds/README.md b/docs/sdks/refunds/README.md index b0ac173..01574c4 100644 --- a/docs/sdks/refunds/README.md +++ b/docs/sdks/refunds/README.md @@ -20,7 +20,6 @@ Creates a new refund object. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -64,7 +63,6 @@ Returns a list all refund objects. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -101,7 +99,6 @@ Returns an existing rate using a rate object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/servicegroups/README.md b/docs/sdks/servicegroups/README.md index 4c24d23..ad7c177 100644 --- a/docs/sdks/servicegroups/README.md +++ b/docs/sdks/servicegroups/README.md @@ -22,7 +22,6 @@ Returns a list of service group objects. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -59,7 +58,6 @@ Creates a new service group. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; using System.Collections.Generic; @@ -77,7 +75,7 @@ var res = await sdk.ServiceGroups.CreateAsync( FreeShippingThresholdMin = "5", Name = "USPS Shipping", RateAdjustment = 15, - Type = Shippo.Models.Components.ServiceGroupTypeEnum.FlatRate, + Type = ServiceGroupTypeEnum.FlatRate, ServiceLevels = new List() { new ServiceGroupAccountAndServiceLevel() { AccountObjectId = "80feb1633d4a43c898f0058506cfd82d", @@ -116,7 +114,6 @@ Updates an existing service group object.
The object_id cannot be updated as ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; using System.Collections.Generic; @@ -135,7 +132,7 @@ var res = await sdk.ServiceGroups.UpdateAsync( FreeShippingThresholdMin = "5", Name = "USPS Shipping", RateAdjustment = 15, - Type = Shippo.Models.Components.ServiceGroupTypeEnum.FlatRate, + Type = ServiceGroupTypeEnum.FlatRate, ObjectId = "80feb1633d4a43c898f005850", IsActive = true, ServiceLevels = new List() { @@ -175,7 +172,6 @@ Deletes an existing service group using an object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/shipments/README.md b/docs/sdks/shipments/README.md index 5af38f2..23b6386 100644 --- a/docs/sdks/shipments/README.md +++ b/docs/sdks/shipments/README.md @@ -41,8 +41,8 @@ Optional path parameters:
```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; +using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -80,7 +80,6 @@ Creates a new shipment object. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; using System.Collections.Generic; @@ -110,7 +109,7 @@ var res = await sdk.Shipments.CreateAsync( Cod = new Cod() { Amount = "5.5", Currency = "USD", - PaymentMethod = Shippo.Models.Components.PaymentMethod.Cash, + PaymentMethod = PaymentMethod.Cash, }, CodNumber = new UPSReferenceFields() { Prefix = "ABC", @@ -235,13 +234,13 @@ var res = await sdk.Shipments.CreateAsync( ), CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateCustomsDeclarationCreateRequest( new CustomsDeclarationCreateRequest() { - B13aFilingOption = Shippo.Models.Components.CustomsDeclarationB13AFilingOptionEnum.FiledElectronically, + B13aFilingOption = CustomsDeclarationB13AFilingOptionEnum.FiledElectronically, Certify = true, CertifySigner = "Shawn Ippotle", ContentsExplanation = "T-Shirt purchase", DutiesPayor = new DutiesPayor() { Account = "2323434543", - Type = Shippo.Models.Components.CustomsDeclarationCreateRequestType.ThirdParty, + Type = CustomsDeclarationCreateRequestType.ThirdParty, Address = new CustomsDeclarationCreateRequestAddress() { Name = "Patrick Kavanagh", Zip = "80331", @@ -252,7 +251,7 @@ var res = await sdk.Shipments.CreateAsync( EoriNumber = "PL123456790ABCDE", TaxId = new CustomsTaxIdentification() { Number = "123456789", - Type = Shippo.Models.Components.CustomsTaxIdentificationType.Ein, + Type = CustomsTaxIdentificationType.Ein, }, }, Invoice = "#123123", @@ -271,13 +270,13 @@ var res = await sdk.Shipments.CreateAsync( Email = "shippotle@shippo.com", IsResidential = true, }, - ContentsType = Shippo.Models.Components.CustomsDeclarationContentsTypeEnum.Merchandise, - EelPfc = Shippo.Models.Components.CustomsDeclarationEelPfcEnum.Noeei3037A, - Incoterm = Shippo.Models.Components.CustomsDeclarationIncotermEnum.Ddp, + ContentsType = CustomsDeclarationContentsTypeEnum.Merchandise, + EelPfc = CustomsDeclarationEelPfcEnum.Noeei3037A, + Incoterm = CustomsDeclarationIncotermEnum.Ddp, Items = new List() { new CustomsItemCreateRequest() { Description = "T-Shirt", - MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + MassUnit = WeightUnitEnum.Lb, Metadata = "Order ID \"123454\"", NetWeight = "5", OriginCountry = "", @@ -288,7 +287,7 @@ var res = await sdk.Shipments.CreateAsync( ValueCurrency = "USD", }, }, - NonDeliveryOption = Shippo.Models.Components.CustomsDeclarationNonDeliveryOptionEnum.Return, + NonDeliveryOption = CustomsDeclarationNonDeliveryOptionEnum.Return, Test = true, } ), @@ -303,19 +302,19 @@ var res = await sdk.Shipments.CreateAsync( Cod = new Cod() { Amount = "5.5", Currency = "USD", - PaymentMethod = Shippo.Models.Components.PaymentMethod.Cash, + PaymentMethod = PaymentMethod.Cash, }, Insurance = new ParcelInsurance() { Amount = "5.5", Content = "Laptop", Currency = "USD", - Provider = Shippo.Models.Components.ParcelInsuranceProvider.Ups, + Provider = ParcelInsuranceProvider.Ups, }, }, Metadata = "Customer ID 123456", - MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + MassUnit = WeightUnitEnum.Lb, Weight = "1", - DistanceUnit = Shippo.Models.Components.DistanceUnitEnum.In, + DistanceUnit = DistanceUnitEnum.In, Height = "1", Length = "1", Width = "1", @@ -354,7 +353,6 @@ Returns an existing shipment using an object ID ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/shippoaccounts/README.md b/docs/sdks/shippoaccounts/README.md index ddc8364..5588fb6 100644 --- a/docs/sdks/shippoaccounts/README.md +++ b/docs/sdks/shippoaccounts/README.md @@ -23,7 +23,6 @@ Returns a list of Shippo Managed Accounts objects. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -66,7 +65,6 @@ Creates a new
", @@ -29,8 +29,8 @@ var sdk = new ShippoSDK( ); ListTransactionsRequest req = new ListTransactionsRequest() { - ObjectStatus = Shippo.Models.Components.TransactionStatusEnum.Success, - TrackingStatus = Shippo.Models.Components.TrackingStatusEnum.Delivered, + ObjectStatus = TransactionStatusEnum.Success, + TrackingStatus = TrackingStatusEnum.Delivered, }; var res = await sdk.Transactions.ListAsync(req); @@ -62,9 +62,7 @@ Creates a new transaction object and purchases the shipping label using a rate o ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; -using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "", @@ -75,7 +73,7 @@ var res = await sdk.Transactions.CreateAsync( requestBody: CreateTransactionRequestBody.CreateTransactionCreateRequest( new TransactionCreateRequest() { Async = false, - LabelFileType = Shippo.Models.Components.LabelFileTypeEnum.Pdf4x6, + LabelFileType = LabelFileTypeEnum.Pdf4x6, Metadata = "Order ID #12345", Rate = "ec9f0d3adc9441449c85d315f0997fd5", Order = "adcfdddf8ec64b84ad22772bce3ea37a", @@ -112,7 +110,6 @@ Returns an existing transaction using an object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( diff --git a/docs/sdks/userparceltemplates/README.md b/docs/sdks/userparceltemplates/README.md index 31de37e..e820588 100644 --- a/docs/sdks/userparceltemplates/README.md +++ b/docs/sdks/userparceltemplates/README.md @@ -27,7 +27,6 @@ Returns a list all of all user parcel template objects. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -70,7 +69,6 @@ and depth, as well as their units." ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -82,7 +80,7 @@ var res = await sdk.UserParcelTemplates.CreateAsync( userParcelTemplateCreateRequest: UserParcelTemplateCreateRequest.CreateUserParcelTemplateWithCarrierTemplateCreateRequest( new UserParcelTemplateWithCarrierTemplateCreateRequest() { Weight = "12", - WeightUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + WeightUnit = WeightUnitEnum.Lb, } ), shippoApiVersion: "2018-02-08" @@ -116,7 +114,6 @@ Deletes a user parcel template using an object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -154,7 +151,6 @@ template, identified by the object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -195,7 +191,6 @@ Updates an existing user parcel template. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -207,12 +202,12 @@ var res = await sdk.UserParcelTemplates.UpdateAsync( userParcelTemplateObjectId: "", shippoApiVersion: "2018-02-08", userParcelTemplateUpdateRequest: new UserParcelTemplateUpdateRequest() { - DistanceUnit = Shippo.Models.Components.DistanceUnitEnum.In, + DistanceUnit = DistanceUnitEnum.In, Height = "6", Length = "10", Name = "My Custom Template", Weight = "12", - WeightUnit = Shippo.Models.Components.WeightUnitEnum.Lb, + WeightUnit = WeightUnitEnum.Lb, Width = "8", } ); diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 66cc37f..6386027 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -34,7 +34,7 @@ var sdk = new ShippoSDK( ); WebhookUpdateRequest req = new WebhookUpdateRequest() { - Event = Shippo.Models.Components.WebhookEventTypeEnum.BatchCreated, + Event = WebhookEventTypeEnum.BatchCreated, Url = "https://example.com/shippo-webhook", Active = true, IsTest = false, @@ -99,7 +99,6 @@ Returns the details of a specific webhook using the webhook object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -136,7 +135,6 @@ Updates an existing webhook using the webhook object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK( @@ -147,7 +145,7 @@ var sdk = new ShippoSDK( var res = await sdk.Webhooks.UpdateWebhookAsync( webhookId: "", webhookUpdateRequest: new WebhookUpdateRequest() { - Event = Shippo.Models.Components.WebhookEventTypeEnum.BatchCreated, + Event = WebhookEventTypeEnum.BatchCreated, Url = "https://example.com/shippo-webhook", Active = true, IsTest = false, @@ -182,7 +180,6 @@ Deletes a specific webhook using the webhook object ID. ```csharp using Shippo; -using Shippo.Models.Requests; using Shippo.Models.Components; var sdk = new ShippoSDK(