diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml
index cde53f15..b3c8736d 100644
--- a/.github/workflows/ci-cd.yaml
+++ b/.github/workflows/ci-cd.yaml
@@ -75,25 +75,6 @@ jobs:
ls -Rlh ShipEngineSDK.Test/TestResults/*/coverage.info
cat ShipEngineSDK.Test/TestResults/*/coverage.info > ShipEngineSDK.Test/TestResults/lcov.info
- - name: Send code coverage results to Coveralls
- uses: coverallsapp/github-action@v1.1.0
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- parallel: true
- flag-name: run-${{ matrix.test_number }}
- path-to-lcov: ShipEngineSDK.Test/TestResults/lcov.info
-
- coverage:
- name: Code Coverage
- needs: dot_net_core_test
- runs-on: ubuntu-latest
- steps:
- - name: Coveralls Finished
- uses: coverallsapp/github-action@master
- with:
- github-token: ${{ secrets.github_token }}
- parallel-finished: true
-
nuget-deploy:
runs-on: ubuntu-latest
needs: [dot_net_framework_test, dot_net_core_test]
diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore
index 52e2ea1c..ba8fc96d 100644
--- a/.openapi-generator-ignore
+++ b/.openapi-generator-ignore
@@ -26,11 +26,13 @@
**/*.csproj
appveyor.yml
git_push.sh
+ShipEngineSDK/Api/IApi.cs
ShipEngineSDK/Client/*.cs
+ShipEngineSDK/Extensions/*.cs
# We should re-enable these eventually
-README.md
-docs/*.md
+*/README.md
+docs/scripts/*
ShipEngineSDK.Test/*/*.cs
api/**
.gitignore
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index b2ccc123..f571e18d 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -1,3 +1,4 @@
+README.md
ShipEngineSDK/Api/AccountApi.cs
ShipEngineSDK/Api/AddressesApi.cs
ShipEngineSDK/Api/BatchesApi.cs
@@ -17,7 +18,6 @@ ShipEngineSDK/Api/TokensApi.cs
ShipEngineSDK/Api/TrackingApi.cs
ShipEngineSDK/Api/WarehousesApi.cs
ShipEngineSDK/Api/WebhooksApi.cs
-ShipEngineSDK/Model/AbstractOpenAPISchema.cs
ShipEngineSDK/Model/AccountSettings.cs
ShipEngineSDK/Model/AccountSettingsImages.cs
ShipEngineSDK/Model/AddFundsToCarrierRequestBody.cs
@@ -37,6 +37,7 @@ ShipEngineSDK/Model/AddressValidationStatus.cs
ShipEngineSDK/Model/AdvancedShipmentOptions.cs
ShipEngineSDK/Model/AdvancedShipmentOptionsDangerousGoodsContact.cs
ShipEngineSDK/Model/AdvancedShipmentOptionsFedexFreight.cs
+ShipEngineSDK/Model/AdvancedShipmentOptionsWindsorFrameworkDetails.cs
ShipEngineSDK/Model/AllowedIncoterms.cs
ShipEngineSDK/Model/AlternativeIdentifier.cs
ShipEngineSDK/Model/AlternativeIdentifiers.cs
@@ -164,6 +165,7 @@ ShipEngineSDK/Model/GetServicePointsRequestBody.cs
ShipEngineSDK/Model/GetServicePointsRequestBodyAddress.cs
ShipEngineSDK/Model/GetServicePointsRequestBodyProvidersInner.cs
ShipEngineSDK/Model/GetServicePointsRequestBodyShipment.cs
+ShipEngineSDK/Model/GetServicePointsRequestBodyShipmentPackagesInner.cs
ShipEngineSDK/Model/GetShipmentByExternalIdResponseBody.cs
ShipEngineSDK/Model/GetShipmentByIdResponseBody.cs
ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs
@@ -182,7 +184,9 @@ ShipEngineSDK/Model/LabelDownloadType.cs
ShipEngineSDK/Model/LabelFormat.cs
ShipEngineSDK/Model/LabelLayout.cs
ShipEngineSDK/Model/LabelMessages.cs
+ShipEngineSDK/Model/LabelPackage.cs
ShipEngineSDK/Model/LabelPackagesInner.cs
+ShipEngineSDK/Model/LabelRequest.cs
ShipEngineSDK/Model/LabelStatus.cs
ShipEngineSDK/Model/Link.cs
ShipEngineSDK/Model/ListAccountImagesResponseBody.cs
@@ -243,6 +247,9 @@ ShipEngineSDK/Model/ProcessBatchRequestBody.cs
ShipEngineSDK/Model/Products.cs
ShipEngineSDK/Model/PurchaseLabelWithoutShipment.cs
ShipEngineSDK/Model/Rate.cs
+ShipEngineSDK/Model/RateDetail.cs
+ShipEngineSDK/Model/RateDetailAttributes.cs
+ShipEngineSDK/Model/RateDetailType.cs
ShipEngineSDK/Model/RateEstimate.cs
ShipEngineSDK/Model/RateEstimateByCarrierId.cs
ShipEngineSDK/Model/RateEstimateByCarrierIds.cs
@@ -254,6 +261,7 @@ ShipEngineSDK/Model/RateRequestOptions.cs
ShipEngineSDK/Model/RateRequestRateOptions.cs
ShipEngineSDK/Model/RateResponse.cs
ShipEngineSDK/Model/RateResponseStatus.cs
+ShipEngineSDK/Model/RateShipmentRequest.cs
ShipEngineSDK/Model/RateType.cs
ShipEngineSDK/Model/RatesInformation.cs
ShipEngineSDK/Model/ReasonCode.cs
@@ -272,13 +280,16 @@ ShipEngineSDK/Model/ShipmentRequest.cs
ShipEngineSDK/Model/ShipmentStatus.cs
ShipEngineSDK/Model/ShipmentsSortBy.cs
ShipEngineSDK/Model/ShippingAddress.cs
+ShipEngineSDK/Model/ShippingAddressFrom.cs
ShipEngineSDK/Model/ShippingAddressTo.cs
ShipEngineSDK/Model/SmartPostHub.cs
ShipEngineSDK/Model/SortDir.cs
ShipEngineSDK/Model/StatusCode.cs
+ShipEngineSDK/Model/StatusDetailCode.cs
ShipEngineSDK/Model/Tag.cs
ShipEngineSDK/Model/TagShipmentResponseBody.cs
ShipEngineSDK/Model/TaxIdentifier.cs
+ShipEngineSDK/Model/TaxType.cs
ShipEngineSDK/Model/TaxableEntityType.cs
ShipEngineSDK/Model/TokensGetEphemeralTokenResponseBodyYaml.cs
ShipEngineSDK/Model/TrackEvent.cs
@@ -316,3 +327,331 @@ ShipEngineSDK/Model/WebhookEvent.cs
ShipEngineSDK/Model/WebhookHeader.cs
ShipEngineSDK/Model/Weight.cs
ShipEngineSDK/Model/WeightUnit.cs
+docs/apis/AccountApi.md
+docs/apis/AddressesApi.md
+docs/apis/BatchesApi.md
+docs/apis/CarrierAccountsApi.md
+docs/apis/CarriersApi.md
+docs/apis/DownloadsApi.md
+docs/apis/InsuranceApi.md
+docs/apis/LabelsApi.md
+docs/apis/ManifestsApi.md
+docs/apis/PackagePickupsApi.md
+docs/apis/PackageTypesApi.md
+docs/apis/RatesApi.md
+docs/apis/ServicePointsApi.md
+docs/apis/ShipmentsApi.md
+docs/apis/TagsApi.md
+docs/apis/TokensApi.md
+docs/apis/TrackingApi.md
+docs/apis/WarehousesApi.md
+docs/apis/WebhooksApi.md
+docs/models/AccountSettings.md
+docs/models/AccountSettingsImages.md
+docs/models/AddFundsToCarrierRequestBody.md
+docs/models/AddFundsToCarrierResponseBody.md
+docs/models/AddFundsToInsuranceRequestBody.md
+docs/models/AddFundsToInsuranceResponseBody.md
+docs/models/AddToBatchRequestBody.md
+docs/models/Address.md
+docs/models/AddressResidentialIndicator.md
+docs/models/AddressToValidate.md
+docs/models/AddressValidatingShipment.md
+docs/models/AddressValidationCode.md
+docs/models/AddressValidationDetailCode.md
+docs/models/AddressValidationMessageType.md
+docs/models/AddressValidationResult.md
+docs/models/AddressValidationStatus.md
+docs/models/AdvancedShipmentOptions.md
+docs/models/AdvancedShipmentOptionsDangerousGoodsContact.md
+docs/models/AdvancedShipmentOptionsFedexFreight.md
+docs/models/AdvancedShipmentOptionsWindsorFrameworkDetails.md
+docs/models/AllowedIncoterms.md
+docs/models/AlternativeIdentifier.md
+docs/models/AlternativeIdentifiers.md
+docs/models/AncillaryServiceEndorsement.md
+docs/models/Batch.md
+docs/models/BatchResponseError.md
+docs/models/BatchStatus.md
+docs/models/BatchesSortBy.md
+docs/models/BillToParty.md
+docs/models/BulkRate.md
+docs/models/CalculateRatesRequestBody.md
+docs/models/CalculateRatesResponseBody.md
+docs/models/Carrier.md
+docs/models/CarrierAdvancedOption.md
+docs/models/CarrierName.md
+docs/models/CarrierNameWithSettings.md
+docs/models/CollectOnDelivery.md
+docs/models/CollectOnDeliveryPaymentType.md
+docs/models/CompareBulkRatesRequestBody.md
+docs/models/ConnectAccessWorldwideRequestBody.md
+docs/models/ConnectAmazonBuyShippingRequestBody.md
+docs/models/ConnectAmazonShippingUk.md
+docs/models/ConnectApcRequestBody.md
+docs/models/ConnectAsendiaRequestBody.md
+docs/models/ConnectAustraliaPostRequestBody.md
+docs/models/ConnectCanadaPostRequestBody.md
+docs/models/ConnectCarrierRequestBody.md
+docs/models/ConnectCarrierResponseBody.md
+docs/models/ConnectDhlEcommerceRequestBody.md
+docs/models/ConnectDhlExpressAuRequestBody.md
+docs/models/ConnectDhlExpressCaRequestBody.md
+docs/models/ConnectDhlExpressRequestBody.md
+docs/models/ConnectDhlExpressUkRequestBody.md
+docs/models/ConnectDpdRequestBody.md
+docs/models/ConnectEndiciaRequestBody.md
+docs/models/ConnectFedexRequestBody.md
+docs/models/ConnectFedexUkRequestBody.md
+docs/models/ConnectFirstmileRequestBody.md
+docs/models/ConnectImexRequestBody.md
+docs/models/ConnectInsurerRequestBody.md
+docs/models/ConnectLasershipRequestBody.md
+docs/models/ConnectNewgisticsRequestBody.md
+docs/models/ConnectOntracRequestBody.md
+docs/models/ConnectPurolatorRequestBody.md
+docs/models/ConnectRoyalMailRequestBody.md
+docs/models/ConnectRrDonnelleyRequestBody.md
+docs/models/ConnectSekoRequestBody.md
+docs/models/ConnectSendleRequestBody.md
+docs/models/ConnectStampsRequestBody.md
+docs/models/ConnectUpsRequestBody.md
+docs/models/ContactDetails.md
+docs/models/CreateAccountSettingsImageRequestBody.md
+docs/models/CreateAndProcessBatchRequestBody.md
+docs/models/CreateAndProcessBatchRequestBodyProcessLabels.md
+docs/models/CreateAndValidateShipment.md
+docs/models/CreateBatchRequest.md
+docs/models/CreateBatchRequestBody.md
+docs/models/CreateBatchResponseBody.md
+docs/models/CreateLabelFromRateRequestBody.md
+docs/models/CreateLabelFromRateResponseBody.md
+docs/models/CreateLabelFromShipmentRequestBody.md
+docs/models/CreateLabelFromShipmentResponseBody.md
+docs/models/CreateLabelRequestBody.md
+docs/models/CreateLabelResponseBody.md
+docs/models/CreateManifestByObjectRequestBody.md
+docs/models/CreateManifestLabelIdsRequestBody.md
+docs/models/CreateManifestRequestBody.md
+docs/models/CreateManifestResponseBody.md
+docs/models/CreatePackageTypeRequestBody.md
+docs/models/CreatePackageTypeResponseBody.md
+docs/models/CreateReturnLabelRequestBody.md
+docs/models/CreateReturnLabelResponseBody.md
+docs/models/CreateShipmentResponseBodyFields.md
+docs/models/CreateShipmentsRequestBody.md
+docs/models/CreateShipmentsResponseBody.md
+docs/models/CreateTagResponseBody.md
+docs/models/CreateWarehouseRequestBody.md
+docs/models/CreateWarehouseResponseBody.md
+docs/models/CreateWebhookRequestBody.md
+docs/models/CreateWebhookResponseBody.md
+docs/models/CustomsItem.md
+docs/models/DangerousAmount.md
+docs/models/DangerousGoods.md
+docs/models/DefaultLabelLayout.md
+docs/models/DeletePickupByIdResponseBody.md
+docs/models/DeleteScheduledPickupResponseBody.md
+docs/models/DeliveryConfirmation.md
+docs/models/DeprecatedManifest.md
+docs/models/DhlExpressAccountSettings.md
+docs/models/DhlExpressSettingsResponseBody.md
+docs/models/DimensionUnit.md
+docs/models/Dimensions.md
+docs/models/DisplayScheme.md
+docs/models/Error.md
+docs/models/ErrorCode.md
+docs/models/ErrorResponseBody.md
+docs/models/ErrorSource.md
+docs/models/ErrorType.md
+docs/models/ErrorWithLabelIdResponseBody.md
+docs/models/EstimateRatesRequestBody.md
+docs/models/FedexAccountSettings.md
+docs/models/FedexAccountSettingsRequestBody.md
+docs/models/FedexPickupType.md
+docs/models/FedexSettingsResponseBody.md
+docs/models/GetAccountSettingsImagesResponseBody.md
+docs/models/GetAccountSettingsResponseBody.md
+docs/models/GetBatchByExternalIdResponseBody.md
+docs/models/GetBatchByIdResponseBody.md
+docs/models/GetCarrierByIdResponseBody.md
+docs/models/GetCarrierOptionsResponseBody.md
+docs/models/GetCarrierSettingsResponseBody.md
+docs/models/GetCarriersResponseBody.md
+docs/models/GetInsuranceBalanceResponseBody.md
+docs/models/GetLabelByExternalShipmentIdResponseBody.md
+docs/models/GetLabelByIdResponseBody.md
+docs/models/GetManifestByIdResponseBody.md
+docs/models/GetPackageTypeByIdResponseBody.md
+docs/models/GetPickupByIdResponseBody.md
+docs/models/GetPickupsResponseBody.md
+docs/models/GetRateByIdResponseBody.md
+docs/models/GetServicePointByIdResponseBody.md
+docs/models/GetServicePointByIdResponseBodyServicePoint.md
+docs/models/GetServicePointsRequest.md
+docs/models/GetServicePointsRequestBody.md
+docs/models/GetServicePointsRequestBodyAddress.md
+docs/models/GetServicePointsRequestBodyProvidersInner.md
+docs/models/GetServicePointsRequestBodyShipment.md
+docs/models/GetServicePointsRequestBodyShipmentPackagesInner.md
+docs/models/GetShipmentByExternalIdResponseBody.md
+docs/models/GetShipmentByIdResponseBody.md
+docs/models/GetTrackingLogFromLabelResponseBody.md
+docs/models/GetTrackingLogResponseBody.md
+docs/models/GetWarehouseByIdResponseBody.md
+docs/models/GetWebhookByIdResponseBody.md
+docs/models/IdentifierType.md
+docs/models/ImporterOfRecords.md
+docs/models/InsuranceProvider.md
+docs/models/InternationalShipmentOptions.md
+docs/models/InvoiceAdditionalDetails.md
+docs/models/Label.md
+docs/models/LabelChargeEvent.md
+docs/models/LabelDownload.md
+docs/models/LabelDownloadType.md
+docs/models/LabelFormat.md
+docs/models/LabelLayout.md
+docs/models/LabelMessages.md
+docs/models/LabelPackage.md
+docs/models/LabelPackagesInner.md
+docs/models/LabelRequest.md
+docs/models/LabelStatus.md
+docs/models/Link.md
+docs/models/ListAccountImagesResponseBody.md
+docs/models/ListAccountSettingsBody.md
+docs/models/ListAccountSettingsImagesResponseBody.md
+docs/models/ListBatchErrorsResponseBody.md
+docs/models/ListBatchesResponseBody.md
+docs/models/ListCarrierPackageTypesResponseBody.md
+docs/models/ListCarrierServicesResponseBody.md
+docs/models/ListCarriersResponseBody.md
+docs/models/ListLabelsResponseBody.md
+docs/models/ListManifestsResponseBody.md
+docs/models/ListPackageTypesResponseBody.md
+docs/models/ListPickupResponseBody.md
+docs/models/ListServicePointsResponseBody.md
+docs/models/ListServicePointsResponseBodyServicePointsInner.md
+docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.md
+docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md
+docs/models/ListShipmentRatesResponseBody.md
+docs/models/ListShipmentsResponseBody.md
+docs/models/ListTagsResponseBody.md
+docs/models/ListWarehousesResponseBody.md
+docs/models/Manifest.md
+docs/models/ManifestDownload.md
+docs/models/ManifestRequest.md
+docs/models/ManifestRequestStatus.md
+docs/models/Manifests.md
+docs/models/ManifestsRequests.md
+docs/models/ModifyBatch.md
+docs/models/MonetaryValue.md
+docs/models/NonDelivery.md
+docs/models/OptionalLink.md
+docs/models/OrderSourceName.md
+docs/models/OriginType.md
+docs/models/Package.md
+docs/models/PackageContents.md
+docs/models/PackageType.md
+docs/models/PackagingGroup.md
+docs/models/PackagingInstructionSection.md
+docs/models/PagedListResponseBody.md
+docs/models/PaginationLink.md
+docs/models/PaperlessDownload.md
+docs/models/ParseAddressRequestBody.md
+docs/models/ParseAddressResponseBody.md
+docs/models/ParseShipmentRequestBody.md
+docs/models/ParseShipmentResponseBody.md
+docs/models/PartialAddress.md
+docs/models/PartialShipment.md
+docs/models/PartialShippingAddress.md
+docs/models/PartialShippingAddressTo.md
+docs/models/PartialShippingAddressToGeolocationInner.md
+docs/models/PaymentAmount.md
+docs/models/Pickup.md
+docs/models/PickupResponseBody.md
+docs/models/PickupWindow.md
+docs/models/PickupWindows.md
+docs/models/ProcessBatchRequestBody.md
+docs/models/Products.md
+docs/models/PurchaseLabelWithoutShipment.md
+docs/models/Rate.md
+docs/models/RateDetail.md
+docs/models/RateDetailAttributes.md
+docs/models/RateDetailType.md
+docs/models/RateEstimate.md
+docs/models/RateEstimateByCarrierId.md
+docs/models/RateEstimateByCarrierIds.md
+docs/models/RateEstimateOptions.md
+docs/models/RateRequestBody.md
+docs/models/RateRequestByShipmentIds.md
+docs/models/RateRequestByShipments.md
+docs/models/RateRequestOptions.md
+docs/models/RateRequestRateOptions.md
+docs/models/RateResponse.md
+docs/models/RateResponseStatus.md
+docs/models/RateShipmentRequest.md
+docs/models/RateType.md
+docs/models/RatesInformation.md
+docs/models/ReasonCode.md
+docs/models/RecognizedEntity.md
+docs/models/Redirect.md
+docs/models/RegulationLevel.md
+docs/models/RemoveFromBatchRequestBody.md
+docs/models/ResponseMessage.md
+docs/models/SchedulePickupRequestBody.md
+docs/models/SchedulePickupResponseBody.md
+docs/models/Service.md
+docs/models/Shipment.md
+docs/models/ShipmentIdRequest.md
+docs/models/ShipmentItem.md
+docs/models/ShipmentRequest.md
+docs/models/ShipmentStatus.md
+docs/models/ShipmentsSortBy.md
+docs/models/ShippingAddress.md
+docs/models/ShippingAddressFrom.md
+docs/models/ShippingAddressTo.md
+docs/models/SmartPostHub.md
+docs/models/SortDir.md
+docs/models/StatusCode.md
+docs/models/StatusDetailCode.md
+docs/models/Tag.md
+docs/models/TagShipmentResponseBody.md
+docs/models/TaxIdentifier.md
+docs/models/TaxType.md
+docs/models/TaxableEntityType.md
+docs/models/TokensGetEphemeralTokenResponseBodyYaml.md
+docs/models/TrackEvent.md
+docs/models/TrackingInformation.md
+docs/models/TrackingStatus.md
+docs/models/TransportMean.md
+docs/models/UpdateAccountSettingsImageRequestBody.md
+docs/models/UpdateAmazonBuyShippingRequestBody.md
+docs/models/UpdateCarrierSettingsRequestBody.md
+docs/models/UpdateDhlExpressSettingsRequestBody.md
+docs/models/UpdateFedexSettingsRequestBody.md
+docs/models/UpdateNewgisticsSettingsRequestBody.md
+docs/models/UpdatePackageTypeRequestBody.md
+docs/models/UpdateShipmentFields.md
+docs/models/UpdateShipmentRequestBody.md
+docs/models/UpdateShipmentResponseBody.md
+docs/models/UpdateShipmentsTags.md
+docs/models/UpdateShipmentsTagsRequestBody.md
+docs/models/UpdateShipmentsTagsShipmentsTagsInner.md
+docs/models/UpdateUpsSettingsRequestBody.md
+docs/models/UpdateWarehouseRequestBody.md
+docs/models/UpdateWarehouseSettingsRequestBody.md
+docs/models/UpdateWebhookRequestBody.md
+docs/models/UpsAccountSettings.md
+docs/models/UpsInvoice.md
+docs/models/UpsPickupType.md
+docs/models/UpsSettingsResponseBody.md
+docs/models/ValidateAddress.md
+docs/models/ValidateShipmentFields.md
+docs/models/ValidationStatus.md
+docs/models/VoidLabelResponseBody.md
+docs/models/Warehouse.md
+docs/models/Webhook.md
+docs/models/WebhookEvent.md
+docs/models/WebhookHeader.md
+docs/models/Weight.md
+docs/models/WeightUnit.md
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1ef560e..4a5f2499 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -209,3 +209,17 @@ Fixed handling of No Content responses
### Added
- Added SP code TrackingStatusCode
+
+## 3.0.0
+
+### Added
+
+- Created new SDK methods for the entire ShipEngine API
+- Added ability to scope request modifiers by using the `.WithRequestModifier()` method instead of the `.ModifyRequest` property.
+ This will allow consumers to modify a single request without affecting any other consumers of the client. It also allows for
+ multiple modifiers to be added. For example, a modifier could be added at the global level that applies to all requests and then
+ another modifier can be added for a single request.
+
+### Changed
+
+- Marked v2 methods as obsolete
diff --git a/README.md b/README.md
index b018e03e..05833c50 100644
--- a/README.md
+++ b/README.md
@@ -30,18 +30,137 @@ using ShipEngineSDK;
var shipengine = new ShipEngine("___YOUR_API_KEY_HERE__");
```
+
+## Overview
+
+This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 1.1.202501091801
+- SDK version: 3.0.0
+- Generator version: 7.7.0
+- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
+ For more information, please visit [https://www.shipengine.com/contact/](https://www.shipengine.com/contact/)
+
+
+## Frameworks supported
+- .NET Standard >=2.0
+- .NET Core >=2.0
+- .NET Framework >=4.6.2
+
+
## Methods
-- [`CreateLabelFromRate`](./docs/CreateLabelFromRate.md) - When retrieving rates for shipments using the `GetRatesWithShipmentDetails` method, the returned information contains a `RateId` property that can be used to purchase a label without having to refill in the shipment information repeatedly.
-- [`CreateLabelFromShipmentDetails`](./docs/CreateLabelFromShipmentDetails.md) - Purchase and print a label for shipment.
-- [`GetRatesWithShipmentDetails`](./docs/GetRatesWithShipmentDetails.md) - Given some shipment details and rate options, this method returns a list of rate quotes.
-- [`ListCarriers`](./docs/ListCarriers.md) - Returns a list of carrier accounts that have been connected through
+API | Method | Description
+------------ | ------------- | -------------
+*Account* | [**CreateAccountImage**](docs//apis/AccountApi.md#createaccountimage) | Create an Account Image
+*Account* | [**DeleteAccountImageById**](docs//apis/AccountApi.md#deleteaccountimagebyid) | Delete Account Image By Id
+*Account* | [**GetAccountSettingsImagesById**](docs//apis/AccountApi.md#getaccountsettingsimagesbyid) | Get Account Image By ID
+*Account* | [**ListAccountImages**](docs//apis/AccountApi.md#listaccountimages) | List Account Images
+*Account* | [**ListAccountSettings**](docs//apis/AccountApi.md#listaccountsettings) | List Account Settings
+*Account* | [**UpdateAccountSettingsImagesById**](docs//apis/AccountApi.md#updateaccountsettingsimagesbyid) | Update Account Image By ID
+*Addresses* | [**ParseAddress**](docs//apis/AddressesApi.md#parseaddress) | Parse an address
+*Addresses* | [**ValidateAddress**](docs//apis/AddressesApi.md#validateaddress) | Validate An Address
+*Batches* | [**AddToBatch**](docs//apis/BatchesApi.md#addtobatch) | Add to a Batch
+*Batches* | [**CreateBatch**](docs//apis/BatchesApi.md#createbatch) | Create A Batch
+*Batches* | [**DeleteBatch**](docs//apis/BatchesApi.md#deletebatch) | Delete Batch By Id
+*Batches* | [**GetBatchByExternalId**](docs//apis/BatchesApi.md#getbatchbyexternalid) | Get Batch By External ID
+*Batches* | [**GetBatchById**](docs//apis/BatchesApi.md#getbatchbyid) | Get Batch By ID
+*Batches* | [**ListBatchErrors**](docs//apis/BatchesApi.md#listbatcherrors) | Get Batch Errors
+*Batches* | [**ListBatches**](docs//apis/BatchesApi.md#listbatches) | List Batches
+*Batches* | [**ProcessBatch**](docs//apis/BatchesApi.md#processbatch) | Process Batch ID Labels
+*Batches* | [**RemoveFromBatch**](docs//apis/BatchesApi.md#removefrombatch) | Remove From Batch
+*Batches* | [**UpdateBatch**](docs//apis/BatchesApi.md#updatebatch) | Update Batch By Id
+*CarrierAccounts* | [**ConnectCarrier**](docs//apis/CarrierAccountsApi.md#connectcarrier) | Connect a carrier account
+*CarrierAccounts* | [**DisconnectCarrier**](docs//apis/CarrierAccountsApi.md#disconnectcarrier) | Disconnect a carrier
+*CarrierAccounts* | [**GetCarrierSettings**](docs//apis/CarrierAccountsApi.md#getcarriersettings) | Get carrier settings
+*CarrierAccounts* | [**UpdateCarrierSettings**](docs//apis/CarrierAccountsApi.md#updatecarriersettings) | Update carrier settings
+*Carriers* | [**AddFundsToCarrier**](docs//apis/CarriersApi.md#addfundstocarrier) | Add Funds To Carrier
+*Carriers* | [**DisconnectCarrierById**](docs//apis/CarriersApi.md#disconnectcarrierbyid) | Disconnect Carrier by ID
+*Carriers* | [**GetCarrierById**](docs//apis/CarriersApi.md#getcarrierbyid) | Get Carrier By ID
+*Carriers* | [**GetCarrierOptions**](docs//apis/CarriersApi.md#getcarrieroptions) | Get Carrier Options
+*Carriers* | [**ListCarrierPackageTypes**](docs//apis/CarriersApi.md#listcarrierpackagetypes) | List Carrier Package Types
+*Carriers* | [**ListCarrierServices**](docs//apis/CarriersApi.md#listcarrierservices) | List Carrier Services
+*Carriers* | [**ListCarriers**](docs//apis/CarriersApi.md#listcarriers) | List Carriers
+*Downloads* | [**DownloadFile**](docs//apis/DownloadsApi.md#downloadfile) | Download File
+*Insurance* | [**AddFundsToInsurance**](docs//apis/InsuranceApi.md#addfundstoinsurance) | Add Funds To Insurance
+*Insurance* | [**ConnectInsurer**](docs//apis/InsuranceApi.md#connectinsurer) | Connect a Shipsurance Account
+*Insurance* | [**DisconnectInsurer**](docs//apis/InsuranceApi.md#disconnectinsurer) | Disconnect a Shipsurance Account
+*Insurance* | [**GetInsuranceBalance**](docs//apis/InsuranceApi.md#getinsurancebalance) | Get Insurance Funds Balance
+*Labels* | [**CreateLabel**](docs//apis/LabelsApi.md#createlabel) | Purchase Label
+*Labels* | [**CreateLabelFromRate**](docs//apis/LabelsApi.md#createlabelfromrate) | Purchase Label with Rate ID
+*Labels* | [**CreateLabelFromShipment**](docs//apis/LabelsApi.md#createlabelfromshipment) | Purchase Label with Shipment ID
+*Labels* | [**CreateReturnLabel**](docs//apis/LabelsApi.md#createreturnlabel) | Create a return label
+*Labels* | [**GetLabelByExternalShipmentId**](docs//apis/LabelsApi.md#getlabelbyexternalshipmentid) | Get Label By External Shipment ID
+*Labels* | [**GetLabelById**](docs//apis/LabelsApi.md#getlabelbyid) | Get Label By ID
+*Labels* | [**GetTrackingLogFromLabel**](docs//apis/LabelsApi.md#gettrackinglogfromlabel) | Get Label Tracking Information
+*Labels* | [**ListLabels**](docs//apis/LabelsApi.md#listlabels) | List labels
+*Labels* | [**VoidLabel**](docs//apis/LabelsApi.md#voidlabel) | Void a Label By ID
+*Manifests* | [**CreateManifest**](docs//apis/ManifestsApi.md#createmanifest) | Create Manifest
+*Manifests* | [**GetManifestById**](docs//apis/ManifestsApi.md#getmanifestbyid) | Get Manifest By Id
+*Manifests* | [**GetManifestRequestById**](docs//apis/ManifestsApi.md#getmanifestrequestbyid) | Get Manifest Request By Id
+*Manifests* | [**ListManifests**](docs//apis/ManifestsApi.md#listmanifests) | List Manifests
+*PackagePickups* | [**DeleteScheduledPickup**](docs//apis/PackagePickupsApi.md#deletescheduledpickup) | Delete a Scheduled Pickup
+*PackagePickups* | [**GetPickupById**](docs//apis/PackagePickupsApi.md#getpickupbyid) | Get Pickup By ID
+*PackagePickups* | [**ListScheduledPickups**](docs//apis/PackagePickupsApi.md#listscheduledpickups) | List Scheduled Pickups
+*PackagePickups* | [**SchedulePickup**](docs//apis/PackagePickupsApi.md#schedulepickup) | Schedule a Pickup
+*PackageTypes* | [**CreatePackageType**](docs//apis/PackageTypesApi.md#createpackagetype) | Create Custom Package Type
+*PackageTypes* | [**DeletePackageType**](docs//apis/PackageTypesApi.md#deletepackagetype) | Delete A Custom Package By ID
+*PackageTypes* | [**GetPackageTypeById**](docs//apis/PackageTypesApi.md#getpackagetypebyid) | Get Custom Package Type By ID
+*PackageTypes* | [**ListPackageTypes**](docs//apis/PackageTypesApi.md#listpackagetypes) | List Custom Package Types
+*PackageTypes* | [**UpdatePackageType**](docs//apis/PackageTypesApi.md#updatepackagetype) | Update Custom Package Type By ID
+*Rates* | [**CalculateRates**](docs//apis/RatesApi.md#calculaterates) | Get Shipping Rates
+*Rates* | [**CompareBulkRates**](docs//apis/RatesApi.md#comparebulkrates) | Get Bulk Rates
+*Rates* | [**EstimateRates**](docs//apis/RatesApi.md#estimaterates) | Estimate Rates
+*Rates* | [**GetRateById**](docs//apis/RatesApi.md#getratebyid) | Get Rate By ID
+*ServicePoints* | [**ServicePointsGetById**](docs//apis/ServicePointsApi.md#servicepointsgetbyid) | Get Service Point By ID
+*ServicePoints* | [**ServicePointsList**](docs//apis/ServicePointsApi.md#servicepointslist) | List Service Points
+*Shipments* | [**CancelShipments**](docs//apis/ShipmentsApi.md#cancelshipments) | Cancel a Shipment
+*Shipments* | [**CreateShipments**](docs//apis/ShipmentsApi.md#createshipments) | Create Shipments
+*Shipments* | [**GetShipmentByExternalId**](docs//apis/ShipmentsApi.md#getshipmentbyexternalid) | Get Shipment By External ID
+*Shipments* | [**GetShipmentById**](docs//apis/ShipmentsApi.md#getshipmentbyid) | Get Shipment By ID
+*Shipments* | [**ListShipmentRates**](docs//apis/ShipmentsApi.md#listshipmentrates) | Get Shipment Rates
+*Shipments* | [**ListShipments**](docs//apis/ShipmentsApi.md#listshipments) | List Shipments
+*Shipments* | [**ParseShipment**](docs//apis/ShipmentsApi.md#parseshipment) | Parse shipping info
+*Shipments* | [**ShipmentsListTags**](docs//apis/ShipmentsApi.md#shipmentslisttags) | Get Shipment Tags
+*Shipments* | [**ShipmentsUpdateTags**](docs//apis/ShipmentsApi.md#shipmentsupdatetags) | Update Shipments Tags
+*Shipments* | [**TagShipment**](docs//apis/ShipmentsApi.md#tagshipment) | Add Tag to Shipment
+*Shipments* | [**UntagShipment**](docs//apis/ShipmentsApi.md#untagshipment) | Remove Tag from Shipment
+*Shipments* | [**UpdateShipment**](docs//apis/ShipmentsApi.md#updateshipment) | Update Shipment By ID
+*Tags* | [**CreateTag**](docs//apis/TagsApi.md#createtag) | Create a New Tag
+*Tags* | [**DeleteTag**](docs//apis/TagsApi.md#deletetag) | Delete Tag
+*Tags* | [**ListTags**](docs//apis/TagsApi.md#listtags) | Get Tags
+*Tags* | [**RenameTag**](docs//apis/TagsApi.md#renametag) | Update Tag Name
+*Tokens* | [**TokensGetEphemeralToken**](docs//apis/TokensApi.md#tokensgetephemeraltoken) | Get Ephemeral Token
+*Tracking* | [**GetTrackingLog**](docs//apis/TrackingApi.md#gettrackinglog) | Get Tracking Information
+*Tracking* | [**StartTracking**](docs//apis/TrackingApi.md#starttracking) | Start Tracking a Package
+*Tracking* | [**StopTracking**](docs//apis/TrackingApi.md#stoptracking) | Stop Tracking a Package
+*Warehouses* | [**CreateWarehouse**](docs//apis/WarehousesApi.md#createwarehouse) | Create Warehouse
+*Warehouses* | [**DeleteWarehouse**](docs//apis/WarehousesApi.md#deletewarehouse) | Delete Warehouse By ID
+*Warehouses* | [**GetWarehouseById**](docs//apis/WarehousesApi.md#getwarehousebyid) | Get Warehouse By Id
+*Warehouses* | [**ListWarehouses**](docs//apis/WarehousesApi.md#listwarehouses) | List Warehouses
+*Warehouses* | [**UpdateWarehouse**](docs//apis/WarehousesApi.md#updatewarehouse) | Update Warehouse By Id
+*Warehouses* | [**UpdateWarehouseSettings**](docs//apis/WarehousesApi.md#updatewarehousesettings) | Update Warehouse Settings
+*Webhooks* | [**CreateWebhook**](docs//apis/WebhooksApi.md#createwebhook) | Create a Webhook
+*Webhooks* | [**DeleteWebhook**](docs//apis/WebhooksApi.md#deletewebhook) | Delete Webhook By ID
+*Webhooks* | [**GetWebhookById**](docs//apis/WebhooksApi.md#getwebhookbyid) | Get Webhook By ID
+*Webhooks* | [**ListWebhooks**](docs//apis/WebhooksApi.md#listwebhooks) | List Webhooks
+*Webhooks* | [**UpdateWebhook**](docs//apis/WebhooksApi.md#updatewebhook) | Update a Webhook
+
+
+## Legacy Methods
+
+These methods have been deprecated in favor of the methods listed above, but are still in the SDK.
+
+- [`CreateLabelFromRate`](./docs/legacy/CreateLabelFromRate.md) - When retrieving rates for shipments using the `GetRatesWithShipmentDetails` method, the returned information contains a `RateId` property that can be used to purchase a label without having to refill in the shipment information repeatedly.
+- [`CreateLabelFromShipmentDetails`](./docs/legacy/CreateLabelFromShipmentDetails.md) - Purchase and print a label for shipment.
+- [`GetRatesWithShipmentDetails`](./docs/legacy/GetRatesWithShipmentDetails.md) - Given some shipment details and rate options, this method returns a list of rate quotes.
+- [`ListCarriers`](./docs/legacy/ListCarriers.md) - Returns a list of carrier accounts that have been connected through
the [ShipEngine dashboard](https://www.shipengine.com/docs/carriers/setup/).
-- [`TrackUsingLabelId`](./docs/TrackUsingLabelId.md) - Track a package by its associated label ID.
-- [`TrackUsingCarrierCodeAndTrackingNumber`](./docs/TrackUsingCarrierCodeAndTrackingNumber.md) - Track a package for a given carrier and tracking number.
-- [`ValidateAddresses`](./docs/ValidateAddresses.md) - Indicates whether the provided addresses are valid. If the addresses are valid, the method returns a normalized version based on the standards of the country in which the address resides. If an address cannot be normalized, an error is returned.
-- [`VoidLabelWithLabelId`](./docs/VoidLabelWithLabelId.md) - Void a label with its Label ID.
-- [`CreateManifests`](./docs/CreateManifest.md) - Create a shipment manifest.
+- [`TrackUsingLabelId`](./docs/legacy/TrackUsingLabelId.md) - Track a package by its associated label ID.
+- [`TrackUsingCarrierCodeAndTrackingNumber`](./docs/legacy/TrackUsingCarrierCodeAndTrackingNumber.md) - Track a package for a given carrier and tracking number.
+- [`ValidateAddresses`](./docs/legacy/ValidateAddresses.md) - Indicates whether the provided addresses are valid. If the addresses are valid, the method returns a normalized version based on the standards of the country in which the address resides. If an address cannot be normalized, an error is returned.
+- [`VoidLabelWithLabelId`](./docs/legacy/VoidLabelWithLabelId.md) - Void a label with its Label ID.
+- [`CreateManifests`](./docs/legacy/CreateManifest.md) - Create a shipment manifest.
## Contributing
@@ -54,7 +173,7 @@ To build the project locally on your computer:
1. **Clone this repo**
`git clone https://github.com/ShipEngine/shipengine-dotnet.git`
-2. **Install [.NET 5.x](https://dotnet.microsoft.com/download)**
+2. **Install [.NET 8.x](https://dotnet.microsoft.com/download)**
3. **Install dependencies**
`dotnet restore`
@@ -68,7 +187,7 @@ To build the project locally on your computer:
6. **Run the tests**
`dotnet test`
By default, the test project targets all supported frameworks, if your environment only supports a subset then you can specify in the CLI.
- `dotnet test -f net5.0`
+ `dotnet test -f net8.0`
### Generating from OpenAPI
diff --git a/ShipEngineSDK.Test/Helpers/MockShipEngineFixture.cs b/ShipEngineSDK.Test/Helpers/MockShipEngineFixture.cs
index 4de07ebd..0d023261 100644
--- a/ShipEngineSDK.Test/Helpers/MockShipEngineFixture.cs
+++ b/ShipEngineSDK.Test/Helpers/MockShipEngineFixture.cs
@@ -21,10 +21,8 @@ public MockShipEngineFixture(Config config)
};
HttpClient = new HttpClient(MockHandler.Object);
- ShipEngine = new ShipEngine(config)
- {
- _client = ShipEngineClient.ConfigureHttpClient(config, HttpClient)
- };
+ var client = ShipEngineClient.ConfigureHttpClient(config, HttpClient);
+ ShipEngine = new ShipEngine(config, client);
JsonSerializerOptions = new JsonSerializerOptions()
{
diff --git a/ShipEngineSDK.Test/SerializationTests.cs b/ShipEngineSDK.Test/SerializationTests.cs
new file mode 100644
index 00000000..519b652c
--- /dev/null
+++ b/ShipEngineSDK.Test/SerializationTests.cs
@@ -0,0 +1,235 @@
+namespace ShipEngineSDK.Test
+{
+ using Model;
+ using System;
+ using System.Collections.Generic;
+ using System.Text.Json;
+ using Xunit;
+
+ public class SerializationTests
+ {
+ public class WithGenericModel
+ {
+ public class WithReadOnlyProperties
+ {
+ [Fact]
+ public void WhenSerializing_ItShouldIgnoreReadOnlyProperties()
+ {
+ var batch = new Batch
+ {
+ BatchLabelsUrl = new OptionalLink { Href = "http://example.com/labels" },
+ BatchShipmentsUrl = new OptionalLink { Href = "http://example.com/shipments" }
+ };
+
+ var result = JsonSerializer.Serialize(batch, ShipEngineClient.JsonSerializerOptions);
+
+ Assert.Equal(@"{
+ ""batch_labels_url"": {
+ ""href"": ""http://example.com/labels""
+ },
+ ""batch_shipments_url"": {
+ ""href"": ""http://example.com/shipments""
+ }
+}", result);
+ }
+
+ [Fact]
+ public void WhenDeserializing_ItIncludeReadOnlyProperties()
+ {
+ const string json = @"{
+ ""label_format"": ""png"",
+ ""label_layout"": ""letter"",
+ ""status"": ""open"",
+ ""batch_labels_url"": {
+ ""href"": ""http://example.com/labels""
+ },
+ ""batch_shipments_url"": {
+ ""href"": ""http://example.com/shipments""
+ }
+ }";
+
+ var batch = JsonSerializer.Deserialize(json, ShipEngineClient.JsonSerializerOptions);
+
+ Assert.Equal(LabelFormat.Png, batch.LabelFormat);
+ Assert.Equal(LabelLayout.Letter, batch.LabelLayout);
+ Assert.Equal(BatchStatus.Open, batch.Status);
+ Assert.Equal("http://example.com/labels", batch.BatchLabelsUrl.Href);
+ Assert.Equal("http://example.com/shipments", batch.BatchShipmentsUrl.Href);
+ }
+ }
+
+ public class WithWriteOnlyProperties
+ {
+ [Fact]
+ public void WhenSerializing_ItShouldIncludeWriteOnlyProperties()
+ {
+ var pickup = new SchedulePickupRequestBody
+ {
+ PickupWindow = new PickupWindow
+ {
+ StartAt = new DateTimeOffset(2024, 7, 17, 12, 27, 35, TimeSpan.Zero),
+ EndAt = new DateTimeOffset(2024, 7, 19, 12, 27, 35, TimeSpan.Zero),
+ },
+ ContactDetails = new ContactDetails
+ {
+ Name = "John Doe",
+ Email = "jdoe@example.com",
+ Phone = "314-555-1234"
+ },
+ LabelIds = new List { "se-1234567" }
+ };
+
+ var result = JsonSerializer.Serialize(pickup, ShipEngineClient.JsonSerializerOptions);
+
+ Assert.Equal(@"{
+ ""contact_details"": {
+ ""email"": ""jdoe@example.com"",
+ ""name"": ""John Doe"",
+ ""phone"": ""314-555-1234""
+ },
+ ""label_ids"": [
+ ""se-1234567""
+ ],
+ ""pickup_window"": {
+ ""end_at"": ""2024-07-19T12:27:35+00:00"",
+ ""start_at"": ""2024-07-17T12:27:35+00:00""
+ }
+}", result);
+ }
+
+ [Fact]
+ public void WhenDeserializing_ItShouldNotIncludeWriteOnlyProperties()
+ {
+ var json = @"{
+ ""label_download_type"": ""inline"",
+ ""label_format"": ""png""
+}";
+
+ var pickup = JsonSerializer.Deserialize(json, ShipEngineClient.JsonSerializerOptions);
+
+ Assert.Equal(LabelFormat.Png, pickup.LabelFormat);
+ Assert.Null(pickup.LabelDownloadType);
+ }
+ }
+ }
+
+ public class WithOneOfModel
+ {
+ [Fact]
+ public void WhenSerializing_ItShouldSerializeShipmentId()
+ {
+ var body = new CalculateRatesRequestBody(new ShipmentIdRequest
+ {
+ ShipmentId = "se-1234567"
+ })
+ {
+ RateOptions = new RateRequestBody
+ {
+ CarrierIds = new List { "se-99999" }
+ }
+ };
+
+ var result = JsonSerializer.Serialize(body, ShipEngineClient.JsonSerializerOptions);
+
+ Assert.Equal(@"{
+ ""rate_options"": {
+ ""carrier_ids"": [
+ ""se-99999""
+ ]
+ },
+ ""shipment_id"": ""se-1234567""
+}", result);
+ }
+
+ [Fact]
+ public void WhenSerializing_ItShouldSerializeShipment()
+ {
+ var body = new CalculateRatesRequestBody(new RateShipmentRequest
+ {
+ Shipment = new AddressValidatingShipment
+ {
+ CarrierId = "se-88888",
+ ServiceCode = "overnight",
+ ShipFrom = new ShippingAddress
+ {
+ AddressResidentialIndicator = AddressResidentialIndicator.No,
+ AddressLine1 = "123 Main St.",
+ CityLocality = "St. Louis",
+ CountryCode = "US",
+ Name = "John Doe",
+ Phone = "314-555-1234",
+ PostalCode = "63102",
+ StateProvince = "MO"
+ },
+ ShipTo = new ShippingAddressTo
+ {
+ AddressResidentialIndicator = AddressResidentialIndicator.Yes,
+ AddressLine1 = "456 Central",
+ CityLocality = "St. Louis",
+ CountryCode = "US",
+ Name = "Jane Doe",
+ Phone = "314-555-5678",
+ PostalCode = "63033",
+ StateProvince = "MO"
+ }
+ }
+ })
+ {
+ RateOptions = new RateRequestBody
+ {
+ CarrierIds = new List { "se-99999" }
+ }
+ };
+
+ var result = JsonSerializer.Serialize(body, ShipEngineClient.JsonSerializerOptions);
+
+ // spot check some properties on the serialized value.
+ // comparing the serialized value to a string is too brittle, as order and indentation can change
+ var parsed = JsonDocument.Parse(result).RootElement;
+ var shipment = parsed.GetProperty("shipment");
+ Assert.Equal("se-88888", shipment.GetProperty("carrier_id").GetString());
+ Assert.Equal("overnight", shipment.GetProperty("service_code").GetString());
+ Assert.Equal("123 Main St.", shipment.GetProperty("ship_from").GetProperty("address_line1").GetString());
+ Assert.Equal("456 Central", shipment.GetProperty("ship_to").GetProperty("address_line1").GetString());
+ }
+
+ [Fact]
+ public void WhenDeserializing_ItShouldDeserializeShipmentId()
+ {
+ var json = @"{
+ ""rate_options"": {
+ ""carrier_ids"": [
+ ""se-99999""
+ ]
+ },
+ ""shipment_id"": ""se-1234567""
+}";
+
+ var result = JsonSerializer.Deserialize(json, ShipEngineClient.JsonSerializerOptions);
+
+ Assert.NotNull(result.GetShipmentIdRequest());
+ Assert.Contains("se-99999", result.RateOptions.CarrierIds);
+ }
+
+ [Fact]
+ public void WhenDeserializing_ItShouldDeserializeShipment()
+ {
+ var json = @"{
+ ""rate_options"": {
+ ""carrier_ids"": [
+ ""se-99999""
+ ]
+ },
+ ""shipment"": {
+ ""carrier_id"": ""se-88888""
+ }
+}";
+
+ var result = JsonSerializer.Deserialize(json, ShipEngineClient.JsonSerializerOptions);
+
+ Assert.NotNull(result.GetRateShipmentRequest());
+ Assert.Contains("se-99999", result.RateOptions.CarrierIds);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromRateTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromRateTest.cs
index b7d05ec5..f0b8ea17 100644
--- a/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromRateTest.cs
+++ b/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromRateTest.cs
@@ -11,6 +11,8 @@
namespace ShipEngineTest
{
+ using ShipEngineSDK.Model;
+
public class CreateLabelFromRateTest
{
@@ -24,10 +26,10 @@ public CreateLabelFromRateTest()
Params = new Params()
{
RateId = "se-1234",
- ValidateAddress = ValidateAddress.NoValidation,
- LabelLayout = LabelLayout.Letter,
- LabelFormat = LabelFormat.PDF,
- LabelDownloadType = LabelDownloadType.Url
+ ValidateAddress = ShipEngineSDK.Common.Enums.ValidateAddress.NoValidation,
+ LabelLayout = ShipEngineSDK.Common.Enums.LabelLayout.Letter,
+ LabelFormat = ShipEngineSDK.Common.Enums.LabelFormat.PDF,
+ LabelDownloadType = ShipEngineSDK.CreateLabelFromRate.LabelDownloadType.Url
};
TestUtils = new TestUtils();
@@ -46,7 +48,7 @@ public async Task ValidCreateLabelFromRateTest()
var result = await mockShipEngineFixture.ShipEngine.CreateLabelFromRate(Params);
Assert.Equal("se-80255646", result.LabelId);
- Assert.Equal(LabelStatus.Completed, result.Status);
+ Assert.Equal(ShipEngineSDK.CreateLabelFromRate.LabelStatus.Completed, result.Status);
Assert.Equal("se-153814671", result.ShipmentId);
Assert.Equal("2021-08-27T00:00:00Z", result.ShipDate);
Assert.Equal("2021-08-27T16:29:56.8779097Z", result.CreatedAt);
@@ -68,13 +70,13 @@ public async Task ValidCreateLabelFromRateTest()
Assert.Equal("package", result.PackageCode);
Assert.False(result.Voided);
Assert.Null(result.VoidedAt);
- Assert.Equal(LabelFormat.PDF, result.LabelFormat);
- Assert.Equal(DisplayScheme.Label, result.DisplayScheme);
- Assert.Equal(LabelLayout.FourBySix, result.LabelLayout);
+ Assert.Equal(ShipEngineSDK.Common.Enums.LabelFormat.PDF, result.LabelFormat);
+ Assert.Equal(ShipEngineSDK.Common.Enums.DisplayScheme.Label, result.DisplayScheme);
+ Assert.Equal(ShipEngineSDK.Common.Enums.LabelLayout.FourBySix, result.LabelLayout);
Assert.True(result.Trackable);
Assert.Null(result.LabelImageId);
Assert.Equal("ups", result.CarrierCode);
- Assert.Equal(TrackingStatus.InTransit, result.TrackingStatus);
+ Assert.Equal(ShipEngineSDK.CreateLabelFromRate.TrackingStatus.InTransit, result.TrackingStatus);
Assert.Equal("https://api.shipengine.com/v1/downloads/10/xJi-OIh8UU-_RBVmfA6dDw/label-80255646.pdf", result.LabelDownload.Pdf);
Assert.Equal("https://api.shipengine.com/v1/downloads/10/xJi-OIh8UU-_RBVmfA6dDw/label-80255646.png", result.LabelDownload.Png);
@@ -89,9 +91,9 @@ public async Task ValidCreateLabelFromRateTest()
Assert.Equal("package", package.PackageCode);
Assert.Equal(17.0, package.Weight.Value);
- Assert.Equal(WeightUnit.Pound, package.Weight.Unit);
+ Assert.Equal(ShipEngineSDK.Common.Enums.WeightUnit.Pound, package.Weight.Unit);
- Assert.Equal(DimensionUnit.Inch, package.Dimensions.Unit);
+ Assert.Equal(ShipEngineSDK.Common.Enums.DimensionUnit.Inch, package.Dimensions.Unit);
Assert.Equal(36.0, package.Dimensions.Length);
Assert.Equal(12.0, package.Dimensions.Width);
Assert.Equal(24.0, package.Dimensions.Height);
@@ -157,11 +159,24 @@ public async Task InvalidRetriesInMethodCall()
var shipEngine = mockHandler.Object;
var ex = await Assert.ThrowsAsync(async () => await shipEngine.CreateLabelFromRate(Params, methodConfig: new Config(apiKey: "12345", retries: -1)));
- Assert.Equal(ErrorSource.Shipengine, ex.ErrorSource);
- Assert.Equal(ErrorType.Validation, ex.ErrorType);
- Assert.Equal(ErrorCode.InvalidFieldValue, ex.ErrorCode);
+ Assert.Equal(ShipEngineSDK.ErrorSource.Shipengine, ex.ErrorSource);
+ Assert.Equal(ShipEngineSDK.ErrorType.Validation, ex.ErrorType);
+ Assert.Equal(ShipEngineSDK.ErrorCode.InvalidFieldValue, ex.ErrorCode);
Assert.Equal("Retries must be greater than zero.", ex.Message);
Assert.Null(ex.RequestId);
}
+
+
+ [Fact]
+ public void CanDeserializeLabelResponseWithGeneratedModel()
+ {
+ string json = File.ReadAllText(Path.Combine(Directory.GetCurrentDirectory(), "../../../HttpResponseMocks/CreateLabelFromRate200Response.json"));
+
+ var response = JsonSerializer.Deserialize(json);
+ Assert.Equal("1Z63R0960332529481", response.TrackingNumber);
+ var package = Assert.Single(response.Packages);
+ Assert.Equal("https://api.shipengine.com/v1/downloads/10/2zzavkE0J0irTipDXRePHQ/labelpackage-85151459.pdf", package.LabelDownload.Pdf);
+ }
+
}
}
\ No newline at end of file
diff --git a/ShipEngineSDK/Api/AccountApi.cs b/ShipEngineSDK/Api/AccountApi.cs
new file mode 100644
index 00000000..d252b388
--- /dev/null
+++ b/ShipEngineSDK/Api/AccountApi.cs
@@ -0,0 +1,401 @@
+//
+// DO NOT MODIFY THIS FILE
+
+// Changes can be made in a corresponding partial file, or by changing
+// the template in /generation/templates and generating the class again.
+
+
+using ShipEngineSDK.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Mime;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShipEngineSDK;
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial interface IShipEngine
+{
+ ///
+ /// Create an Account Image Create an Account Image
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ Task CreateAccountImage(CreateAccountSettingsImageRequestBody createAccountSettingsImageRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Create an Account Image Create an Account Image
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ Task CreateAccountImage(HttpClient methodClient, CreateAccountSettingsImageRequestBody createAccountSettingsImageRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Delete Account Image By Id Delete Account Image By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DeleteAccountImageById(string labelImageId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Delete Account Image By Id Delete Account Image By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DeleteAccountImageById(HttpClient methodClient, string labelImageId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Account Image By ID Retrieve information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ Task GetAccountSettingsImagesById(string labelImageId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Account Image By ID Retrieve information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ Task GetAccountSettingsImagesById(HttpClient methodClient, string labelImageId, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Account Images List all account images for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListAccountSettingsImagesResponseBody)
+ Task ListAccountImages(CancellationToken cancellationToken = default);
+
+ ///
+ /// List Account Images List all account images for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListAccountSettingsImagesResponseBody)
+ Task ListAccountImages(HttpClient methodClient, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Account Settings List all account settings for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsResponseBody)
+ Task ListAccountSettings(CancellationToken cancellationToken = default);
+
+ ///
+ /// List Account Settings List all account settings for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsResponseBody)
+ Task ListAccountSettings(HttpClient methodClient, CancellationToken cancellationToken = default);
+
+ ///
+ /// Update Account Image By ID Update information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task UpdateAccountSettingsImagesById(UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, string labelImageId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Update Account Image By ID Update information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task UpdateAccountSettingsImagesById(HttpClient methodClient, UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, string labelImageId, CancellationToken cancellationToken = default);
+
+}
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial class ShipEngine
+{
+ ///
+ /// Create an Account Image Create an Account Image
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ public Task CreateAccountImage(CreateAccountSettingsImageRequestBody createAccountSettingsImageRequestBody, CancellationToken cancellationToken = default)
+ {
+ return CreateAccountImage(_client, createAccountSettingsImageRequestBody, cancellationToken);
+ }
+
+ ///
+ /// Create an Account Image Create an Account Image
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ public async Task CreateAccountImage(HttpClient methodClient, CreateAccountSettingsImageRequestBody createAccountSettingsImageRequestBody, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'createAccountSettingsImageRequestBody' is set
+ if (createAccountSettingsImageRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(createAccountSettingsImageRequestBody));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/account/settings/images");
+
+ requestOptions.Data = JsonSerializer.Serialize(createAccountSettingsImageRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "AccountApi.CreateAccountImage";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Delete Account Image By Id Delete Account Image By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task DeleteAccountImageById(string labelImageId, CancellationToken cancellationToken = default)
+ {
+ return DeleteAccountImageById(_client, labelImageId, cancellationToken);
+ }
+
+ ///
+ /// Delete Account Image By Id Delete Account Image By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task DeleteAccountImageById(HttpClient methodClient, string labelImageId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'labelImageId' is set
+ if (labelImageId == null)
+ {
+ throw new ArgumentNullException(nameof(labelImageId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/account/settings/images/{label_image_id}");
+
+ requestOptions.PathParameters.Add("label_image_id", ClientUtils.ParameterToString(labelImageId)); // path parameter
+
+ requestOptions.Operation = "AccountApi.DeleteAccountImageById";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Get Account Image By ID Retrieve information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ public Task GetAccountSettingsImagesById(string labelImageId, CancellationToken cancellationToken = default)
+ {
+ return GetAccountSettingsImagesById(_client, labelImageId, cancellationToken);
+ }
+
+ ///
+ /// Get Account Image By ID Retrieve information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsImagesResponseBody)
+ public async Task GetAccountSettingsImagesById(HttpClient methodClient, string labelImageId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'labelImageId' is set
+ if (labelImageId == null)
+ {
+ throw new ArgumentNullException(nameof(labelImageId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/account/settings/images/{label_image_id}");
+
+ requestOptions.PathParameters.Add("label_image_id", ClientUtils.ParameterToString(labelImageId)); // path parameter
+
+ requestOptions.Operation = "AccountApi.GetAccountSettingsImagesById";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// List Account Images List all account images for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListAccountSettingsImagesResponseBody)
+ public Task ListAccountImages(CancellationToken cancellationToken = default)
+ {
+ return ListAccountImages(_client, cancellationToken);
+ }
+
+ ///
+ /// List Account Images List all account images for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListAccountSettingsImagesResponseBody)
+ public async Task ListAccountImages(HttpClient methodClient, CancellationToken cancellationToken = default)
+ {
+
+ RequestOptions requestOptions = new("/v1/account/settings/images");
+
+
+ requestOptions.Operation = "AccountApi.ListAccountImages";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// List Account Settings List all account settings for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsResponseBody)
+ public Task ListAccountSettings(CancellationToken cancellationToken = default)
+ {
+ return ListAccountSettings(_client, cancellationToken);
+ }
+
+ ///
+ /// List Account Settings List all account settings for the ShipEngine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetAccountSettingsResponseBody)
+ public async Task ListAccountSettings(HttpClient methodClient, CancellationToken cancellationToken = default)
+ {
+
+ RequestOptions requestOptions = new("/v1/account/settings");
+
+
+ requestOptions.Operation = "AccountApi.ListAccountSettings";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Update Account Image By ID Update information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task UpdateAccountSettingsImagesById(UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, string labelImageId, CancellationToken cancellationToken = default)
+ {
+ return UpdateAccountSettingsImagesById(_client, updateAccountSettingsImageRequestBody, labelImageId, cancellationToken);
+ }
+
+ ///
+ /// Update Account Image By ID Update information for an account image.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Label Image Id
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task UpdateAccountSettingsImagesById(HttpClient methodClient, UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, string labelImageId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'updateAccountSettingsImageRequestBody' is set
+ if (updateAccountSettingsImageRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(updateAccountSettingsImageRequestBody));
+ }
+
+ // verify the required parameter 'labelImageId' is set
+ if (labelImageId == null)
+ {
+ throw new ArgumentNullException(nameof(labelImageId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/account/settings/images/{label_image_id}");
+
+ requestOptions.PathParameters.Add("label_image_id", ClientUtils.ParameterToString(labelImageId)); // path parameter
+ requestOptions.Data = JsonSerializer.Serialize(updateAccountSettingsImageRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "AccountApi.UpdateAccountSettingsImagesById";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/ShipEngineSDK/Api/AddressesApi.cs b/ShipEngineSDK/Api/AddressesApi.cs
new file mode 100644
index 00000000..28dd3ad1
--- /dev/null
+++ b/ShipEngineSDK/Api/AddressesApi.cs
@@ -0,0 +1,160 @@
+//
+// DO NOT MODIFY THIS FILE
+
+// Changes can be made in a corresponding partial file, or by changing
+// the template in /generation/templates and generating the class again.
+
+
+using ShipEngineSDK.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Mime;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShipEngineSDK;
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial interface IShipEngine
+{
+ ///
+ /// Parse an address The address-recognition API makes it easy for you to extract address data from unstructured text, including the recipient name, line 1, line 2, city, postal code, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's address-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed address data is returned in the same structure that's used for other ShipEngine APIs, such as address validation, rate quotes, and shipping labels. > **Note:** Address recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The only required field is `text`, which is the text to be parsed. You can optionally also provide an `address` containing already-known values. For example, you may already know the recipient's name, city, and country, and only want to parse the street address into separate lines.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ParseAddressResponseBody)
+ Task ParseAddress(ParseAddressRequestBody parseAddressRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Parse an address The address-recognition API makes it easy for you to extract address data from unstructured text, including the recipient name, line 1, line 2, city, postal code, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's address-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed address data is returned in the same structure that's used for other ShipEngine APIs, such as address validation, rate quotes, and shipping labels. > **Note:** Address recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The only required field is `text`, which is the text to be parsed. You can optionally also provide an `address` containing already-known values. For example, you may already know the recipient's name, city, and country, and only want to parse the street address into separate lines.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ParseAddressResponseBody)
+ Task ParseAddress(HttpClient methodClient, ParseAddressRequestBody parseAddressRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Validate An Address Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges. ShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (List<AddressValidationResult>)
+ Task> ValidateAddress(List addressToValidate, CancellationToken cancellationToken = default);
+
+ ///
+ /// Validate An Address Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges. ShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (List<AddressValidationResult>)
+ Task> ValidateAddress(HttpClient methodClient, List addressToValidate, CancellationToken cancellationToken = default);
+
+}
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial class ShipEngine
+{
+ ///
+ /// Parse an address The address-recognition API makes it easy for you to extract address data from unstructured text, including the recipient name, line 1, line 2, city, postal code, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's address-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed address data is returned in the same structure that's used for other ShipEngine APIs, such as address validation, rate quotes, and shipping labels. > **Note:** Address recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The only required field is `text`, which is the text to be parsed. You can optionally also provide an `address` containing already-known values. For example, you may already know the recipient's name, city, and country, and only want to parse the street address into separate lines.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ParseAddressResponseBody)
+ public Task ParseAddress(ParseAddressRequestBody parseAddressRequestBody, CancellationToken cancellationToken = default)
+ {
+ return ParseAddress(_client, parseAddressRequestBody, cancellationToken);
+ }
+
+ ///
+ /// Parse an address The address-recognition API makes it easy for you to extract address data from unstructured text, including the recipient name, line 1, line 2, city, postal code, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's address-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed address data is returned in the same structure that's used for other ShipEngine APIs, such as address validation, rate quotes, and shipping labels. > **Note:** Address recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The only required field is `text`, which is the text to be parsed. You can optionally also provide an `address` containing already-known values. For example, you may already know the recipient's name, city, and country, and only want to parse the street address into separate lines.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ParseAddressResponseBody)
+ public async Task ParseAddress(HttpClient methodClient, ParseAddressRequestBody parseAddressRequestBody, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'parseAddressRequestBody' is set
+ if (parseAddressRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(parseAddressRequestBody));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/addresses/recognize");
+
+ requestOptions.Data = JsonSerializer.Serialize(parseAddressRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "AddressesApi.ParseAddress";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Validate An Address Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges. ShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (List<AddressValidationResult>)
+ public Task> ValidateAddress(List addressToValidate, CancellationToken cancellationToken = default)
+ {
+ return ValidateAddress(_client, addressToValidate, cancellationToken);
+ }
+
+ ///
+ /// Validate An Address Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges. ShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (List<AddressValidationResult>)
+ public async Task> ValidateAddress(HttpClient methodClient, List addressToValidate, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'addressToValidate' is set
+ if (addressToValidate == null)
+ {
+ throw new ArgumentNullException(nameof(addressToValidate));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/addresses/validate");
+
+ requestOptions.Data = JsonSerializer.Serialize(addressToValidate, JsonSerializerOptions);
+
+ requestOptions.Operation = "AddressesApi.ValidateAddress";
+
+ var result = await SendHttpRequestAsync>(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/ShipEngineSDK/Api/BatchesApi.cs b/ShipEngineSDK/Api/BatchesApi.cs
new file mode 100644
index 00000000..e388d35a
--- /dev/null
+++ b/ShipEngineSDK/Api/BatchesApi.cs
@@ -0,0 +1,750 @@
+//
+// DO NOT MODIFY THIS FILE
+
+// Changes can be made in a corresponding partial file, or by changing
+// the template in /generation/templates and generating the class again.
+
+
+using ShipEngineSDK.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Mime;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShipEngineSDK;
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial interface IShipEngine
+{
+ ///
+ /// Add to a Batch Add a Shipment or Rate to a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task AddToBatch(AddToBatchRequestBody addToBatchRequestBody, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Add to a Batch Add a Shipment or Rate to a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task AddToBatch(HttpClient methodClient, AddToBatchRequestBody addToBatchRequestBody, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Create A Batch Create a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (CreateBatchResponseBody)
+ Task CreateBatch(CreateBatchRequest createBatchRequest, CancellationToken cancellationToken = default);
+
+ ///
+ /// Create A Batch Create a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (CreateBatchResponseBody)
+ Task CreateBatch(HttpClient methodClient, CreateBatchRequest createBatchRequest, CancellationToken cancellationToken = default);
+
+ ///
+ /// Delete Batch By Id Delete Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DeleteBatch(string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Delete Batch By Id Delete Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DeleteBatch(HttpClient methodClient, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Batch By External ID Get Batch By External ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByExternalIdResponseBody)
+ Task GetBatchByExternalId(string externalBatchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Batch By External ID Get Batch By External ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByExternalIdResponseBody)
+ Task GetBatchByExternalId(HttpClient methodClient, string externalBatchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Batch By ID Get Batch By ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByIdResponseBody)
+ Task GetBatchById(string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Batch By ID Get Batch By ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByIdResponseBody)
+ Task GetBatchById(HttpClient methodClient, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Batch Errors Error handling in batches are handled differently than in a single synchronous request. You must retrieve the status of your batch by [getting a batch](https://www.shipengine.com/docs/reference/get-batch-by-id/) and getting an overview of the statuses or you can list errors directly here below to get detailed information about the errors.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchErrorsResponseBody)
+ Task ListBatchErrors(string batchId, int? pagesize, int? page, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Batch Errors Error handling in batches are handled differently than in a single synchronous request. You must retrieve the status of your batch by [getting a batch](https://www.shipengine.com/docs/reference/get-batch-by-id/) and getting an overview of the statuses or you can list errors directly here below to get detailed information about the errors.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchErrorsResponseBody)
+ Task ListBatchErrors(HttpClient methodClient, string batchId, int? pagesize, int? page, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Batches List Batches associated with your Shipengine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// Controls the sort order of the query. (optional)
+ /// Batch Number (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// The number of results to return per response. (optional, default to 25)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchesResponseBody)
+ Task ListBatches(BatchStatus? status, BatchesSortBy? sortBy, SortDir? sortDir, string? batchNumber, int? page, int? pageSize, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Batches List Batches associated with your Shipengine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// (optional)
+ /// (optional)
+ /// Controls the sort order of the query. (optional)
+ /// Batch Number (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// The number of results to return per response. (optional, default to 25)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchesResponseBody)
+ Task ListBatches(HttpClient methodClient, BatchStatus? status, BatchesSortBy? sortBy, SortDir? sortDir, string? batchNumber, int? page, int? pageSize, CancellationToken cancellationToken = default);
+
+ ///
+ /// Process Batch ID Labels Process Batch ID Labels
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task ProcessBatch(ProcessBatchRequestBody processBatchRequestBody, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Process Batch ID Labels Process Batch ID Labels
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task ProcessBatch(HttpClient methodClient, ProcessBatchRequestBody processBatchRequestBody, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Remove From Batch Remove a shipment or rate from a batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task RemoveFromBatch(RemoveFromBatchRequestBody removeFromBatchRequestBody, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Remove From Batch Remove a shipment or rate from a batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task RemoveFromBatch(HttpClient methodClient, RemoveFromBatchRequestBody removeFromBatchRequestBody, string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Update Batch By Id Update Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task UpdateBatch(string batchId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Update Batch By Id Update Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task UpdateBatch(HttpClient methodClient, string batchId, CancellationToken cancellationToken = default);
+
+}
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial class ShipEngine
+{
+ ///
+ /// Add to a Batch Add a Shipment or Rate to a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task AddToBatch(AddToBatchRequestBody addToBatchRequestBody, string batchId, CancellationToken cancellationToken = default)
+ {
+ return AddToBatch(_client, addToBatchRequestBody, batchId, cancellationToken);
+ }
+
+ ///
+ /// Add to a Batch Add a Shipment or Rate to a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task AddToBatch(HttpClient methodClient, AddToBatchRequestBody addToBatchRequestBody, string batchId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'addToBatchRequestBody' is set
+ if (addToBatchRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(addToBatchRequestBody));
+ }
+
+ // verify the required parameter 'batchId' is set
+ if (batchId == null)
+ {
+ throw new ArgumentNullException(nameof(batchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/{batch_id}/add");
+
+ requestOptions.PathParameters.Add("batch_id", ClientUtils.ParameterToString(batchId)); // path parameter
+ requestOptions.Data = JsonSerializer.Serialize(addToBatchRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "BatchesApi.AddToBatch";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Create A Batch Create a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (CreateBatchResponseBody)
+ public Task CreateBatch(CreateBatchRequest createBatchRequest, CancellationToken cancellationToken = default)
+ {
+ return CreateBatch(_client, createBatchRequest, cancellationToken);
+ }
+
+ ///
+ /// Create A Batch Create a Batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (CreateBatchResponseBody)
+ public async Task CreateBatch(HttpClient methodClient, CreateBatchRequest createBatchRequest, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'createBatchRequest' is set
+ if (createBatchRequest == null)
+ {
+ throw new ArgumentNullException(nameof(createBatchRequest));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches");
+
+ requestOptions.Data = JsonSerializer.Serialize(createBatchRequest, JsonSerializerOptions);
+
+ requestOptions.Operation = "BatchesApi.CreateBatch";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Delete Batch By Id Delete Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task DeleteBatch(string batchId, CancellationToken cancellationToken = default)
+ {
+ return DeleteBatch(_client, batchId, cancellationToken);
+ }
+
+ ///
+ /// Delete Batch By Id Delete Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task DeleteBatch(HttpClient methodClient, string batchId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'batchId' is set
+ if (batchId == null)
+ {
+ throw new ArgumentNullException(nameof(batchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/{batch_id}");
+
+ requestOptions.PathParameters.Add("batch_id", ClientUtils.ParameterToString(batchId)); // path parameter
+
+ requestOptions.Operation = "BatchesApi.DeleteBatch";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Get Batch By External ID Get Batch By External ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByExternalIdResponseBody)
+ public Task GetBatchByExternalId(string externalBatchId, CancellationToken cancellationToken = default)
+ {
+ return GetBatchByExternalId(_client, externalBatchId, cancellationToken);
+ }
+
+ ///
+ /// Get Batch By External ID Get Batch By External ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByExternalIdResponseBody)
+ public async Task GetBatchByExternalId(HttpClient methodClient, string externalBatchId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'externalBatchId' is set
+ if (externalBatchId == null)
+ {
+ throw new ArgumentNullException(nameof(externalBatchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/external_batch_id/{external_batch_id}");
+
+ requestOptions.PathParameters.Add("external_batch_id", ClientUtils.ParameterToString(externalBatchId)); // path parameter
+
+ requestOptions.Operation = "BatchesApi.GetBatchByExternalId";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Get Batch By ID Get Batch By ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByIdResponseBody)
+ public Task GetBatchById(string batchId, CancellationToken cancellationToken = default)
+ {
+ return GetBatchById(_client, batchId, cancellationToken);
+ }
+
+ ///
+ /// Get Batch By ID Get Batch By ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetBatchByIdResponseBody)
+ public async Task GetBatchById(HttpClient methodClient, string batchId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'batchId' is set
+ if (batchId == null)
+ {
+ throw new ArgumentNullException(nameof(batchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/{batch_id}");
+
+ requestOptions.PathParameters.Add("batch_id", ClientUtils.ParameterToString(batchId)); // path parameter
+
+ requestOptions.Operation = "BatchesApi.GetBatchById";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Get Batch Errors Error handling in batches are handled differently than in a single synchronous request. You must retrieve the status of your batch by [getting a batch](https://www.shipengine.com/docs/reference/get-batch-by-id/) and getting an overview of the statuses or you can list errors directly here below to get detailed information about the errors.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchErrorsResponseBody)
+ public Task ListBatchErrors(string batchId, int? pagesize = default, int? page = default, CancellationToken cancellationToken = default)
+ {
+ return ListBatchErrors(_client, batchId, pagesize, page, cancellationToken);
+ }
+
+ ///
+ /// Get Batch Errors Error handling in batches are handled differently than in a single synchronous request. You must retrieve the status of your batch by [getting a batch](https://www.shipengine.com/docs/reference/get-batch-by-id/) and getting an overview of the statuses or you can list errors directly here below to get detailed information about the errors.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchErrorsResponseBody)
+ public async Task ListBatchErrors(HttpClient methodClient, string batchId, int? pagesize = default, int? page = default, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'batchId' is set
+ if (batchId == null)
+ {
+ throw new ArgumentNullException(nameof(batchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/{batch_id}/errors");
+
+ requestOptions.PathParameters.Add("batch_id", ClientUtils.ParameterToString(batchId)); // path parameter
+ if (pagesize != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "pagesize", pagesize));
+ }
+ if (page != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));
+ }
+
+ requestOptions.Operation = "BatchesApi.ListBatchErrors";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// List Batches List Batches associated with your Shipengine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// Controls the sort order of the query. (optional)
+ /// Batch Number (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// The number of results to return per response. (optional, default to 25)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchesResponseBody)
+ public Task ListBatches(BatchStatus? status = default, BatchesSortBy? sortBy = default, SortDir? sortDir = default, string? batchNumber = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default)
+ {
+ return ListBatches(_client, status, sortBy, sortDir, batchNumber, page, pageSize, cancellationToken);
+ }
+
+ ///
+ /// List Batches List Batches associated with your Shipengine account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// (optional)
+ /// (optional)
+ /// Controls the sort order of the query. (optional)
+ /// Batch Number (optional)
+ /// Return a specific page of results. Defaults to the first page. If set to a number that's greater than the number of pages of results, an empty page is returned. (optional, default to 1)
+ /// The number of results to return per response. (optional, default to 25)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListBatchesResponseBody)
+ public async Task ListBatches(HttpClient methodClient, BatchStatus? status = default, BatchesSortBy? sortBy = default, SortDir? sortDir = default, string? batchNumber = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default)
+ {
+
+ RequestOptions requestOptions = new("/v1/batches");
+
+ if (status != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "status", status));
+ }
+ if (sortBy != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "sort_by", sortBy));
+ }
+ if (sortDir != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "sort_dir", sortDir));
+ }
+ if (batchNumber != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "batch_number", batchNumber));
+ }
+ if (page != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));
+ }
+ if (pageSize != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page_size", pageSize));
+ }
+
+ requestOptions.Operation = "BatchesApi.ListBatches";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Process Batch ID Labels Process Batch ID Labels
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task ProcessBatch(ProcessBatchRequestBody processBatchRequestBody, string batchId, CancellationToken cancellationToken = default)
+ {
+ return ProcessBatch(_client, processBatchRequestBody, batchId, cancellationToken);
+ }
+
+ ///
+ /// Process Batch ID Labels Process Batch ID Labels
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task ProcessBatch(HttpClient methodClient, ProcessBatchRequestBody processBatchRequestBody, string batchId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'processBatchRequestBody' is set
+ if (processBatchRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(processBatchRequestBody));
+ }
+
+ // verify the required parameter 'batchId' is set
+ if (batchId == null)
+ {
+ throw new ArgumentNullException(nameof(batchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/{batch_id}/process/labels");
+
+ requestOptions.PathParameters.Add("batch_id", ClientUtils.ParameterToString(batchId)); // path parameter
+ requestOptions.Data = JsonSerializer.Serialize(processBatchRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "BatchesApi.ProcessBatch";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Remove From Batch Remove a shipment or rate from a batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task RemoveFromBatch(RemoveFromBatchRequestBody removeFromBatchRequestBody, string batchId, CancellationToken cancellationToken = default)
+ {
+ return RemoveFromBatch(_client, removeFromBatchRequestBody, batchId, cancellationToken);
+ }
+
+ ///
+ /// Remove From Batch Remove a shipment or rate from a batch
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task RemoveFromBatch(HttpClient methodClient, RemoveFromBatchRequestBody removeFromBatchRequestBody, string batchId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'removeFromBatchRequestBody' is set
+ if (removeFromBatchRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(removeFromBatchRequestBody));
+ }
+
+ // verify the required parameter 'batchId' is set
+ if (batchId == null)
+ {
+ throw new ArgumentNullException(nameof(batchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/{batch_id}/remove");
+
+ requestOptions.PathParameters.Add("batch_id", ClientUtils.ParameterToString(batchId)); // path parameter
+ requestOptions.Data = JsonSerializer.Serialize(removeFromBatchRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "BatchesApi.RemoveFromBatch";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Update Batch By Id Update Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task UpdateBatch(string batchId, CancellationToken cancellationToken = default)
+ {
+ return UpdateBatch(_client, batchId, cancellationToken);
+ }
+
+ ///
+ /// Update Batch By Id Update Batch By Id
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Batch ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task UpdateBatch(HttpClient methodClient, string batchId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'batchId' is set
+ if (batchId == null)
+ {
+ throw new ArgumentNullException(nameof(batchId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/batches/{batch_id}");
+
+ requestOptions.PathParameters.Add("batch_id", ClientUtils.ParameterToString(batchId)); // path parameter
+
+ requestOptions.Operation = "BatchesApi.UpdateBatch";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/ShipEngineSDK/Api/CarrierAccountsApi.cs b/ShipEngineSDK/Api/CarrierAccountsApi.cs
new file mode 100644
index 00000000..d3cf8cde
--- /dev/null
+++ b/ShipEngineSDK/Api/CarrierAccountsApi.cs
@@ -0,0 +1,341 @@
+//
+// DO NOT MODIFY THIS FILE
+
+// Changes can be made in a corresponding partial file, or by changing
+// the template in /generation/templates and generating the class again.
+
+
+using ShipEngineSDK.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Mime;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShipEngineSDK;
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial interface IShipEngine
+{
+ ///
+ /// Connect a carrier account Connect a carrier account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ConnectCarrierResponseBody)
+ Task ConnectCarrier(CarrierName carrierName, ConnectCarrierRequestBody connectCarrierRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Connect a carrier account Connect a carrier account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ConnectCarrierResponseBody)
+ Task ConnectCarrier(HttpClient methodClient, CarrierName carrierName, ConnectCarrierRequestBody connectCarrierRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Disconnect a carrier Disconnect a carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DisconnectCarrier(CarrierName carrierName, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Disconnect a carrier Disconnect a carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DisconnectCarrier(HttpClient methodClient, CarrierName carrierName, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get carrier settings Get carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierSettingsResponseBody)
+ Task GetCarrierSettings(CarrierNameWithSettings carrierName, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get carrier settings Get carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierSettingsResponseBody)
+ Task GetCarrierSettings(HttpClient methodClient, CarrierNameWithSettings carrierName, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Update carrier settings Update carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task UpdateCarrierSettings(CarrierNameWithSettings carrierName, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Update carrier settings Update carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task UpdateCarrierSettings(HttpClient methodClient, CarrierNameWithSettings carrierName, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, string carrierId, CancellationToken cancellationToken = default);
+
+}
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial class ShipEngine
+{
+ ///
+ /// Connect a carrier account Connect a carrier account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ConnectCarrierResponseBody)
+ public Task ConnectCarrier(CarrierName carrierName, ConnectCarrierRequestBody connectCarrierRequestBody, CancellationToken cancellationToken = default)
+ {
+ return ConnectCarrier(_client, carrierName, connectCarrierRequestBody, cancellationToken);
+ }
+
+ ///
+ /// Connect a carrier account Connect a carrier account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ConnectCarrierResponseBody)
+ public async Task ConnectCarrier(HttpClient methodClient, CarrierName carrierName, ConnectCarrierRequestBody connectCarrierRequestBody, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierName' is set
+ if (carrierName == null)
+ {
+ throw new ArgumentNullException(nameof(carrierName));
+ }
+
+ // verify the required parameter 'connectCarrierRequestBody' is set
+ if (connectCarrierRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(connectCarrierRequestBody));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/connections/carriers/{carrier_name}");
+
+ requestOptions.PathParameters.Add("carrier_name", ClientUtils.ParameterToString(carrierName)); // path parameter
+ requestOptions.Data = JsonSerializer.Serialize(connectCarrierRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "CarrierAccountsApi.ConnectCarrier";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Disconnect a carrier Disconnect a carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task DisconnectCarrier(CarrierName carrierName, string carrierId, CancellationToken cancellationToken = default)
+ {
+ return DisconnectCarrier(_client, carrierName, carrierId, cancellationToken);
+ }
+
+ ///
+ /// Disconnect a carrier Disconnect a carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task DisconnectCarrier(HttpClient methodClient, CarrierName carrierName, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierName' is set
+ if (carrierName == null)
+ {
+ throw new ArgumentNullException(nameof(carrierName));
+ }
+
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/connections/carriers/{carrier_name}/{carrier_id}");
+
+ requestOptions.PathParameters.Add("carrier_name", ClientUtils.ParameterToString(carrierName)); // path parameter
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+
+ requestOptions.Operation = "CarrierAccountsApi.DisconnectCarrier";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Get carrier settings Get carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierSettingsResponseBody)
+ public Task GetCarrierSettings(CarrierNameWithSettings carrierName, string carrierId, CancellationToken cancellationToken = default)
+ {
+ return GetCarrierSettings(_client, carrierName, carrierId, cancellationToken);
+ }
+
+ ///
+ /// Get carrier settings Get carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierSettingsResponseBody)
+ public async Task GetCarrierSettings(HttpClient methodClient, CarrierNameWithSettings carrierName, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierName' is set
+ if (carrierName == null)
+ {
+ throw new ArgumentNullException(nameof(carrierName));
+ }
+
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/connections/carriers/{carrier_name}/{carrier_id}/settings");
+
+ requestOptions.PathParameters.Add("carrier_name", ClientUtils.ParameterToString(carrierName)); // path parameter
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+
+ requestOptions.Operation = "CarrierAccountsApi.GetCarrierSettings";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Update carrier settings Update carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task UpdateCarrierSettings(CarrierNameWithSettings carrierName, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, string carrierId, CancellationToken cancellationToken = default)
+ {
+ return UpdateCarrierSettings(_client, carrierName, updateCarrierSettingsRequestBody, carrierId, cancellationToken);
+ }
+
+ ///
+ /// Update carrier settings Update carrier settings
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// The carrier name, such as `ups`, `fedex`, or `dhl_express`.
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task UpdateCarrierSettings(HttpClient methodClient, CarrierNameWithSettings carrierName, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierName' is set
+ if (carrierName == null)
+ {
+ throw new ArgumentNullException(nameof(carrierName));
+ }
+
+ // verify the required parameter 'updateCarrierSettingsRequestBody' is set
+ if (updateCarrierSettingsRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(updateCarrierSettingsRequestBody));
+ }
+
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/connections/carriers/{carrier_name}/{carrier_id}/settings");
+
+ requestOptions.PathParameters.Add("carrier_name", ClientUtils.ParameterToString(carrierName)); // path parameter
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+ requestOptions.Data = JsonSerializer.Serialize(updateCarrierSettingsRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "CarrierAccountsApi.UpdateCarrierSettings";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/ShipEngineSDK/Api/CarriersApi.cs b/ShipEngineSDK/Api/CarriersApi.cs
new file mode 100644
index 00000000..51a144d2
--- /dev/null
+++ b/ShipEngineSDK/Api/CarriersApi.cs
@@ -0,0 +1,475 @@
+//
+// DO NOT MODIFY THIS FILE
+
+// Changes can be made in a corresponding partial file, or by changing
+// the template in /generation/templates and generating the class again.
+
+
+using ShipEngineSDK.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Mime;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShipEngineSDK;
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial interface IShipEngine
+{
+ ///
+ /// Add Funds To Carrier Add Funds To A Carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (AddFundsToCarrierResponseBody)
+ Task AddFundsToCarrier(AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Add Funds To Carrier Add Funds To A Carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (AddFundsToCarrierResponseBody)
+ Task AddFundsToCarrier(HttpClient methodClient, AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Disconnect Carrier by ID Disconnect a Carrier of the given ID from the account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DisconnectCarrierById(string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Disconnect Carrier by ID Disconnect a Carrier of the given ID from the account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ Task DisconnectCarrierById(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Carrier By ID Retrive carrier info by ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierByIdResponseBody)
+ Task GetCarrierById(string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Carrier By ID Retrive carrier info by ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierByIdResponseBody)
+ Task GetCarrierById(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Carrier Options Get a list of the options available for the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierOptionsResponseBody)
+ Task GetCarrierOptions(string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// Get Carrier Options Get a list of the options available for the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierOptionsResponseBody)
+ Task GetCarrierOptions(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Carrier Package Types List the package types associated with the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierPackageTypesResponseBody)
+ Task ListCarrierPackageTypes(string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Carrier Package Types List the package types associated with the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierPackageTypesResponseBody)
+ Task ListCarrierPackageTypes(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Carrier Services List the services associated with the carrier ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierServicesResponseBody)
+ Task ListCarrierServices(string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Carrier Services List the services associated with the carrier ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierServicesResponseBody)
+ Task ListCarrierServices(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default);
+
+ ///
+ /// List Carriers List all carriers that have been added to this account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarriersResponseBody)
+ Task ListCarriers(CancellationToken cancellationToken = default);
+
+ ///
+ /// List Carriers List all carriers that have been added to this account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarriersResponseBody)
+ Task ListCarriers(HttpClient methodClient, CancellationToken cancellationToken = default);
+
+}
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial class ShipEngine
+{
+ ///
+ /// Add Funds To Carrier Add Funds To A Carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (AddFundsToCarrierResponseBody)
+ public Task AddFundsToCarrier(AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, string carrierId, CancellationToken cancellationToken = default)
+ {
+ return AddFundsToCarrier(_client, addFundsToCarrierRequestBody, carrierId, cancellationToken);
+ }
+
+ ///
+ /// Add Funds To Carrier Add Funds To A Carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (AddFundsToCarrierResponseBody)
+ public async Task AddFundsToCarrier(HttpClient methodClient, AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'addFundsToCarrierRequestBody' is set
+ if (addFundsToCarrierRequestBody == null)
+ {
+ throw new ArgumentNullException(nameof(addFundsToCarrierRequestBody));
+ }
+
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/carriers/{carrier_id}/add_funds");
+
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+ requestOptions.Data = JsonSerializer.Serialize(addFundsToCarrierRequestBody, JsonSerializerOptions);
+
+ requestOptions.Operation = "CarriersApi.AddFundsToCarrier";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Disconnect Carrier by ID Disconnect a Carrier of the given ID from the account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public Task DisconnectCarrierById(string carrierId, CancellationToken cancellationToken = default)
+ {
+ return DisconnectCarrierById(_client, carrierId, cancellationToken);
+ }
+
+ ///
+ /// Disconnect Carrier by ID Disconnect a Carrier of the given ID from the account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async Task DisconnectCarrierById(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/carriers/{carrier_id}");
+
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+
+ requestOptions.Operation = "CarriersApi.DisconnectCarrierById";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Get Carrier By ID Retrive carrier info by ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierByIdResponseBody)
+ public Task GetCarrierById(string carrierId, CancellationToken cancellationToken = default)
+ {
+ return GetCarrierById(_client, carrierId, cancellationToken);
+ }
+
+ ///
+ /// Get Carrier By ID Retrive carrier info by ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierByIdResponseBody)
+ public async Task GetCarrierById(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/carriers/{carrier_id}");
+
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+
+ requestOptions.Operation = "CarriersApi.GetCarrierById";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// Get Carrier Options Get a list of the options available for the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierOptionsResponseBody)
+ public Task GetCarrierOptions(string carrierId, CancellationToken cancellationToken = default)
+ {
+ return GetCarrierOptions(_client, carrierId, cancellationToken);
+ }
+
+ ///
+ /// Get Carrier Options Get a list of the options available for the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarrierOptionsResponseBody)
+ public async Task GetCarrierOptions(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/carriers/{carrier_id}/options");
+
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+
+ requestOptions.Operation = "CarriersApi.GetCarrierOptions";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// List Carrier Package Types List the package types associated with the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierPackageTypesResponseBody)
+ public Task ListCarrierPackageTypes(string carrierId, CancellationToken cancellationToken = default)
+ {
+ return ListCarrierPackageTypes(_client, carrierId, cancellationToken);
+ }
+
+ ///
+ /// List Carrier Package Types List the package types associated with the carrier
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierPackageTypesResponseBody)
+ public async Task ListCarrierPackageTypes(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/carriers/{carrier_id}/packages");
+
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+
+ requestOptions.Operation = "CarriersApi.ListCarrierPackageTypes";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// List Carrier Services List the services associated with the carrier ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierServicesResponseBody)
+ public Task ListCarrierServices(string carrierId, CancellationToken cancellationToken = default)
+ {
+ return ListCarrierServices(_client, carrierId, cancellationToken);
+ }
+
+ ///
+ /// List Carrier Services List the services associated with the carrier ID
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Carrier ID
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (ListCarrierServicesResponseBody)
+ public async Task ListCarrierServices(HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'carrierId' is set
+ if (carrierId == null)
+ {
+ throw new ArgumentNullException(nameof(carrierId));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/carriers/{carrier_id}/services");
+
+ requestOptions.PathParameters.Add("carrier_id", ClientUtils.ParameterToString(carrierId)); // path parameter
+
+ requestOptions.Operation = "CarriersApi.ListCarrierServices";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+ ///
+ /// List Carriers List all carriers that have been added to this account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarriersResponseBody)
+ public Task ListCarriers(CancellationToken cancellationToken = default)
+ {
+ return ListCarriers(_client, cancellationToken);
+ }
+
+ ///
+ /// List Carriers List all carriers that have been added to this account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (GetCarriersResponseBody)
+ public async Task ListCarriers(HttpClient methodClient, CancellationToken cancellationToken = default)
+ {
+
+ RequestOptions requestOptions = new("/v1/carriers");
+
+
+ requestOptions.Operation = "CarriersApi.ListCarriers";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/ShipEngineSDK/Api/DownloadsApi.cs b/ShipEngineSDK/Api/DownloadsApi.cs
new file mode 100644
index 00000000..6a2d6e3b
--- /dev/null
+++ b/ShipEngineSDK/Api/DownloadsApi.cs
@@ -0,0 +1,135 @@
+//
+// DO NOT MODIFY THIS FILE
+
+// Changes can be made in a corresponding partial file, or by changing
+// the template in /generation/templates and generating the class again.
+
+
+using ShipEngineSDK.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Mime;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShipEngineSDK;
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial interface IShipEngine
+{
+ ///
+ /// Download File Get File
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// (optional)
+ /// (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (System.IO.Stream)
+ Task DownloadFile(string subdir, string filename, string dir, int? rotation, string? download, CancellationToken cancellationToken = default);
+
+ ///
+ /// Download File Get File
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ ///
+ ///
+ /// (optional)
+ /// (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (System.IO.Stream)
+ Task DownloadFile(HttpClient methodClient, string subdir, string filename, string dir, int? rotation, string? download, CancellationToken cancellationToken = default);
+
+}
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial class ShipEngine
+{
+ ///
+ /// Download File Get File
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// (optional)
+ /// (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (System.IO.Stream)
+ public Task DownloadFile(string subdir, string filename, string dir, int? rotation = default, string? download = default, CancellationToken cancellationToken = default)
+ {
+ return DownloadFile(_client, subdir, filename, dir, rotation, download, cancellationToken);
+ }
+
+ ///
+ /// Download File Get File
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ ///
+ ///
+ /// (optional)
+ /// (optional)
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (System.IO.Stream)
+ public async Task DownloadFile(HttpClient methodClient, string subdir, string filename, string dir, int? rotation = default, string? download = default, CancellationToken cancellationToken = default)
+ {
+ // verify the required parameter 'subdir' is set
+ if (subdir == null)
+ {
+ throw new ArgumentNullException(nameof(subdir));
+ }
+
+ // verify the required parameter 'filename' is set
+ if (filename == null)
+ {
+ throw new ArgumentNullException(nameof(filename));
+ }
+
+ // verify the required parameter 'dir' is set
+ if (dir == null)
+ {
+ throw new ArgumentNullException(nameof(dir));
+ }
+
+
+ RequestOptions requestOptions = new("/v1/downloads/{dir}/{subdir}/{filename}");
+
+ requestOptions.PathParameters.Add("subdir", ClientUtils.ParameterToString(subdir)); // path parameter
+ requestOptions.PathParameters.Add("filename", ClientUtils.ParameterToString(filename)); // path parameter
+ requestOptions.PathParameters.Add("dir", ClientUtils.ParameterToString(dir)); // path parameter
+ if (rotation != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "rotation", rotation));
+ }
+ if (download != null)
+ {
+ requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "download", download));
+ }
+
+ requestOptions.Operation = "DownloadsApi.DownloadFile";
+
+ var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken);
+
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/ShipEngineSDK/Api/InsuranceApi.cs b/ShipEngineSDK/Api/InsuranceApi.cs
new file mode 100644
index 00000000..307b2ab0
--- /dev/null
+++ b/ShipEngineSDK/Api/InsuranceApi.cs
@@ -0,0 +1,264 @@
+//
+// DO NOT MODIFY THIS FILE
+
+// Changes can be made in a corresponding partial file, or by changing
+// the template in /generation/templates and generating the class again.
+
+
+using ShipEngineSDK.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Mime;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShipEngineSDK;
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial interface IShipEngine
+{
+ ///
+ /// Add Funds To Insurance You may need to auto fund your account from time to time. For example, if you don't normally ship items over $100, and may want to add funds to insurance rather than keeping the account funded.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (AddFundsToInsuranceResponseBody)
+ Task AddFundsToInsurance(AddFundsToInsuranceRequestBody addFundsToInsuranceRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Add Funds To Insurance You may need to auto fund your account from time to time. For example, if you don't normally ship items over $100, and may want to add funds to insurance rather than keeping the account funded.
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ /// HttpClient to use for the request
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (AddFundsToInsuranceResponseBody)
+ Task AddFundsToInsurance(HttpClient methodClient, AddFundsToInsuranceRequestBody addFundsToInsuranceRequestBody, CancellationToken cancellationToken = default);
+
+ ///
+ /// Connect a Shipsurance Account Connect a Shipsurance Account
+ ///
+ /// Thrown when required argument is null
+ /// Thrown when fails to make API call
+ ///
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (Object)
+ Task