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 ConnectInsurer(ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default); + + /// + /// Connect a Shipsurance Account Connect a Shipsurance 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 (Object) + Task ConnectInsurer(HttpClient methodClient, ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default); + + /// + /// Disconnect a Shipsurance Account Disconnect 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 DisconnectInsurer(CancellationToken cancellationToken = default); + + /// + /// Disconnect a Shipsurance Account Disconnect a Shipsurance 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 (Object) + Task DisconnectInsurer(HttpClient methodClient, CancellationToken cancellationToken = default); + + /// + /// Get Insurance Funds Balance Retrieve the balance of your Shipsurance account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetInsuranceBalanceResponseBody) + Task GetInsuranceBalance(CancellationToken cancellationToken = default); + + /// + /// Get Insurance Funds Balance Retrieve the balance of your Shipsurance 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 (GetInsuranceBalanceResponseBody) + Task GetInsuranceBalance(HttpClient methodClient, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// 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) + public Task AddFundsToInsurance(AddFundsToInsuranceRequestBody addFundsToInsuranceRequestBody, CancellationToken cancellationToken = default) + { + return AddFundsToInsurance(_client, addFundsToInsuranceRequestBody, cancellationToken); + } + + /// + /// 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) + public async Task AddFundsToInsurance(HttpClient methodClient, AddFundsToInsuranceRequestBody addFundsToInsuranceRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'addFundsToInsuranceRequestBody' is set + if (addFundsToInsuranceRequestBody == null) + { + throw new ArgumentNullException(nameof(addFundsToInsuranceRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/insurance/shipsurance/add_funds"); + + requestOptions.Data = JsonSerializer.Serialize(addFundsToInsuranceRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "InsuranceApi.AddFundsToInsurance"; + + var result = await SendHttpRequestAsync(HttpMethods.Patch, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// 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) + public Task ConnectInsurer(ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default) + { + return ConnectInsurer(_client, connectInsurerRequestBody, cancellationToken); + } + + /// + /// Connect a Shipsurance Account Connect a Shipsurance 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 (Object) + public async Task ConnectInsurer(HttpClient methodClient, ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'connectInsurerRequestBody' is set + if (connectInsurerRequestBody == null) + { + throw new ArgumentNullException(nameof(connectInsurerRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/connections/insurance/shipsurance"); + + requestOptions.Data = JsonSerializer.Serialize(connectInsurerRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "InsuranceApi.ConnectInsurer"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Disconnect a Shipsurance Account Disconnect 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) + public Task DisconnectInsurer(CancellationToken cancellationToken = default) + { + return DisconnectInsurer(_client, cancellationToken); + } + + /// + /// Disconnect a Shipsurance Account Disconnect a Shipsurance 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 (Object) + public async Task DisconnectInsurer(HttpClient methodClient, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/connections/insurance/shipsurance"); + + + requestOptions.Operation = "InsuranceApi.DisconnectInsurer"; + + var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Insurance Funds Balance Retrieve the balance of your Shipsurance account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetInsuranceBalanceResponseBody) + public Task GetInsuranceBalance(CancellationToken cancellationToken = default) + { + return GetInsuranceBalance(_client, cancellationToken); + } + + /// + /// Get Insurance Funds Balance Retrieve the balance of your Shipsurance 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 (GetInsuranceBalanceResponseBody) + public async Task GetInsuranceBalance(HttpClient methodClient, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/insurance/shipsurance/balance"); + + + requestOptions.Operation = "InsuranceApi.GetInsuranceBalance"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/LabelsApi.cs b/ShipEngineSDK/Api/LabelsApi.cs new file mode 100644 index 00000000..6717e400 --- /dev/null +++ b/ShipEngineSDK/Api/LabelsApi.cs @@ -0,0 +1,751 @@ +// +// 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 +{ + /// + /// Purchase Label Purchase and print a label for shipment + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelResponseBody) + Task CreateLabel(CreateLabelRequestBody createLabelRequestBody, CancellationToken cancellationToken = default); + + /// + /// Purchase Label Purchase and print a label for shipment + /// + /// 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 (CreateLabelResponseBody) + Task CreateLabel(HttpClient methodClient, CreateLabelRequestBody createLabelRequestBody, CancellationToken cancellationToken = default); + + /// + /// Purchase Label with Rate ID When retrieving rates for shipments using the `/rates` endpoint, the returned information contains a `rate_id` property that can be used to generate a label without having to refill in the shipment information repeatedly. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromRateResponseBody) + Task CreateLabelFromRate(CreateLabelFromRateRequestBody createLabelFromRateRequestBody, string rateId, CancellationToken cancellationToken = default); + + /// + /// Purchase Label with Rate ID When retrieving rates for shipments using the `/rates` endpoint, the returned information contains a `rate_id` property that can be used to generate a label without having to refill in the shipment information repeatedly. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromRateResponseBody) + Task CreateLabelFromRate(HttpClient methodClient, CreateLabelFromRateRequestBody createLabelFromRateRequestBody, string rateId, CancellationToken cancellationToken = default); + + /// + /// Purchase Label with Shipment ID Purchase a label using a shipment ID that has already been created with the desired address and package info. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromShipmentResponseBody) + Task CreateLabelFromShipment(CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Purchase Label with Shipment ID Purchase a label using a shipment ID that has already been created with the desired address and package info. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromShipmentResponseBody) + Task CreateLabelFromShipment(HttpClient methodClient, CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Create a return label Create a return label + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateReturnLabelResponseBody) + Task CreateReturnLabel(CreateReturnLabelRequestBody createReturnLabelRequestBody, string labelId, CancellationToken cancellationToken = default); + + /// + /// Create a return label Create a return label + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateReturnLabelResponseBody) + Task CreateReturnLabel(HttpClient methodClient, CreateReturnLabelRequestBody createReturnLabelRequestBody, string labelId, CancellationToken cancellationToken = default); + + /// + /// Get Label By External Shipment ID Find a label by using the external shipment id that was used during label creation + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByExternalShipmentIdResponseBody) + Task GetLabelByExternalShipmentId(string externalShipmentId, LabelDownloadType? labelDownloadType, CancellationToken cancellationToken = default); + + /// + /// Get Label By External Shipment ID Find a label by using the external shipment id that was used during label creation + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByExternalShipmentIdResponseBody) + Task GetLabelByExternalShipmentId(HttpClient methodClient, string externalShipmentId, LabelDownloadType? labelDownloadType, CancellationToken cancellationToken = default); + + /// + /// Get Label By ID Retrieve information for individual labels. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Label ID + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByIdResponseBody) + Task GetLabelById(string labelId, LabelDownloadType? labelDownloadType, CancellationToken cancellationToken = default); + + /// + /// Get Label By ID Retrieve information for individual labels. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Label ID + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByIdResponseBody) + Task GetLabelById(HttpClient methodClient, string labelId, LabelDownloadType? labelDownloadType, CancellationToken cancellationToken = default); + + /// + /// Get Label Tracking Information Retrieve the label's tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogFromLabelResponseBody) + Task GetTrackingLogFromLabel(string labelId, CancellationToken cancellationToken = default); + + /// + /// Get Label Tracking Information Retrieve the label's tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogFromLabelResponseBody) + Task GetTrackingLogFromLabel(HttpClient methodClient, string labelId, CancellationToken cancellationToken = default); + + /// + /// List labels This endpoint returns a list of labels that you've [created](https://www.shipengine.com/docs/labels/create-a-label/). You can optionally filter the results as well as control their sort order and the number of results returned at a time. By default, all labels are returned, 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want to get your UPS labels for your east coast warehouse you could query by both `warehouse_id` and `carrier_id` + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Only return labels that were created on or after a specific date/time (optional) + /// Only return labels that were created on or before a specific date/time (optional) + /// Only return labels that are currently in the specified status (optional) + /// Controls the sort order of the query. (optional) + /// Only return labels for a specific [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) (optional) + /// Only return labels for a specific [carrier account](https://www.shipengine.com/docs/carriers/setup/) (optional) + /// Only return labels with a specific tracking number (optional) + /// Only return labels that were created in a specific [batch](https://www.shipengine.com/docs/labels/bulk/) (optional) + /// Rate ID (optional) + /// Shipment ID (optional) + /// Only return labels that originate from a specific [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) (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) + /// Controls which field the query is sorted by. (optional, default to created_at) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListLabelsResponseBody) + Task ListLabels(DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, LabelStatus? labelStatus, SortDir? sortDir, string? serviceCode, string? carrierId, string? trackingNumber, string? batchId, string? rateId, string? shipmentId, string? warehouseId, int? page, int? pageSize, string? sortBy, CancellationToken cancellationToken = default); + + /// + /// List labels This endpoint returns a list of labels that you've [created](https://www.shipengine.com/docs/labels/create-a-label/). You can optionally filter the results as well as control their sort order and the number of results returned at a time. By default, all labels are returned, 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want to get your UPS labels for your east coast warehouse you could query by both `warehouse_id` and `carrier_id` + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Only return labels that were created on or after a specific date/time (optional) + /// Only return labels that were created on or before a specific date/time (optional) + /// Only return labels that are currently in the specified status (optional) + /// Controls the sort order of the query. (optional) + /// Only return labels for a specific [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) (optional) + /// Only return labels for a specific [carrier account](https://www.shipengine.com/docs/carriers/setup/) (optional) + /// Only return labels with a specific tracking number (optional) + /// Only return labels that were created in a specific [batch](https://www.shipengine.com/docs/labels/bulk/) (optional) + /// Rate ID (optional) + /// Shipment ID (optional) + /// Only return labels that originate from a specific [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) (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) + /// Controls which field the query is sorted by. (optional, default to created_at) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListLabelsResponseBody) + Task ListLabels(HttpClient methodClient, DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, LabelStatus? labelStatus, SortDir? sortDir, string? serviceCode, string? carrierId, string? trackingNumber, string? batchId, string? rateId, string? shipmentId, string? warehouseId, int? page, int? pageSize, string? sortBy, CancellationToken cancellationToken = default); + + /// + /// Void a Label By ID Void a label by ID to get a refund. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (VoidLabelResponseBody) + Task VoidLabel(string labelId, CancellationToken cancellationToken = default); + + /// + /// Void a Label By ID Void a label by ID to get a refund. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (VoidLabelResponseBody) + Task VoidLabel(HttpClient methodClient, string labelId, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Purchase Label Purchase and print a label for shipment + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelResponseBody) + public Task CreateLabel(CreateLabelRequestBody createLabelRequestBody, CancellationToken cancellationToken = default) + { + return CreateLabel(_client, createLabelRequestBody, cancellationToken); + } + + /// + /// Purchase Label Purchase and print a label for shipment + /// + /// 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 (CreateLabelResponseBody) + public async Task CreateLabel(HttpClient methodClient, CreateLabelRequestBody createLabelRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createLabelRequestBody' is set + if (createLabelRequestBody == null) + { + throw new ArgumentNullException(nameof(createLabelRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/labels"); + + requestOptions.Data = JsonSerializer.Serialize(createLabelRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "LabelsApi.CreateLabel"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Purchase Label with Rate ID When retrieving rates for shipments using the `/rates` endpoint, the returned information contains a `rate_id` property that can be used to generate a label without having to refill in the shipment information repeatedly. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromRateResponseBody) + public Task CreateLabelFromRate(CreateLabelFromRateRequestBody createLabelFromRateRequestBody, string rateId, CancellationToken cancellationToken = default) + { + return CreateLabelFromRate(_client, createLabelFromRateRequestBody, rateId, cancellationToken); + } + + /// + /// Purchase Label with Rate ID When retrieving rates for shipments using the `/rates` endpoint, the returned information contains a `rate_id` property that can be used to generate a label without having to refill in the shipment information repeatedly. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromRateResponseBody) + public async Task CreateLabelFromRate(HttpClient methodClient, CreateLabelFromRateRequestBody createLabelFromRateRequestBody, string rateId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createLabelFromRateRequestBody' is set + if (createLabelFromRateRequestBody == null) + { + throw new ArgumentNullException(nameof(createLabelFromRateRequestBody)); + } + + // verify the required parameter 'rateId' is set + if (rateId == null) + { + throw new ArgumentNullException(nameof(rateId)); + } + + + RequestOptions requestOptions = new("/v1/labels/rates/{rate_id}"); + + requestOptions.PathParameters.Add("rate_id", ClientUtils.ParameterToString(rateId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(createLabelFromRateRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "LabelsApi.CreateLabelFromRate"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Purchase Label with Shipment ID Purchase a label using a shipment ID that has already been created with the desired address and package info. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromShipmentResponseBody) + public Task CreateLabelFromShipment(CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) + { + return CreateLabelFromShipment(_client, createLabelFromShipmentRequestBody, shipmentId, cancellationToken); + } + + /// + /// Purchase Label with Shipment ID Purchase a label using a shipment ID that has already been created with the desired address and package info. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateLabelFromShipmentResponseBody) + public async Task CreateLabelFromShipment(HttpClient methodClient, CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createLabelFromShipmentRequestBody' is set + if (createLabelFromShipmentRequestBody == null) + { + throw new ArgumentNullException(nameof(createLabelFromShipmentRequestBody)); + } + + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + + RequestOptions requestOptions = new("/v1/labels/shipment/{shipment_id}"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(createLabelFromShipmentRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "LabelsApi.CreateLabelFromShipment"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Create a return label Create a return label + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateReturnLabelResponseBody) + public Task CreateReturnLabel(CreateReturnLabelRequestBody createReturnLabelRequestBody, string labelId, CancellationToken cancellationToken = default) + { + return CreateReturnLabel(_client, createReturnLabelRequestBody, labelId, cancellationToken); + } + + /// + /// Create a return label Create a return label + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateReturnLabelResponseBody) + public async Task CreateReturnLabel(HttpClient methodClient, CreateReturnLabelRequestBody createReturnLabelRequestBody, string labelId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createReturnLabelRequestBody' is set + if (createReturnLabelRequestBody == null) + { + throw new ArgumentNullException(nameof(createReturnLabelRequestBody)); + } + + // verify the required parameter 'labelId' is set + if (labelId == null) + { + throw new ArgumentNullException(nameof(labelId)); + } + + + RequestOptions requestOptions = new("/v1/labels/{label_id}/return"); + + requestOptions.PathParameters.Add("label_id", ClientUtils.ParameterToString(labelId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(createReturnLabelRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "LabelsApi.CreateReturnLabel"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Label By External Shipment ID Find a label by using the external shipment id that was used during label creation + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByExternalShipmentIdResponseBody) + public Task GetLabelByExternalShipmentId(string externalShipmentId, LabelDownloadType? labelDownloadType = default, CancellationToken cancellationToken = default) + { + return GetLabelByExternalShipmentId(_client, externalShipmentId, labelDownloadType, cancellationToken); + } + + /// + /// Get Label By External Shipment ID Find a label by using the external shipment id that was used during label creation + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByExternalShipmentIdResponseBody) + public async Task GetLabelByExternalShipmentId(HttpClient methodClient, string externalShipmentId, LabelDownloadType? labelDownloadType = default, CancellationToken cancellationToken = default) + { + // verify the required parameter 'externalShipmentId' is set + if (externalShipmentId == null) + { + throw new ArgumentNullException(nameof(externalShipmentId)); + } + + + RequestOptions requestOptions = new("/v1/labels/external_shipment_id/{external_shipment_id}"); + + requestOptions.PathParameters.Add("external_shipment_id", ClientUtils.ParameterToString(externalShipmentId)); // path parameter + if (labelDownloadType != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "label_download_type", labelDownloadType)); + } + + requestOptions.Operation = "LabelsApi.GetLabelByExternalShipmentId"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Label By ID Retrieve information for individual labels. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Label ID + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByIdResponseBody) + public Task GetLabelById(string labelId, LabelDownloadType? labelDownloadType = default, CancellationToken cancellationToken = default) + { + return GetLabelById(_client, labelId, labelDownloadType, cancellationToken); + } + + /// + /// Get Label By ID Retrieve information for individual labels. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Label ID + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetLabelByIdResponseBody) + public async Task GetLabelById(HttpClient methodClient, string labelId, LabelDownloadType? labelDownloadType = default, CancellationToken cancellationToken = default) + { + // verify the required parameter 'labelId' is set + if (labelId == null) + { + throw new ArgumentNullException(nameof(labelId)); + } + + + RequestOptions requestOptions = new("/v1/labels/{label_id}"); + + requestOptions.PathParameters.Add("label_id", ClientUtils.ParameterToString(labelId)); // path parameter + if (labelDownloadType != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "label_download_type", labelDownloadType)); + } + + requestOptions.Operation = "LabelsApi.GetLabelById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Label Tracking Information Retrieve the label's tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogFromLabelResponseBody) + public Task GetTrackingLogFromLabel(string labelId, CancellationToken cancellationToken = default) + { + return GetTrackingLogFromLabel(_client, labelId, cancellationToken); + } + + /// + /// Get Label Tracking Information Retrieve the label's tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogFromLabelResponseBody) + public async Task GetTrackingLogFromLabel(HttpClient methodClient, string labelId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'labelId' is set + if (labelId == null) + { + throw new ArgumentNullException(nameof(labelId)); + } + + + RequestOptions requestOptions = new("/v1/labels/{label_id}/track"); + + requestOptions.PathParameters.Add("label_id", ClientUtils.ParameterToString(labelId)); // path parameter + + requestOptions.Operation = "LabelsApi.GetTrackingLogFromLabel"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List labels This endpoint returns a list of labels that you've [created](https://www.shipengine.com/docs/labels/create-a-label/). You can optionally filter the results as well as control their sort order and the number of results returned at a time. By default, all labels are returned, 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want to get your UPS labels for your east coast warehouse you could query by both `warehouse_id` and `carrier_id` + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Only return labels that were created on or after a specific date/time (optional) + /// Only return labels that were created on or before a specific date/time (optional) + /// Only return labels that are currently in the specified status (optional) + /// Controls the sort order of the query. (optional) + /// Only return labels for a specific [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) (optional) + /// Only return labels for a specific [carrier account](https://www.shipengine.com/docs/carriers/setup/) (optional) + /// Only return labels with a specific tracking number (optional) + /// Only return labels that were created in a specific [batch](https://www.shipengine.com/docs/labels/bulk/) (optional) + /// Rate ID (optional) + /// Shipment ID (optional) + /// Only return labels that originate from a specific [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) (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) + /// Controls which field the query is sorted by. (optional, default to created_at) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListLabelsResponseBody) + public Task ListLabels(DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, LabelStatus? labelStatus = default, SortDir? sortDir = default, string? serviceCode = default, string? carrierId = default, string? trackingNumber = default, string? batchId = default, string? rateId = default, string? shipmentId = default, string? warehouseId = default, int? page = default, int? pageSize = default, string? sortBy = default, CancellationToken cancellationToken = default) + { + return ListLabels(_client, createdAtStart, createdAtEnd, labelStatus, sortDir, serviceCode, carrierId, trackingNumber, batchId, rateId, shipmentId, warehouseId, page, pageSize, sortBy, cancellationToken); + } + + /// + /// List labels This endpoint returns a list of labels that you've [created](https://www.shipengine.com/docs/labels/create-a-label/). You can optionally filter the results as well as control their sort order and the number of results returned at a time. By default, all labels are returned, 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want to get your UPS labels for your east coast warehouse you could query by both `warehouse_id` and `carrier_id` + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Only return labels that were created on or after a specific date/time (optional) + /// Only return labels that were created on or before a specific date/time (optional) + /// Only return labels that are currently in the specified status (optional) + /// Controls the sort order of the query. (optional) + /// Only return labels for a specific [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) (optional) + /// Only return labels for a specific [carrier account](https://www.shipengine.com/docs/carriers/setup/) (optional) + /// Only return labels with a specific tracking number (optional) + /// Only return labels that were created in a specific [batch](https://www.shipengine.com/docs/labels/bulk/) (optional) + /// Rate ID (optional) + /// Shipment ID (optional) + /// Only return labels that originate from a specific [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) (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) + /// Controls which field the query is sorted by. (optional, default to created_at) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListLabelsResponseBody) + public async Task ListLabels(HttpClient methodClient, DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, LabelStatus? labelStatus = default, SortDir? sortDir = default, string? serviceCode = default, string? carrierId = default, string? trackingNumber = default, string? batchId = default, string? rateId = default, string? shipmentId = default, string? warehouseId = default, int? page = default, int? pageSize = default, string? sortBy = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/labels"); + + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (labelStatus != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "label_status", labelStatus)); + } + if (sortDir != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "sort_dir", sortDir)); + } + if (serviceCode != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "service_code", serviceCode)); + } + if (carrierId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "carrier_id", carrierId)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "tracking_number", trackingNumber)); + } + if (batchId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "batch_id", batchId)); + } + if (rateId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "rate_id", rateId)); + } + if (shipmentId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "shipment_id", shipmentId)); + } + if (warehouseId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "warehouse_id", warehouseId)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (sortBy != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "sort_by", sortBy)); + } + + requestOptions.Operation = "LabelsApi.ListLabels"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Void a Label By ID Void a label by ID to get a refund. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (VoidLabelResponseBody) + public Task VoidLabel(string labelId, CancellationToken cancellationToken = default) + { + return VoidLabel(_client, labelId, cancellationToken); + } + + /// + /// Void a Label By ID Void a label by ID to get a refund. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Label ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (VoidLabelResponseBody) + public async Task VoidLabel(HttpClient methodClient, string labelId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'labelId' is set + if (labelId == null) + { + throw new ArgumentNullException(nameof(labelId)); + } + + + RequestOptions requestOptions = new("/v1/labels/{label_id}/void"); + + requestOptions.PathParameters.Add("label_id", ClientUtils.ParameterToString(labelId)); // path parameter + + requestOptions.Operation = "LabelsApi.VoidLabel"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/ManifestsApi.cs b/ShipEngineSDK/Api/ManifestsApi.cs new file mode 100644 index 00000000..8cd04cad --- /dev/null +++ b/ShipEngineSDK/Api/ManifestsApi.cs @@ -0,0 +1,347 @@ +// +// 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 Manifest Each ShipEngine manifest is created for a specific warehouse, so you'll need to provide the warehouse_id rather than the ship_from address. You can create a warehouse for each location that you want to create manifests for. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateManifestResponseBody) + Task CreateManifest(CreateManifestRequestBody createManifestRequestBody, CancellationToken cancellationToken = default); + + /// + /// Create Manifest Each ShipEngine manifest is created for a specific warehouse, so you'll need to provide the warehouse_id rather than the ship_from address. You can create a warehouse for each location that you want to create manifests for. + /// + /// 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 (CreateManifestResponseBody) + Task CreateManifest(HttpClient methodClient, CreateManifestRequestBody createManifestRequestBody, CancellationToken cancellationToken = default); + + /// + /// Get Manifest By Id Get Manifest By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// The Manifest Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetManifestByIdResponseBody) + Task GetManifestById(string manifestId, CancellationToken cancellationToken = default); + + /// + /// Get Manifest By Id Get Manifest By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// The Manifest Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetManifestByIdResponseBody) + Task GetManifestById(HttpClient methodClient, string manifestId, CancellationToken cancellationToken = default); + + /// + /// Get Manifest Request By Id Get Manifest Request By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// The Manifest Request Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateManifestResponseBody) + Task GetManifestRequestById(string manifestRequestId, CancellationToken cancellationToken = default); + + /// + /// Get Manifest Request By Id Get Manifest Request By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// The Manifest Request Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateManifestResponseBody) + Task GetManifestRequestById(HttpClient methodClient, string manifestRequestId, CancellationToken cancellationToken = default); + + /// + /// List Manifests Similar to querying shipments, we allow you to query manifests since there will likely be a large number over a long period of time. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// ship date start range (optional) + /// ship date end range (optional) + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// (optional) + /// Warehouse ID (optional) + /// Carrier 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + Task ListManifests(DateTimeOffset? shipDateStart, DateTimeOffset? shipDateEnd, DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, List? labelIds, string? warehouseId, string? carrierId, int? page, int? pageSize, CancellationToken cancellationToken = default); + + /// + /// List Manifests Similar to querying shipments, we allow you to query manifests since there will likely be a large number over a long period of time. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// ship date start range (optional) + /// ship date end range (optional) + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// (optional) + /// Warehouse ID (optional) + /// Carrier 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + Task ListManifests(HttpClient methodClient, DateTimeOffset? shipDateStart, DateTimeOffset? shipDateEnd, DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, List? labelIds, string? warehouseId, string? carrierId, int? page, int? pageSize, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Create Manifest Each ShipEngine manifest is created for a specific warehouse, so you'll need to provide the warehouse_id rather than the ship_from address. You can create a warehouse for each location that you want to create manifests for. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateManifestResponseBody) + public Task CreateManifest(CreateManifestRequestBody createManifestRequestBody, CancellationToken cancellationToken = default) + { + return CreateManifest(_client, createManifestRequestBody, cancellationToken); + } + + /// + /// Create Manifest Each ShipEngine manifest is created for a specific warehouse, so you'll need to provide the warehouse_id rather than the ship_from address. You can create a warehouse for each location that you want to create manifests for. + /// + /// 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 (CreateManifestResponseBody) + public async Task CreateManifest(HttpClient methodClient, CreateManifestRequestBody createManifestRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createManifestRequestBody' is set + if (createManifestRequestBody == null) + { + throw new ArgumentNullException(nameof(createManifestRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/manifests"); + + requestOptions.Data = JsonSerializer.Serialize(createManifestRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "ManifestsApi.CreateManifest"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Manifest By Id Get Manifest By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// The Manifest Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetManifestByIdResponseBody) + public Task GetManifestById(string manifestId, CancellationToken cancellationToken = default) + { + return GetManifestById(_client, manifestId, cancellationToken); + } + + /// + /// Get Manifest By Id Get Manifest By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// The Manifest Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetManifestByIdResponseBody) + public async Task GetManifestById(HttpClient methodClient, string manifestId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'manifestId' is set + if (manifestId == null) + { + throw new ArgumentNullException(nameof(manifestId)); + } + + + RequestOptions requestOptions = new("/v1/manifests/{manifest_id}"); + + requestOptions.PathParameters.Add("manifest_id", ClientUtils.ParameterToString(manifestId)); // path parameter + + requestOptions.Operation = "ManifestsApi.GetManifestById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Manifest Request By Id Get Manifest Request By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// The Manifest Request Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateManifestResponseBody) + public Task GetManifestRequestById(string manifestRequestId, CancellationToken cancellationToken = default) + { + return GetManifestRequestById(_client, manifestRequestId, cancellationToken); + } + + /// + /// Get Manifest Request By Id Get Manifest Request By Id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// The Manifest Request Id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateManifestResponseBody) + public async Task GetManifestRequestById(HttpClient methodClient, string manifestRequestId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'manifestRequestId' is set + if (manifestRequestId == null) + { + throw new ArgumentNullException(nameof(manifestRequestId)); + } + + + RequestOptions requestOptions = new("/v1/manifests/requests/{manifest_request_id}"); + + requestOptions.PathParameters.Add("manifest_request_id", ClientUtils.ParameterToString(manifestRequestId)); // path parameter + + requestOptions.Operation = "ManifestsApi.GetManifestRequestById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List Manifests Similar to querying shipments, we allow you to query manifests since there will likely be a large number over a long period of time. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// ship date start range (optional) + /// ship date end range (optional) + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// (optional) + /// Warehouse ID (optional) + /// Carrier 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + public Task ListManifests(DateTimeOffset? shipDateStart = default, DateTimeOffset? shipDateEnd = default, DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, List? labelIds = default, string? warehouseId = default, string? carrierId = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + return ListManifests(_client, shipDateStart, shipDateEnd, createdAtStart, createdAtEnd, labelIds, warehouseId, carrierId, page, pageSize, cancellationToken); + } + + /// + /// List Manifests Similar to querying shipments, we allow you to query manifests since there will likely be a large number over a long period of time. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// ship date start range (optional) + /// ship date end range (optional) + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// (optional) + /// Warehouse ID (optional) + /// Carrier 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + public async Task ListManifests(HttpClient methodClient, DateTimeOffset? shipDateStart = default, DateTimeOffset? shipDateEnd = default, DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, List? labelIds = default, string? warehouseId = default, string? carrierId = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/manifests"); + + if (shipDateStart != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "ship_date_start", shipDateStart)); + } + if (shipDateEnd != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "ship_date_end", shipDateEnd)); + } + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (labelIds != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("multi", "label_ids", labelIds)); + } + if (warehouseId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "warehouse_id", warehouseId)); + } + if (carrierId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "carrier_id", carrierId)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + + requestOptions.Operation = "ManifestsApi.ListManifests"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/PackagePickupsApi.cs b/ShipEngineSDK/Api/PackagePickupsApi.cs new file mode 100644 index 00000000..ecb7af04 --- /dev/null +++ b/ShipEngineSDK/Api/PackagePickupsApi.cs @@ -0,0 +1,323 @@ +// +// 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 +{ + /// + /// Delete a Scheduled Pickup Delete a previously-scheduled pickup by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeletePickupByIdResponseBody) + Task DeleteScheduledPickup(string pickupId, CancellationToken cancellationToken = default); + + /// + /// Delete a Scheduled Pickup Delete a previously-scheduled pickup by 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 (DeletePickupByIdResponseBody) + Task DeleteScheduledPickup(HttpClient methodClient, string pickupId, CancellationToken cancellationToken = default); + + /// + /// Get Pickup By ID Get Pickup By ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPickupByIdResponseBody) + Task GetPickupById(string pickupId, CancellationToken cancellationToken = default); + + /// + /// Get Pickup By ID Get Pickup By 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 (GetPickupByIdResponseBody) + Task GetPickupById(HttpClient methodClient, string pickupId, CancellationToken cancellationToken = default); + + /// + /// List Scheduled Pickups List all pickups that have been scheduled for this carrier + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Only return scheduled pickups that were created on or after a specific date/time (optional) + /// Only return scheduled pickups that were created on or before a specific date/time (optional) + /// Carrier ID (optional) + /// Warehouse 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPickupsResponseBody) + Task ListScheduledPickups(DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, string? carrierId, string? warehouseId, int? page, int? pageSize, CancellationToken cancellationToken = default); + + /// + /// List Scheduled Pickups List all pickups that have been scheduled for this carrier + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Only return scheduled pickups that were created on or after a specific date/time (optional) + /// Only return scheduled pickups that were created on or before a specific date/time (optional) + /// Carrier ID (optional) + /// Warehouse 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPickupsResponseBody) + Task ListScheduledPickups(HttpClient methodClient, DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, string? carrierId, string? warehouseId, int? page, int? pageSize, CancellationToken cancellationToken = default); + + /// + /// Schedule a Pickup Schedule a package pickup with a carrier + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SchedulePickupResponseBody) + Task SchedulePickup(SchedulePickupRequestBody schedulePickupRequestBody, CancellationToken cancellationToken = default); + + /// + /// Schedule a Pickup Schedule a package pickup with a carrier + /// + /// 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 (SchedulePickupResponseBody) + Task SchedulePickup(HttpClient methodClient, SchedulePickupRequestBody schedulePickupRequestBody, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Delete a Scheduled Pickup Delete a previously-scheduled pickup by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeletePickupByIdResponseBody) + public Task DeleteScheduledPickup(string pickupId, CancellationToken cancellationToken = default) + { + return DeleteScheduledPickup(_client, pickupId, cancellationToken); + } + + /// + /// Delete a Scheduled Pickup Delete a previously-scheduled pickup by 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 (DeletePickupByIdResponseBody) + public async Task DeleteScheduledPickup(HttpClient methodClient, string pickupId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'pickupId' is set + if (pickupId == null) + { + throw new ArgumentNullException(nameof(pickupId)); + } + + + RequestOptions requestOptions = new("/v1/pickups/{pickup_id}"); + + requestOptions.PathParameters.Add("pickup_id", ClientUtils.ParameterToString(pickupId)); // path parameter + + requestOptions.Operation = "PackagePickupsApi.DeleteScheduledPickup"; + + var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Pickup By ID Get Pickup By ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPickupByIdResponseBody) + public Task GetPickupById(string pickupId, CancellationToken cancellationToken = default) + { + return GetPickupById(_client, pickupId, cancellationToken); + } + + /// + /// Get Pickup By ID Get Pickup By 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 (GetPickupByIdResponseBody) + public async Task GetPickupById(HttpClient methodClient, string pickupId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'pickupId' is set + if (pickupId == null) + { + throw new ArgumentNullException(nameof(pickupId)); + } + + + RequestOptions requestOptions = new("/v1/pickups/{pickup_id}"); + + requestOptions.PathParameters.Add("pickup_id", ClientUtils.ParameterToString(pickupId)); // path parameter + + requestOptions.Operation = "PackagePickupsApi.GetPickupById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List Scheduled Pickups List all pickups that have been scheduled for this carrier + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Only return scheduled pickups that were created on or after a specific date/time (optional) + /// Only return scheduled pickups that were created on or before a specific date/time (optional) + /// Carrier ID (optional) + /// Warehouse 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPickupsResponseBody) + public Task ListScheduledPickups(DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, string? carrierId = default, string? warehouseId = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + return ListScheduledPickups(_client, createdAtStart, createdAtEnd, carrierId, warehouseId, page, pageSize, cancellationToken); + } + + /// + /// List Scheduled Pickups List all pickups that have been scheduled for this carrier + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Only return scheduled pickups that were created on or after a specific date/time (optional) + /// Only return scheduled pickups that were created on or before a specific date/time (optional) + /// Carrier ID (optional) + /// Warehouse 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPickupsResponseBody) + public async Task ListScheduledPickups(HttpClient methodClient, DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, string? carrierId = default, string? warehouseId = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/pickups"); + + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (carrierId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "carrier_id", carrierId)); + } + if (warehouseId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "warehouse_id", warehouseId)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + + requestOptions.Operation = "PackagePickupsApi.ListScheduledPickups"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Schedule a Pickup Schedule a package pickup with a carrier + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SchedulePickupResponseBody) + public Task SchedulePickup(SchedulePickupRequestBody schedulePickupRequestBody, CancellationToken cancellationToken = default) + { + return SchedulePickup(_client, schedulePickupRequestBody, cancellationToken); + } + + /// + /// Schedule a Pickup Schedule a package pickup with a carrier + /// + /// 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 (SchedulePickupResponseBody) + public async Task SchedulePickup(HttpClient methodClient, SchedulePickupRequestBody schedulePickupRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'schedulePickupRequestBody' is set + if (schedulePickupRequestBody == null) + { + throw new ArgumentNullException(nameof(schedulePickupRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/pickups"); + + requestOptions.Data = JsonSerializer.Serialize(schedulePickupRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "PackagePickupsApi.SchedulePickup"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/PackageTypesApi.cs b/ShipEngineSDK/Api/PackageTypesApi.cs new file mode 100644 index 00000000..77cb2586 --- /dev/null +++ b/ShipEngineSDK/Api/PackageTypesApi.cs @@ -0,0 +1,349 @@ +// +// 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 Custom Package Type Create a custom package type to better assist in getting accurate rate estimates + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreatePackageTypeResponseBody) + Task CreatePackageType(CreatePackageTypeRequestBody createPackageTypeRequestBody, CancellationToken cancellationToken = default); + + /// + /// Create Custom Package Type Create a custom package type to better assist in getting accurate rate estimates + /// + /// 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 (CreatePackageTypeResponseBody) + Task CreatePackageType(HttpClient methodClient, CreatePackageTypeRequestBody createPackageTypeRequestBody, CancellationToken cancellationToken = default); + + /// + /// Delete A Custom Package By ID Delete a custom package using the ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task DeletePackageType(string packageId, CancellationToken cancellationToken = default); + + /// + /// Delete A Custom Package By ID Delete a custom package using the ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task DeletePackageType(HttpClient methodClient, string packageId, CancellationToken cancellationToken = default); + + /// + /// Get Custom Package Type By ID Get Custom Package Type by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPackageTypeByIdResponseBody) + Task GetPackageTypeById(string packageId, CancellationToken cancellationToken = default); + + /// + /// Get Custom Package Type By ID Get Custom Package Type by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPackageTypeByIdResponseBody) + Task GetPackageTypeById(HttpClient methodClient, string packageId, CancellationToken cancellationToken = default); + + /// + /// List Custom Package Types List the custom package types associated with the account + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListPackageTypesResponseBody) + Task ListPackageTypes(CancellationToken cancellationToken = default); + + /// + /// List Custom Package Types List the custom package types associated with the 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 (ListPackageTypesResponseBody) + Task ListPackageTypes(HttpClient methodClient, CancellationToken cancellationToken = default); + + /// + /// Update Custom Package Type By ID Update the custom package type object by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdatePackageType(UpdatePackageTypeRequestBody updatePackageTypeRequestBody, string packageId, CancellationToken cancellationToken = default); + + /// + /// Update Custom Package Type By ID Update the custom package type object by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdatePackageType(HttpClient methodClient, UpdatePackageTypeRequestBody updatePackageTypeRequestBody, string packageId, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Create Custom Package Type Create a custom package type to better assist in getting accurate rate estimates + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreatePackageTypeResponseBody) + public Task CreatePackageType(CreatePackageTypeRequestBody createPackageTypeRequestBody, CancellationToken cancellationToken = default) + { + return CreatePackageType(_client, createPackageTypeRequestBody, cancellationToken); + } + + /// + /// Create Custom Package Type Create a custom package type to better assist in getting accurate rate estimates + /// + /// 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 (CreatePackageTypeResponseBody) + public async Task CreatePackageType(HttpClient methodClient, CreatePackageTypeRequestBody createPackageTypeRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createPackageTypeRequestBody' is set + if (createPackageTypeRequestBody == null) + { + throw new ArgumentNullException(nameof(createPackageTypeRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/packages"); + + requestOptions.Data = JsonSerializer.Serialize(createPackageTypeRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "PackageTypesApi.CreatePackageType"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Delete A Custom Package By ID Delete a custom package using the ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task DeletePackageType(string packageId, CancellationToken cancellationToken = default) + { + return DeletePackageType(_client, packageId, cancellationToken); + } + + /// + /// Delete A Custom Package By ID Delete a custom package using the ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task DeletePackageType(HttpClient methodClient, string packageId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'packageId' is set + if (packageId == null) + { + throw new ArgumentNullException(nameof(packageId)); + } + + + RequestOptions requestOptions = new("/v1/packages/{package_id}"); + + requestOptions.PathParameters.Add("package_id", ClientUtils.ParameterToString(packageId)); // path parameter + + requestOptions.Operation = "PackageTypesApi.DeletePackageType"; + + var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Custom Package Type By ID Get Custom Package Type by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPackageTypeByIdResponseBody) + public Task GetPackageTypeById(string packageId, CancellationToken cancellationToken = default) + { + return GetPackageTypeById(_client, packageId, cancellationToken); + } + + /// + /// Get Custom Package Type By ID Get Custom Package Type by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetPackageTypeByIdResponseBody) + public async Task GetPackageTypeById(HttpClient methodClient, string packageId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'packageId' is set + if (packageId == null) + { + throw new ArgumentNullException(nameof(packageId)); + } + + + RequestOptions requestOptions = new("/v1/packages/{package_id}"); + + requestOptions.PathParameters.Add("package_id", ClientUtils.ParameterToString(packageId)); // path parameter + + requestOptions.Operation = "PackageTypesApi.GetPackageTypeById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List Custom Package Types List the custom package types associated with the account + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListPackageTypesResponseBody) + public Task ListPackageTypes(CancellationToken cancellationToken = default) + { + return ListPackageTypes(_client, cancellationToken); + } + + /// + /// List Custom Package Types List the custom package types associated with the 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 (ListPackageTypesResponseBody) + public async Task ListPackageTypes(HttpClient methodClient, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/packages"); + + + requestOptions.Operation = "PackageTypesApi.ListPackageTypes"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Update Custom Package Type By ID Update the custom package type object by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task UpdatePackageType(UpdatePackageTypeRequestBody updatePackageTypeRequestBody, string packageId, CancellationToken cancellationToken = default) + { + return UpdatePackageType(_client, updatePackageTypeRequestBody, packageId, cancellationToken); + } + + /// + /// Update Custom Package Type By ID Update the custom package type object by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Package ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task UpdatePackageType(HttpClient methodClient, UpdatePackageTypeRequestBody updatePackageTypeRequestBody, string packageId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'updatePackageTypeRequestBody' is set + if (updatePackageTypeRequestBody == null) + { + throw new ArgumentNullException(nameof(updatePackageTypeRequestBody)); + } + + // verify the required parameter 'packageId' is set + if (packageId == null) + { + throw new ArgumentNullException(nameof(packageId)); + } + + + RequestOptions requestOptions = new("/v1/packages/{package_id}"); + + requestOptions.PathParameters.Add("package_id", ClientUtils.ParameterToString(packageId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(updatePackageTypeRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "PackageTypesApi.UpdatePackageType"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/RatesApi.cs b/ShipEngineSDK/Api/RatesApi.cs new file mode 100644 index 00000000..1dee183e --- /dev/null +++ b/ShipEngineSDK/Api/RatesApi.cs @@ -0,0 +1,286 @@ +// +// 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 +{ + /// + /// Get Shipping Rates It's not uncommon that you want to give your customer the choice between whether they want to ship the fastest, cheapest, or the most trusted route. Most companies don't solely ship things using a single shipping option; so we provide functionality to show you all your options! + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CalculateRatesResponseBody) + Task CalculateRates(CalculateRatesRequestBody calculateRatesRequestBody, CancellationToken cancellationToken = default); + + /// + /// Get Shipping Rates It's not uncommon that you want to give your customer the choice between whether they want to ship the fastest, cheapest, or the most trusted route. Most companies don't solely ship things using a single shipping option; so we provide functionality to show you all your options! + /// + /// 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 (CalculateRatesResponseBody) + Task CalculateRates(HttpClient methodClient, CalculateRatesRequestBody calculateRatesRequestBody, CancellationToken cancellationToken = default); + + /// + /// Get Bulk Rates Get Bulk Shipment Rates + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<BulkRate>) + Task> CompareBulkRates(CompareBulkRatesRequestBody compareBulkRatesRequestBody, CancellationToken cancellationToken = default); + + /// + /// Get Bulk Rates Get Bulk Shipment Rates + /// + /// 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<BulkRate>) + Task> CompareBulkRates(HttpClient methodClient, CompareBulkRatesRequestBody compareBulkRatesRequestBody, CancellationToken cancellationToken = default); + + /// + /// Estimate Rates Get Rate Estimates + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<RateEstimate>) + Task> EstimateRates(EstimateRatesRequestBody estimateRatesRequestBody, CancellationToken cancellationToken = default); + + /// + /// Estimate Rates Get Rate Estimates + /// + /// 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<RateEstimate>) + Task> EstimateRates(HttpClient methodClient, EstimateRatesRequestBody estimateRatesRequestBody, CancellationToken cancellationToken = default); + + /// + /// Get Rate By ID Retrieve a previously queried rate by its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetRateByIdResponseBody) + Task GetRateById(string rateId, CancellationToken cancellationToken = default); + + /// + /// Get Rate By ID Retrieve a previously queried rate by its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetRateByIdResponseBody) + Task GetRateById(HttpClient methodClient, string rateId, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Get Shipping Rates It's not uncommon that you want to give your customer the choice between whether they want to ship the fastest, cheapest, or the most trusted route. Most companies don't solely ship things using a single shipping option; so we provide functionality to show you all your options! + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CalculateRatesResponseBody) + public Task CalculateRates(CalculateRatesRequestBody calculateRatesRequestBody, CancellationToken cancellationToken = default) + { + return CalculateRates(_client, calculateRatesRequestBody, cancellationToken); + } + + /// + /// Get Shipping Rates It's not uncommon that you want to give your customer the choice between whether they want to ship the fastest, cheapest, or the most trusted route. Most companies don't solely ship things using a single shipping option; so we provide functionality to show you all your options! + /// + /// 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 (CalculateRatesResponseBody) + public async Task CalculateRates(HttpClient methodClient, CalculateRatesRequestBody calculateRatesRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'calculateRatesRequestBody' is set + if (calculateRatesRequestBody == null) + { + throw new ArgumentNullException(nameof(calculateRatesRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/rates"); + + requestOptions.Data = JsonSerializer.Serialize(calculateRatesRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "RatesApi.CalculateRates"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Bulk Rates Get Bulk Shipment Rates + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<BulkRate>) + public Task> CompareBulkRates(CompareBulkRatesRequestBody compareBulkRatesRequestBody, CancellationToken cancellationToken = default) + { + return CompareBulkRates(_client, compareBulkRatesRequestBody, cancellationToken); + } + + /// + /// Get Bulk Rates Get Bulk Shipment Rates + /// + /// 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<BulkRate>) + public async Task> CompareBulkRates(HttpClient methodClient, CompareBulkRatesRequestBody compareBulkRatesRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'compareBulkRatesRequestBody' is set + if (compareBulkRatesRequestBody == null) + { + throw new ArgumentNullException(nameof(compareBulkRatesRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/rates/bulk"); + + requestOptions.Data = JsonSerializer.Serialize(compareBulkRatesRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "RatesApi.CompareBulkRates"; + + var result = await SendHttpRequestAsync>(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Estimate Rates Get Rate Estimates + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<RateEstimate>) + public Task> EstimateRates(EstimateRatesRequestBody estimateRatesRequestBody, CancellationToken cancellationToken = default) + { + return EstimateRates(_client, estimateRatesRequestBody, cancellationToken); + } + + /// + /// Estimate Rates Get Rate Estimates + /// + /// 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<RateEstimate>) + public async Task> EstimateRates(HttpClient methodClient, EstimateRatesRequestBody estimateRatesRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'estimateRatesRequestBody' is set + if (estimateRatesRequestBody == null) + { + throw new ArgumentNullException(nameof(estimateRatesRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/rates/estimate"); + + requestOptions.Data = JsonSerializer.Serialize(estimateRatesRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "RatesApi.EstimateRates"; + + var result = await SendHttpRequestAsync>(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Rate By ID Retrieve a previously queried rate by its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetRateByIdResponseBody) + public Task GetRateById(string rateId, CancellationToken cancellationToken = default) + { + return GetRateById(_client, rateId, cancellationToken); + } + + /// + /// Get Rate By ID Retrieve a previously queried rate by its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Rate ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetRateByIdResponseBody) + public async Task GetRateById(HttpClient methodClient, string rateId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'rateId' is set + if (rateId == null) + { + throw new ArgumentNullException(nameof(rateId)); + } + + + RequestOptions requestOptions = new("/v1/rates/{rate_id}"); + + requestOptions.PathParameters.Add("rate_id", ClientUtils.ParameterToString(rateId)); // path parameter + + requestOptions.Operation = "RatesApi.GetRateById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/ServicePointsApi.cs b/ShipEngineSDK/Api/ServicePointsApi.cs new file mode 100644 index 00000000..6b5dd6ae --- /dev/null +++ b/ShipEngineSDK/Api/ServicePointsApi.cs @@ -0,0 +1,182 @@ +// +// 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 +{ + /// + /// Get Service Point By ID Returns a carrier service point by using the service_point_id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Carrier code + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetServicePointByIdResponseBody) + Task ServicePointsGetById(string carrierCode, string countryCode, string servicePointId, CancellationToken cancellationToken = default); + + /// + /// Get Service Point By ID Returns a carrier service point by using the service_point_id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Carrier code + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetServicePointByIdResponseBody) + Task ServicePointsGetById(HttpClient methodClient, string carrierCode, string countryCode, string servicePointId, CancellationToken cancellationToken = default); + + /// + /// List Service Points List carrier service points by location + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListServicePointsResponseBody) + Task ServicePointsList(GetServicePointsRequest getServicePointsRequest, CancellationToken cancellationToken = default); + + /// + /// List Service Points List carrier service points by location + /// + /// 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 (ListServicePointsResponseBody) + Task ServicePointsList(HttpClient methodClient, GetServicePointsRequest getServicePointsRequest, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Get Service Point By ID Returns a carrier service point by using the service_point_id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Carrier code + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetServicePointByIdResponseBody) + public Task ServicePointsGetById(string carrierCode, string countryCode, string servicePointId, CancellationToken cancellationToken = default) + { + return ServicePointsGetById(_client, carrierCode, countryCode, servicePointId, cancellationToken); + } + + /// + /// Get Service Point By ID Returns a carrier service point by using the service_point_id + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Carrier code + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetServicePointByIdResponseBody) + public async Task ServicePointsGetById(HttpClient methodClient, string carrierCode, string countryCode, string servicePointId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'carrierCode' is set + if (carrierCode == null) + { + throw new ArgumentNullException(nameof(carrierCode)); + } + + // verify the required parameter 'countryCode' is set + if (countryCode == null) + { + throw new ArgumentNullException(nameof(countryCode)); + } + + // verify the required parameter 'servicePointId' is set + if (servicePointId == null) + { + throw new ArgumentNullException(nameof(servicePointId)); + } + + + RequestOptions requestOptions = new("/v1/service_points/{carrier_code}/{country_code}/{service_point_id}"); + + requestOptions.PathParameters.Add("carrier_code", ClientUtils.ParameterToString(carrierCode)); // path parameter + requestOptions.PathParameters.Add("country_code", ClientUtils.ParameterToString(countryCode)); // path parameter + requestOptions.PathParameters.Add("service_point_id", ClientUtils.ParameterToString(servicePointId)); // path parameter + + requestOptions.Operation = "ServicePointsApi.ServicePointsGetById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List Service Points List carrier service points by location + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListServicePointsResponseBody) + public Task ServicePointsList(GetServicePointsRequest getServicePointsRequest, CancellationToken cancellationToken = default) + { + return ServicePointsList(_client, getServicePointsRequest, cancellationToken); + } + + /// + /// List Service Points List carrier service points by location + /// + /// 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 (ListServicePointsResponseBody) + public async Task ServicePointsList(HttpClient methodClient, GetServicePointsRequest getServicePointsRequest, CancellationToken cancellationToken = default) + { + // verify the required parameter 'getServicePointsRequest' is set + if (getServicePointsRequest == null) + { + throw new ArgumentNullException(nameof(getServicePointsRequest)); + } + + + RequestOptions requestOptions = new("/v1/service_points/list"); + + requestOptions.Data = JsonSerializer.Serialize(getServicePointsRequest, JsonSerializerOptions); + + requestOptions.Operation = "ServicePointsApi.ServicePointsList"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/ShipmentsApi.cs b/ShipEngineSDK/Api/ShipmentsApi.cs new file mode 100644 index 00000000..cc40dfe1 --- /dev/null +++ b/ShipEngineSDK/Api/ShipmentsApi.cs @@ -0,0 +1,916 @@ +// +// 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 +{ + /// + /// Cancel a Shipment Mark a shipment cancelled, if it is no longer needed or being used by your organized. Any label associated with the shipment needs to be voided first An example use case would be if a batch label creation job is going to run at a set time and only queries `pending` shipments. Marking a shipment as cancelled would remove it from this process + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task CancelShipments(string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Cancel a Shipment Mark a shipment cancelled, if it is no longer needed or being used by your organized. Any label associated with the shipment needs to be voided first An example use case would be if a batch label creation job is going to run at a set time and only queries `pending` shipments. Marking a shipment as cancelled would remove it from this process + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task CancelShipments(HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Create Shipments Create one or multiple shipments. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateShipmentsResponseBody) + Task CreateShipments(CreateShipmentsRequestBody createShipmentsRequestBody, CancellationToken cancellationToken = default); + + /// + /// Create Shipments Create one or multiple shipments. + /// + /// 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 (CreateShipmentsResponseBody) + Task CreateShipments(HttpClient methodClient, CreateShipmentsRequestBody createShipmentsRequestBody, CancellationToken cancellationToken = default); + + /// + /// Get Shipment By External ID Query Shipments created using your own custom ID convention using this endpint + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetShipmentByExternalIdResponseBody) + Task GetShipmentByExternalId(string externalShipmentId, CancellationToken cancellationToken = default); + + /// + /// Get Shipment By External ID Query Shipments created using your own custom ID convention using this endpint + /// + /// 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 (GetShipmentByExternalIdResponseBody) + Task GetShipmentByExternalId(HttpClient methodClient, string externalShipmentId, CancellationToken cancellationToken = default); + + /// + /// Get Shipment By ID Get an individual shipment based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetShipmentByIdResponseBody) + Task GetShipmentById(string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Get Shipment By ID Get an individual shipment based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetShipmentByIdResponseBody) + Task GetShipmentById(HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Get Shipment Rates Get Rates for the shipment information associated with the shipment ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentRatesResponseBody) + Task ListShipmentRates(string shipmentId, DateTimeOffset? createdAtStart, CancellationToken cancellationToken = default); + + /// + /// Get Shipment Rates Get Rates for the shipment information associated with the shipment ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentRatesResponseBody) + Task ListShipmentRates(HttpClient methodClient, string shipmentId, DateTimeOffset? createdAtStart, CancellationToken cancellationToken = default); + + /// + /// List Shipments Get list of Shipments + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified after a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified before a certain time) (optional) + /// (optional) + /// (optional) + /// Controls the sort order of the query. (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (optional) + /// Sales Order 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + Task ListShipments(DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, DateTimeOffset? modifiedAtStart, DateTimeOffset? modifiedAtEnd, ShipmentStatus? shipmentStatus, ShipmentsSortBy? sortBy, SortDir? sortDir, string? batchId, string? tag, string? salesOrderId, int? page, int? pageSize, CancellationToken cancellationToken = default); + + /// + /// List Shipments Get list of Shipments + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified after a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified before a certain time) (optional) + /// (optional) + /// (optional) + /// Controls the sort order of the query. (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (optional) + /// Sales Order 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + Task ListShipments(HttpClient methodClient, DateTimeOffset? createdAtStart, DateTimeOffset? createdAtEnd, DateTimeOffset? modifiedAtStart, DateTimeOffset? modifiedAtEnd, ShipmentStatus? shipmentStatus, ShipmentsSortBy? sortBy, SortDir? sortDir, string? batchId, string? tag, string? salesOrderId, int? page, int? pageSize, CancellationToken cancellationToken = default); + + /// + /// Parse shipping info The shipment-recognition API makes it easy for you to extract shipping data from unstructured text, including people's names, addresses, package weights and dimensions, insurance and delivery requirements, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's shipment-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed shipment data is returned in the same structure that's used for other ShipEngine APIs, so you can easily use the parsed data to create a shipping label. > **Note:** Shipment 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 a `shipment` containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ParseShipmentResponseBody) + Task ParseShipment(ParseShipmentRequestBody parseShipmentRequestBody, CancellationToken cancellationToken = default); + + /// + /// Parse shipping info The shipment-recognition API makes it easy for you to extract shipping data from unstructured text, including people's names, addresses, package weights and dimensions, insurance and delivery requirements, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's shipment-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed shipment data is returned in the same structure that's used for other ShipEngine APIs, so you can easily use the parsed data to create a shipping label. > **Note:** Shipment 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 a `shipment` containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ParseShipmentResponseBody) + Task ParseShipment(HttpClient methodClient, ParseShipmentRequestBody parseShipmentRequestBody, CancellationToken cancellationToken = default); + + /// + /// Get Shipment Tags Get Shipment tags based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + Task ShipmentsListTags(string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Get Shipment Tags Get Shipment tags based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + Task ShipmentsListTags(HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Update Shipments Tags Update Shipments Tags + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + Task ShipmentsUpdateTags(UpdateShipmentsTagsRequestBody updateShipmentsTagsRequestBody, CancellationToken cancellationToken = default); + + /// + /// Update Shipments Tags Update Shipments Tags + /// + /// 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 + Task ShipmentsUpdateTags(HttpClient methodClient, UpdateShipmentsTagsRequestBody updateShipmentsTagsRequestBody, CancellationToken cancellationToken = default); + + /// + /// Add Tag to Shipment Add a tag to the shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + Task TagShipment(string shipmentId, string tagName, CancellationToken cancellationToken = default); + + /// + /// Add Tag to Shipment Add a tag to the shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + Task TagShipment(HttpClient methodClient, string shipmentId, string tagName, CancellationToken cancellationToken = default); + + /// + /// Remove Tag from Shipment Remove an existing tag from the Shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UntagShipment(string shipmentId, string tagName, CancellationToken cancellationToken = default); + + /// + /// Remove Tag from Shipment Remove an existing tag from the Shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UntagShipment(HttpClient methodClient, string shipmentId, string tagName, CancellationToken cancellationToken = default); + + /// + /// Update Shipment By ID Update a shipment object based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UpdateShipmentResponseBody) + Task UpdateShipment(UpdateShipmentRequestBody updateShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default); + + /// + /// Update Shipment By ID Update a shipment object based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UpdateShipmentResponseBody) + Task UpdateShipment(HttpClient methodClient, UpdateShipmentRequestBody updateShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Cancel a Shipment Mark a shipment cancelled, if it is no longer needed or being used by your organized. Any label associated with the shipment needs to be voided first An example use case would be if a batch label creation job is going to run at a set time and only queries `pending` shipments. Marking a shipment as cancelled would remove it from this process + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task CancelShipments(string shipmentId, CancellationToken cancellationToken = default) + { + return CancelShipments(_client, shipmentId, cancellationToken); + } + + /// + /// Cancel a Shipment Mark a shipment cancelled, if it is no longer needed or being used by your organized. Any label associated with the shipment needs to be voided first An example use case would be if a batch label creation job is going to run at a set time and only queries `pending` shipments. Marking a shipment as cancelled would remove it from this process + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task CancelShipments(HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}/cancel"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + + requestOptions.Operation = "ShipmentsApi.CancelShipments"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Create Shipments Create one or multiple shipments. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateShipmentsResponseBody) + public Task CreateShipments(CreateShipmentsRequestBody createShipmentsRequestBody, CancellationToken cancellationToken = default) + { + return CreateShipments(_client, createShipmentsRequestBody, cancellationToken); + } + + /// + /// Create Shipments Create one or multiple shipments. + /// + /// 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 (CreateShipmentsResponseBody) + public async Task CreateShipments(HttpClient methodClient, CreateShipmentsRequestBody createShipmentsRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createShipmentsRequestBody' is set + if (createShipmentsRequestBody == null) + { + throw new ArgumentNullException(nameof(createShipmentsRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/shipments"); + + requestOptions.Data = JsonSerializer.Serialize(createShipmentsRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "ShipmentsApi.CreateShipments"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Shipment By External ID Query Shipments created using your own custom ID convention using this endpint + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetShipmentByExternalIdResponseBody) + public Task GetShipmentByExternalId(string externalShipmentId, CancellationToken cancellationToken = default) + { + return GetShipmentByExternalId(_client, externalShipmentId, cancellationToken); + } + + /// + /// Get Shipment By External ID Query Shipments created using your own custom ID convention using this endpint + /// + /// 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 (GetShipmentByExternalIdResponseBody) + public async Task GetShipmentByExternalId(HttpClient methodClient, string externalShipmentId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'externalShipmentId' is set + if (externalShipmentId == null) + { + throw new ArgumentNullException(nameof(externalShipmentId)); + } + + + RequestOptions requestOptions = new("/v1/shipments/external_shipment_id/{external_shipment_id}"); + + requestOptions.PathParameters.Add("external_shipment_id", ClientUtils.ParameterToString(externalShipmentId)); // path parameter + + requestOptions.Operation = "ShipmentsApi.GetShipmentByExternalId"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Shipment By ID Get an individual shipment based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetShipmentByIdResponseBody) + public Task GetShipmentById(string shipmentId, CancellationToken cancellationToken = default) + { + return GetShipmentById(_client, shipmentId, cancellationToken); + } + + /// + /// Get Shipment By ID Get an individual shipment based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetShipmentByIdResponseBody) + public async Task GetShipmentById(HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + + requestOptions.Operation = "ShipmentsApi.GetShipmentById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Shipment Rates Get Rates for the shipment information associated with the shipment ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentRatesResponseBody) + public Task ListShipmentRates(string shipmentId, DateTimeOffset? createdAtStart = default, CancellationToken cancellationToken = default) + { + return ListShipmentRates(_client, shipmentId, createdAtStart, cancellationToken); + } + + /// + /// Get Shipment Rates Get Rates for the shipment information associated with the shipment ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentRatesResponseBody) + public async Task ListShipmentRates(HttpClient methodClient, string shipmentId, DateTimeOffset? createdAtStart = default, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}/rates"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + + requestOptions.Operation = "ShipmentsApi.ListShipmentRates"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List Shipments Get list of Shipments + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified after a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified before a certain time) (optional) + /// (optional) + /// (optional) + /// Controls the sort order of the query. (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (optional) + /// Sales Order 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + public Task ListShipments(DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, DateTimeOffset? modifiedAtStart = default, DateTimeOffset? modifiedAtEnd = default, ShipmentStatus? shipmentStatus = default, ShipmentsSortBy? sortBy = default, SortDir? sortDir = default, string? batchId = default, string? tag = default, string? salesOrderId = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + return ListShipments(_client, createdAtStart, createdAtEnd, modifiedAtStart, modifiedAtEnd, shipmentStatus, sortBy, sortDir, batchId, tag, salesOrderId, page, pageSize, cancellationToken); + } + + /// + /// List Shipments Get list of Shipments + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) (optional) + /// Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified after a certain time) (optional) + /// Used to create a filter for when a resource was modified (ex. A shipment that was modified before a certain time) (optional) + /// (optional) + /// (optional) + /// Controls the sort order of the query. (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (optional) + /// Sales Order 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) + /// The number of results to return per response. (optional, default to 25) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + public async Task ListShipments(HttpClient methodClient, DateTimeOffset? createdAtStart = default, DateTimeOffset? createdAtEnd = default, DateTimeOffset? modifiedAtStart = default, DateTimeOffset? modifiedAtEnd = default, ShipmentStatus? shipmentStatus = default, ShipmentsSortBy? sortBy = default, SortDir? sortDir = default, string? batchId = default, string? tag = default, string? salesOrderId = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/shipments"); + + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (modifiedAtStart != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "modified_at_start", modifiedAtStart)); + } + if (modifiedAtEnd != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "modified_at_end", modifiedAtEnd)); + } + if (shipmentStatus != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "shipment_status", shipmentStatus)); + } + if (sortBy != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "sort_by", sortBy)); + } + if (sortDir != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "sort_dir", sortDir)); + } + if (batchId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "batch_id", batchId)); + } + if (tag != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "tag", tag)); + } + if (salesOrderId != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "sales_order_id", salesOrderId)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + + requestOptions.Operation = "ShipmentsApi.ListShipments"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Parse shipping info The shipment-recognition API makes it easy for you to extract shipping data from unstructured text, including people's names, addresses, package weights and dimensions, insurance and delivery requirements, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's shipment-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed shipment data is returned in the same structure that's used for other ShipEngine APIs, so you can easily use the parsed data to create a shipping label. > **Note:** Shipment 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 a `shipment` containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ParseShipmentResponseBody) + public Task ParseShipment(ParseShipmentRequestBody parseShipmentRequestBody, CancellationToken cancellationToken = default) + { + return ParseShipment(_client, parseShipmentRequestBody, cancellationToken); + } + + /// + /// Parse shipping info The shipment-recognition API makes it easy for you to extract shipping data from unstructured text, including people's names, addresses, package weights and dimensions, insurance and delivery requirements, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's shipment-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed shipment data is returned in the same structure that's used for other ShipEngine APIs, so you can easily use the parsed data to create a shipping label. > **Note:** Shipment 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 a `shipment` containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ParseShipmentResponseBody) + public async Task ParseShipment(HttpClient methodClient, ParseShipmentRequestBody parseShipmentRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'parseShipmentRequestBody' is set + if (parseShipmentRequestBody == null) + { + throw new ArgumentNullException(nameof(parseShipmentRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/shipments/recognize"); + + requestOptions.Data = JsonSerializer.Serialize(parseShipmentRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "ShipmentsApi.ParseShipment"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Shipment Tags Get Shipment tags based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + public Task ShipmentsListTags(string shipmentId, CancellationToken cancellationToken = default) + { + return ShipmentsListTags(_client, shipmentId, cancellationToken); + } + + /// + /// Get Shipment Tags Get Shipment tags based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + public async Task ShipmentsListTags(HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}/tags"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + + requestOptions.Operation = "ShipmentsApi.ShipmentsListTags"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Update Shipments Tags Update Shipments Tags + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public Task ShipmentsUpdateTags(UpdateShipmentsTagsRequestBody updateShipmentsTagsRequestBody, CancellationToken cancellationToken = default) + { + return ShipmentsUpdateTags(_client, updateShipmentsTagsRequestBody, cancellationToken); + } + + /// + /// Update Shipments Tags Update Shipments Tags + /// + /// 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 + public async Task ShipmentsUpdateTags(HttpClient methodClient, UpdateShipmentsTagsRequestBody updateShipmentsTagsRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'updateShipmentsTagsRequestBody' is set + if (updateShipmentsTagsRequestBody == null) + { + throw new ArgumentNullException(nameof(updateShipmentsTagsRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/shipments/tags"); + + requestOptions.Data = JsonSerializer.Serialize(updateShipmentsTagsRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "ShipmentsApi.ShipmentsUpdateTags"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Add Tag to Shipment Add a tag to the shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + public Task TagShipment(string shipmentId, string tagName, CancellationToken cancellationToken = default) + { + return TagShipment(_client, shipmentId, tagName, cancellationToken); + } + + /// + /// Add Tag to Shipment Add a tag to the shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TagShipmentResponseBody) + public async Task TagShipment(HttpClient methodClient, string shipmentId, string tagName, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + // verify the required parameter 'tagName' is set + if (tagName == null) + { + throw new ArgumentNullException(nameof(tagName)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}/tags/{tag_name}"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + requestOptions.PathParameters.Add("tag_name", ClientUtils.ParameterToString(tagName)); // path parameter + + requestOptions.Operation = "ShipmentsApi.TagShipment"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Remove Tag from Shipment Remove an existing tag from the Shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task UntagShipment(string shipmentId, string tagName, CancellationToken cancellationToken = default) + { + return UntagShipment(_client, shipmentId, tagName, cancellationToken); + } + + /// + /// Remove Tag from Shipment Remove an existing tag from the Shipment object + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Shipment ID + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task UntagShipment(HttpClient methodClient, string shipmentId, string tagName, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + // verify the required parameter 'tagName' is set + if (tagName == null) + { + throw new ArgumentNullException(nameof(tagName)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}/tags/{tag_name}"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + requestOptions.PathParameters.Add("tag_name", ClientUtils.ParameterToString(tagName)); // path parameter + + requestOptions.Operation = "ShipmentsApi.UntagShipment"; + + var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Update Shipment By ID Update a shipment object based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UpdateShipmentResponseBody) + public Task UpdateShipment(UpdateShipmentRequestBody updateShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) + { + return UpdateShipment(_client, updateShipmentRequestBody, shipmentId, cancellationToken); + } + + /// + /// Update Shipment By ID Update a shipment object based on its ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Shipment ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UpdateShipmentResponseBody) + public async Task UpdateShipment(HttpClient methodClient, UpdateShipmentRequestBody updateShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'updateShipmentRequestBody' is set + if (updateShipmentRequestBody == null) + { + throw new ArgumentNullException(nameof(updateShipmentRequestBody)); + } + + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}"); + + requestOptions.PathParameters.Add("shipment_id", ClientUtils.ParameterToString(shipmentId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(updateShipmentRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "ShipmentsApi.UpdateShipment"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/TagsApi.cs b/ShipEngineSDK/Api/TagsApi.cs new file mode 100644 index 00000000..94031585 --- /dev/null +++ b/ShipEngineSDK/Api/TagsApi.cs @@ -0,0 +1,286 @@ +// +// 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 a New Tag Create a new Tag for customizing how you track your shipments + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateTagResponseBody) + Task CreateTag(string tagName, CancellationToken cancellationToken = default); + + /// + /// Create a New Tag Create a new Tag for customizing how you track your shipments + /// + /// 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 (CreateTagResponseBody) + Task CreateTag(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default); + + /// + /// Delete Tag Delete a tag that is no longer needed + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task DeleteTag(string tagName, CancellationToken cancellationToken = default); + + /// + /// Delete Tag Delete a tag that is no longer needed + /// + /// 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 (string) + Task DeleteTag(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default); + + /// + /// Get Tags Get a list of all tags associated with an account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListTagsResponseBody) + Task ListTags(CancellationToken cancellationToken = default); + + /// + /// Get Tags Get a list of all tags associated with an 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 (ListTagsResponseBody) + Task ListTags(HttpClient methodClient, CancellationToken cancellationToken = default); + + /// + /// Update Tag Name Change a tag name while still keeping the relevant shipments attached to it + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task RenameTag(string tagName, string newTagName, CancellationToken cancellationToken = default); + + /// + /// Update Tag Name Change a tag name while still keeping the relevant shipments attached to it + /// + /// 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 (string) + Task RenameTag(HttpClient methodClient, string tagName, string newTagName, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Create a New Tag Create a new Tag for customizing how you track your shipments + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateTagResponseBody) + public Task CreateTag(string tagName, CancellationToken cancellationToken = default) + { + return CreateTag(_client, tagName, cancellationToken); + } + + /// + /// Create a New Tag Create a new Tag for customizing how you track your shipments + /// + /// 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 (CreateTagResponseBody) + public async Task CreateTag(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default) + { + // verify the required parameter 'tagName' is set + if (tagName == null) + { + throw new ArgumentNullException(nameof(tagName)); + } + + + RequestOptions requestOptions = new("/v1/tags/{tag_name}"); + + requestOptions.PathParameters.Add("tag_name", ClientUtils.ParameterToString(tagName)); // path parameter + + requestOptions.Operation = "TagsApi.CreateTag"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Delete Tag Delete a tag that is no longer needed + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task DeleteTag(string tagName, CancellationToken cancellationToken = default) + { + return DeleteTag(_client, tagName, cancellationToken); + } + + /// + /// Delete Tag Delete a tag that is no longer needed + /// + /// 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 (string) + public async Task DeleteTag(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default) + { + // verify the required parameter 'tagName' is set + if (tagName == null) + { + throw new ArgumentNullException(nameof(tagName)); + } + + + RequestOptions requestOptions = new("/v1/tags/{tag_name}"); + + requestOptions.PathParameters.Add("tag_name", ClientUtils.ParameterToString(tagName)); // path parameter + + requestOptions.Operation = "TagsApi.DeleteTag"; + + var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Tags Get a list of all tags associated with an account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListTagsResponseBody) + public Task ListTags(CancellationToken cancellationToken = default) + { + return ListTags(_client, cancellationToken); + } + + /// + /// Get Tags Get a list of all tags associated with an 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 (ListTagsResponseBody) + public async Task ListTags(HttpClient methodClient, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/tags"); + + + requestOptions.Operation = "TagsApi.ListTags"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Update Tag Name Change a tag name while still keeping the relevant shipments attached to it + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task RenameTag(string tagName, string newTagName, CancellationToken cancellationToken = default) + { + return RenameTag(_client, tagName, newTagName, cancellationToken); + } + + /// + /// Update Tag Name Change a tag name while still keeping the relevant shipments attached to it + /// + /// 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 (string) + public async Task RenameTag(HttpClient methodClient, string tagName, string newTagName, CancellationToken cancellationToken = default) + { + // verify the required parameter 'tagName' is set + if (tagName == null) + { + throw new ArgumentNullException(nameof(tagName)); + } + + // verify the required parameter 'newTagName' is set + if (newTagName == null) + { + throw new ArgumentNullException(nameof(newTagName)); + } + + + RequestOptions requestOptions = new("/v1/tags/{tag_name}/{new_tag_name}"); + + requestOptions.PathParameters.Add("tag_name", ClientUtils.ParameterToString(tagName)); // path parameter + requestOptions.PathParameters.Add("new_tag_name", ClientUtils.ParameterToString(newTagName)); // path parameter + + requestOptions.Operation = "TagsApi.RenameTag"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/TokensApi.cs b/ShipEngineSDK/Api/TokensApi.cs new file mode 100644 index 00000000..679e4c92 --- /dev/null +++ b/ShipEngineSDK/Api/TokensApi.cs @@ -0,0 +1,94 @@ +// +// 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 +{ + /// + /// Get Ephemeral Token This endpoint returns a token that can be passed to an application for authorized access. The lifetime of this token is 10 seconds. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Include a redirect url to the application formatted with the ephemeral token. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TokensGetEphemeralTokenResponseBodyYaml) + Task TokensGetEphemeralToken(Redirect? redirect, CancellationToken cancellationToken = default); + + /// + /// Get Ephemeral Token This endpoint returns a token that can be passed to an application for authorized access. The lifetime of this token is 10 seconds. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Include a redirect url to the application formatted with the ephemeral token. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TokensGetEphemeralTokenResponseBodyYaml) + Task TokensGetEphemeralToken(HttpClient methodClient, Redirect? redirect, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Get Ephemeral Token This endpoint returns a token that can be passed to an application for authorized access. The lifetime of this token is 10 seconds. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Include a redirect url to the application formatted with the ephemeral token. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TokensGetEphemeralTokenResponseBodyYaml) + public Task TokensGetEphemeralToken(Redirect? redirect = default, CancellationToken cancellationToken = default) + { + return TokensGetEphemeralToken(_client, redirect, cancellationToken); + } + + /// + /// Get Ephemeral Token This endpoint returns a token that can be passed to an application for authorized access. The lifetime of this token is 10 seconds. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Include a redirect url to the application formatted with the ephemeral token. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TokensGetEphemeralTokenResponseBodyYaml) + public async Task TokensGetEphemeralToken(HttpClient methodClient, Redirect? redirect = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/tokens/ephemeral"); + + if (redirect != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "redirect", redirect)); + } + + requestOptions.Operation = "TokensApi.TokensGetEphemeralToken"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/TrackingApi.cs b/ShipEngineSDK/Api/TrackingApi.cs new file mode 100644 index 00000000..6e80832f --- /dev/null +++ b/ShipEngineSDK/Api/TrackingApi.cs @@ -0,0 +1,238 @@ +// +// 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 +{ + /// + /// Get Tracking Information Retrieve package tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogResponseBody) + Task GetTrackingLog(string? carrierCode, string? trackingNumber, CancellationToken cancellationToken = default); + + /// + /// Get Tracking Information Retrieve package tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogResponseBody) + Task GetTrackingLog(HttpClient methodClient, string? carrierCode, string? trackingNumber, CancellationToken cancellationToken = default); + + /// + /// Start Tracking a Package Allows you to subscribe to tracking updates for a package. You specify the carrier_code and tracking_number of the package, and receive notifications via webhooks whenever the shipping status changes. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task StartTracking(string? carrierCode, string? trackingNumber, CancellationToken cancellationToken = default); + + /// + /// Start Tracking a Package Allows you to subscribe to tracking updates for a package. You specify the carrier_code and tracking_number of the package, and receive notifications via webhooks whenever the shipping status changes. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task StartTracking(HttpClient methodClient, string? carrierCode, string? trackingNumber, CancellationToken cancellationToken = default); + + /// + /// Stop Tracking a Package Unsubscribe from tracking updates for a package. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task StopTracking(string? carrierCode, string? trackingNumber, CancellationToken cancellationToken = default); + + /// + /// Stop Tracking a Package Unsubscribe from tracking updates for a package. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task StopTracking(HttpClient methodClient, string? carrierCode, string? trackingNumber, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Get Tracking Information Retrieve package tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogResponseBody) + public Task GetTrackingLog(string? carrierCode = default, string? trackingNumber = default, CancellationToken cancellationToken = default) + { + return GetTrackingLog(_client, carrierCode, trackingNumber, cancellationToken); + } + + /// + /// Get Tracking Information Retrieve package tracking information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetTrackingLogResponseBody) + public async Task GetTrackingLog(HttpClient methodClient, string? carrierCode = default, string? trackingNumber = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/tracking"); + + if (carrierCode != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "carrier_code", carrierCode)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "tracking_number", trackingNumber)); + } + + requestOptions.Operation = "TrackingApi.GetTrackingLog"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Start Tracking a Package Allows you to subscribe to tracking updates for a package. You specify the carrier_code and tracking_number of the package, and receive notifications via webhooks whenever the shipping status changes. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task StartTracking(string? carrierCode = default, string? trackingNumber = default, CancellationToken cancellationToken = default) + { + return StartTracking(_client, carrierCode, trackingNumber, cancellationToken); + } + + /// + /// Start Tracking a Package Allows you to subscribe to tracking updates for a package. You specify the carrier_code and tracking_number of the package, and receive notifications via webhooks whenever the shipping status changes. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task StartTracking(HttpClient methodClient, string? carrierCode = default, string? trackingNumber = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/tracking/start"); + + if (carrierCode != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "carrier_code", carrierCode)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "tracking_number", trackingNumber)); + } + + requestOptions.Operation = "TrackingApi.StartTracking"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Stop Tracking a Package Unsubscribe from tracking updates for a package. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task StopTracking(string? carrierCode = default, string? trackingNumber = default, CancellationToken cancellationToken = default) + { + return StopTracking(_client, carrierCode, trackingNumber, cancellationToken); + } + + /// + /// Stop Tracking a Package Unsubscribe from tracking updates for a package. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. (optional) + /// The tracking number associated with a shipment (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task StopTracking(HttpClient methodClient, string? carrierCode = default, string? trackingNumber = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/tracking/stop"); + + if (carrierCode != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "carrier_code", carrierCode)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "tracking_number", trackingNumber)); + } + + requestOptions.Operation = "TrackingApi.StopTracking"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/WarehousesApi.cs b/ShipEngineSDK/Api/WarehousesApi.cs new file mode 100644 index 00000000..e13d4502 --- /dev/null +++ b/ShipEngineSDK/Api/WarehousesApi.cs @@ -0,0 +1,423 @@ +// +// 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 Warehouse Create a warehouse location that you can use to create shipping items by simply passing in the generated warehouse id. If the return address is not supplied in the request body then it is assumed that the origin address is the return address as well + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateWarehouseResponseBody) + Task CreateWarehouse(CreateWarehouseRequestBody createWarehouseRequestBody, CancellationToken cancellationToken = default); + + /// + /// Create Warehouse Create a warehouse location that you can use to create shipping items by simply passing in the generated warehouse id. If the return address is not supplied in the request body then it is assumed that the origin address is the return address as well + /// + /// 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 (CreateWarehouseResponseBody) + Task CreateWarehouse(HttpClient methodClient, CreateWarehouseRequestBody createWarehouseRequestBody, CancellationToken cancellationToken = default); + + /// + /// Delete Warehouse By ID Delete a warehouse by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task DeleteWarehouse(string warehouseId, CancellationToken cancellationToken = default); + + /// + /// Delete Warehouse By ID Delete a warehouse by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task DeleteWarehouse(HttpClient methodClient, string warehouseId, CancellationToken cancellationToken = default); + + /// + /// Get Warehouse By Id Retrieve warehouse data based on the warehouse ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWarehouseByIdResponseBody) + Task GetWarehouseById(string warehouseId, CancellationToken cancellationToken = default); + + /// + /// Get Warehouse By Id Retrieve warehouse data based on the warehouse ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWarehouseByIdResponseBody) + Task GetWarehouseById(HttpClient methodClient, string warehouseId, CancellationToken cancellationToken = default); + + /// + /// List Warehouses Retrieve a list of warehouses associated with this account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListWarehousesResponseBody) + Task ListWarehouses(CancellationToken cancellationToken = default); + + /// + /// List Warehouses Retrieve a list of warehouses associated with 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 (ListWarehousesResponseBody) + Task ListWarehouses(HttpClient methodClient, CancellationToken cancellationToken = default); + + /// + /// Update Warehouse By Id Update Warehouse object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdateWarehouse(UpdateWarehouseRequestBody updateWarehouseRequestBody, string warehouseId, CancellationToken cancellationToken = default); + + /// + /// Update Warehouse By Id Update Warehouse object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdateWarehouse(HttpClient methodClient, UpdateWarehouseRequestBody updateWarehouseRequestBody, string warehouseId, CancellationToken cancellationToken = default); + + /// + /// Update Warehouse Settings Update Warehouse settings object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdateWarehouseSettings(UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, string warehouseId, CancellationToken cancellationToken = default); + + /// + /// Update Warehouse Settings Update Warehouse settings object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdateWarehouseSettings(HttpClient methodClient, UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, string warehouseId, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Create Warehouse Create a warehouse location that you can use to create shipping items by simply passing in the generated warehouse id. If the return address is not supplied in the request body then it is assumed that the origin address is the return address as well + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateWarehouseResponseBody) + public Task CreateWarehouse(CreateWarehouseRequestBody createWarehouseRequestBody, CancellationToken cancellationToken = default) + { + return CreateWarehouse(_client, createWarehouseRequestBody, cancellationToken); + } + + /// + /// Create Warehouse Create a warehouse location that you can use to create shipping items by simply passing in the generated warehouse id. If the return address is not supplied in the request body then it is assumed that the origin address is the return address as well + /// + /// 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 (CreateWarehouseResponseBody) + public async Task CreateWarehouse(HttpClient methodClient, CreateWarehouseRequestBody createWarehouseRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createWarehouseRequestBody' is set + if (createWarehouseRequestBody == null) + { + throw new ArgumentNullException(nameof(createWarehouseRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/warehouses"); + + requestOptions.Data = JsonSerializer.Serialize(createWarehouseRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "WarehousesApi.CreateWarehouse"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Delete Warehouse By ID Delete a warehouse by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task DeleteWarehouse(string warehouseId, CancellationToken cancellationToken = default) + { + return DeleteWarehouse(_client, warehouseId, cancellationToken); + } + + /// + /// Delete Warehouse By ID Delete a warehouse by ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task DeleteWarehouse(HttpClient methodClient, string warehouseId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'warehouseId' is set + if (warehouseId == null) + { + throw new ArgumentNullException(nameof(warehouseId)); + } + + + RequestOptions requestOptions = new("/v1/warehouses/{warehouse_id}"); + + requestOptions.PathParameters.Add("warehouse_id", ClientUtils.ParameterToString(warehouseId)); // path parameter + + requestOptions.Operation = "WarehousesApi.DeleteWarehouse"; + + var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Warehouse By Id Retrieve warehouse data based on the warehouse ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWarehouseByIdResponseBody) + public Task GetWarehouseById(string warehouseId, CancellationToken cancellationToken = default) + { + return GetWarehouseById(_client, warehouseId, cancellationToken); + } + + /// + /// Get Warehouse By Id Retrieve warehouse data based on the warehouse ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWarehouseByIdResponseBody) + public async Task GetWarehouseById(HttpClient methodClient, string warehouseId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'warehouseId' is set + if (warehouseId == null) + { + throw new ArgumentNullException(nameof(warehouseId)); + } + + + RequestOptions requestOptions = new("/v1/warehouses/{warehouse_id}"); + + requestOptions.PathParameters.Add("warehouse_id", ClientUtils.ParameterToString(warehouseId)); // path parameter + + requestOptions.Operation = "WarehousesApi.GetWarehouseById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List Warehouses Retrieve a list of warehouses associated with this account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListWarehousesResponseBody) + public Task ListWarehouses(CancellationToken cancellationToken = default) + { + return ListWarehouses(_client, cancellationToken); + } + + /// + /// List Warehouses Retrieve a list of warehouses associated with 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 (ListWarehousesResponseBody) + public async Task ListWarehouses(HttpClient methodClient, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/warehouses"); + + + requestOptions.Operation = "WarehousesApi.ListWarehouses"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Update Warehouse By Id Update Warehouse object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task UpdateWarehouse(UpdateWarehouseRequestBody updateWarehouseRequestBody, string warehouseId, CancellationToken cancellationToken = default) + { + return UpdateWarehouse(_client, updateWarehouseRequestBody, warehouseId, cancellationToken); + } + + /// + /// Update Warehouse By Id Update Warehouse object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task UpdateWarehouse(HttpClient methodClient, UpdateWarehouseRequestBody updateWarehouseRequestBody, string warehouseId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'updateWarehouseRequestBody' is set + if (updateWarehouseRequestBody == null) + { + throw new ArgumentNullException(nameof(updateWarehouseRequestBody)); + } + + // verify the required parameter 'warehouseId' is set + if (warehouseId == null) + { + throw new ArgumentNullException(nameof(warehouseId)); + } + + + RequestOptions requestOptions = new("/v1/warehouses/{warehouse_id}"); + + requestOptions.PathParameters.Add("warehouse_id", ClientUtils.ParameterToString(warehouseId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(updateWarehouseRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "WarehousesApi.UpdateWarehouse"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Update Warehouse Settings Update Warehouse settings object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task UpdateWarehouseSettings(UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, string warehouseId, CancellationToken cancellationToken = default) + { + return UpdateWarehouseSettings(_client, updateWarehouseSettingsRequestBody, warehouseId, cancellationToken); + } + + /// + /// Update Warehouse Settings Update Warehouse settings object information + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Warehouse ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task UpdateWarehouseSettings(HttpClient methodClient, UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, string warehouseId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'updateWarehouseSettingsRequestBody' is set + if (updateWarehouseSettingsRequestBody == null) + { + throw new ArgumentNullException(nameof(updateWarehouseSettingsRequestBody)); + } + + // verify the required parameter 'warehouseId' is set + if (warehouseId == null) + { + throw new ArgumentNullException(nameof(warehouseId)); + } + + + RequestOptions requestOptions = new("/v1/warehouses/{warehouse_id}/settings"); + + requestOptions.PathParameters.Add("warehouse_id", ClientUtils.ParameterToString(warehouseId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(updateWarehouseSettingsRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "WarehousesApi.UpdateWarehouseSettings"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Api/WebhooksApi.cs b/ShipEngineSDK/Api/WebhooksApi.cs new file mode 100644 index 00000000..9c6c951d --- /dev/null +++ b/ShipEngineSDK/Api/WebhooksApi.cs @@ -0,0 +1,349 @@ +// +// 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 a Webhook Create a webook for specific events in the environment. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateWebhookResponseBody) + Task CreateWebhook(CreateWebhookRequestBody createWebhookRequestBody, CancellationToken cancellationToken = default); + + /// + /// Create a Webhook Create a webook for specific events in the environment. + /// + /// 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 (CreateWebhookResponseBody) + Task CreateWebhook(HttpClient methodClient, CreateWebhookRequestBody createWebhookRequestBody, CancellationToken cancellationToken = default); + + /// + /// Delete Webhook By ID Delete a webhook + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task DeleteWebhook(string webhookId, CancellationToken cancellationToken = default); + + /// + /// Delete Webhook By ID Delete a webhook + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task DeleteWebhook(HttpClient methodClient, string webhookId, CancellationToken cancellationToken = default); + + /// + /// Get Webhook By ID Retrieve individual webhook by an ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWebhookByIdResponseBody) + Task GetWebhookById(string webhookId, CancellationToken cancellationToken = default); + + /// + /// Get Webhook By ID Retrieve individual webhook by an ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWebhookByIdResponseBody) + Task GetWebhookById(HttpClient methodClient, string webhookId, CancellationToken cancellationToken = default); + + /// + /// List Webhooks List all webhooks currently enabled for the account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Webhook>) + Task> ListWebhooks(CancellationToken cancellationToken = default); + + /// + /// List Webhooks List all webhooks currently enabled for the 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 (List<Webhook>) + Task> ListWebhooks(HttpClient methodClient, CancellationToken cancellationToken = default); + + /// + /// Update a Webhook Update the webhook url property + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdateWebhook(UpdateWebhookRequestBody updateWebhookRequestBody, string webhookId, CancellationToken cancellationToken = default); + + /// + /// Update a Webhook Update the webhook url property + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + Task UpdateWebhook(HttpClient methodClient, UpdateWebhookRequestBody updateWebhookRequestBody, string webhookId, CancellationToken cancellationToken = default); + +} + +/// +/// Represents a collection of functions to interact with the API endpoints +/// +public partial class ShipEngine +{ + /// + /// Create a Webhook Create a webook for specific events in the environment. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateWebhookResponseBody) + public Task CreateWebhook(CreateWebhookRequestBody createWebhookRequestBody, CancellationToken cancellationToken = default) + { + return CreateWebhook(_client, createWebhookRequestBody, cancellationToken); + } + + /// + /// Create a Webhook Create a webook for specific events in the environment. + /// + /// 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 (CreateWebhookResponseBody) + public async Task CreateWebhook(HttpClient methodClient, CreateWebhookRequestBody createWebhookRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'createWebhookRequestBody' is set + if (createWebhookRequestBody == null) + { + throw new ArgumentNullException(nameof(createWebhookRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/environment/webhooks"); + + requestOptions.Data = JsonSerializer.Serialize(createWebhookRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "WebhooksApi.CreateWebhook"; + + var result = await SendHttpRequestAsync(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Delete Webhook By ID Delete a webhook + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task DeleteWebhook(string webhookId, CancellationToken cancellationToken = default) + { + return DeleteWebhook(_client, webhookId, cancellationToken); + } + + /// + /// Delete Webhook By ID Delete a webhook + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task DeleteWebhook(HttpClient methodClient, string webhookId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + { + throw new ArgumentNullException(nameof(webhookId)); + } + + + RequestOptions requestOptions = new("/v1/environment/webhooks/{webhook_id}"); + + requestOptions.PathParameters.Add("webhook_id", ClientUtils.ParameterToString(webhookId)); // path parameter + + requestOptions.Operation = "WebhooksApi.DeleteWebhook"; + + var result = await SendHttpRequestAsync(HttpMethods.Delete, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Get Webhook By ID Retrieve individual webhook by an ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWebhookByIdResponseBody) + public Task GetWebhookById(string webhookId, CancellationToken cancellationToken = default) + { + return GetWebhookById(_client, webhookId, cancellationToken); + } + + /// + /// Get Webhook By ID Retrieve individual webhook by an ID + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GetWebhookByIdResponseBody) + public async Task GetWebhookById(HttpClient methodClient, string webhookId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + { + throw new ArgumentNullException(nameof(webhookId)); + } + + + RequestOptions requestOptions = new("/v1/environment/webhooks/{webhook_id}"); + + requestOptions.PathParameters.Add("webhook_id", ClientUtils.ParameterToString(webhookId)); // path parameter + + requestOptions.Operation = "WebhooksApi.GetWebhookById"; + + var result = await SendHttpRequestAsync(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// List Webhooks List all webhooks currently enabled for the account. + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Webhook>) + public Task> ListWebhooks(CancellationToken cancellationToken = default) + { + return ListWebhooks(_client, cancellationToken); + } + + /// + /// List Webhooks List all webhooks currently enabled for the 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 (List<Webhook>) + public async Task> ListWebhooks(HttpClient methodClient, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/environment/webhooks"); + + + requestOptions.Operation = "WebhooksApi.ListWebhooks"; + + var result = await SendHttpRequestAsync>(HttpMethods.Get, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + + /// + /// Update a Webhook Update the webhook url property + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public Task UpdateWebhook(UpdateWebhookRequestBody updateWebhookRequestBody, string webhookId, CancellationToken cancellationToken = default) + { + return UpdateWebhook(_client, updateWebhookRequestBody, webhookId, cancellationToken); + } + + /// + /// Update a Webhook Update the webhook url property + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + /// + /// Webhook ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async Task UpdateWebhook(HttpClient methodClient, UpdateWebhookRequestBody updateWebhookRequestBody, string webhookId, CancellationToken cancellationToken = default) + { + // verify the required parameter 'updateWebhookRequestBody' is set + if (updateWebhookRequestBody == null) + { + throw new ArgumentNullException(nameof(updateWebhookRequestBody)); + } + + // verify the required parameter 'webhookId' is set + if (webhookId == null) + { + throw new ArgumentNullException(nameof(webhookId)); + } + + + RequestOptions requestOptions = new("/v1/environment/webhooks/{webhook_id}"); + + requestOptions.PathParameters.Add("webhook_id", ClientUtils.ParameterToString(webhookId)); // path parameter + requestOptions.Data = JsonSerializer.Serialize(updateWebhookRequestBody, JsonSerializerOptions); + + requestOptions.Operation = "WebhooksApi.UpdateWebhook"; + + var result = await SendHttpRequestAsync(HttpMethods.Put, requestOptions, methodClient, _config, cancellationToken); + + return result; + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/ClientUtils.cs b/ShipEngineSDK/ClientUtils.cs index 0ee5539b..2abeae29 100644 --- a/ShipEngineSDK/ClientUtils.cs +++ b/ShipEngineSDK/ClientUtils.cs @@ -6,6 +6,8 @@ namespace ShipEngineSDK; +using System.Diagnostics.CodeAnalysis; + /// /// Utility functions providing some benefit to API client consumers. /// @@ -69,7 +71,8 @@ public static Multimap ParameterToMultiMap(string collectionForm /// /// The parameter (header, path, query, form). /// Formatted string. - public static string ParameterToString(object obj) + [return: NotNullIfNotNull("obj")] + public static string? ParameterToString(object? obj) { return obj switch { @@ -111,17 +114,14 @@ private static bool HasEnumMemberAttrValue(object enumVal) /// /// /// EnumMember value as string otherwise null - private static string GetEnumMemberAttrValue(object enumVal) + private static string? GetEnumMemberAttrValue(object enumVal) { if (enumVal == null) throw new ArgumentNullException(nameof(enumVal)); var enumType = enumVal.GetType(); var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) - { - return attr.Value; - } - return null; + + return attr?.Value; } } \ No newline at end of file diff --git a/ShipEngineSDK/CompilerSupport/CompilerFeatureRequiredAttribute.cs b/ShipEngineSDK/CompilerSupport/CompilerFeatureRequiredAttribute.cs new file mode 100644 index 00000000..d03294e4 --- /dev/null +++ b/ShipEngineSDK/CompilerSupport/CompilerFeatureRequiredAttribute.cs @@ -0,0 +1,36 @@ +namespace System.Runtime.CompilerServices; + +/// +/// Indicates that compiler support for a particular feature is required for the location where this attribute is applied. +/// +[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] +public sealed class CompilerFeatureRequiredAttribute : Attribute +{ + /// + /// Constructor + /// + public CompilerFeatureRequiredAttribute(string featureName) + { + FeatureName = featureName; + } + + /// + /// The name of the compiler feature. + /// + public string FeatureName { get; } + + /// + /// If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand . + /// + public bool IsOptional { get; init; } + + /// + /// The used for the ref structs C# feature. + /// + public const string RefStructs = nameof(RefStructs); + + /// + /// The used for the required members C# feature. + /// + public const string RequiredMembers = nameof(RequiredMembers); +} \ No newline at end of file diff --git a/ShipEngineSDK/CompilerSupport/IsExternalInit.cs b/ShipEngineSDK/CompilerSupport/IsExternalInit.cs new file mode 100644 index 00000000..e1ef35e8 --- /dev/null +++ b/ShipEngineSDK/CompilerSupport/IsExternalInit.cs @@ -0,0 +1,10 @@ +using System.ComponentModel; + +namespace System.Runtime.CompilerServices +{ + [EditorBrowsable(EditorBrowsableState.Never)] + internal class IsExternalInit + { + + } +} \ No newline at end of file diff --git a/ShipEngineSDK/CompilerSupport/NotNullIfNotNullAttribute.cs b/ShipEngineSDK/CompilerSupport/NotNullIfNotNullAttribute.cs new file mode 100644 index 00000000..94388bb4 --- /dev/null +++ b/ShipEngineSDK/CompilerSupport/NotNullIfNotNullAttribute.cs @@ -0,0 +1,14 @@ +/* + * Add an implementation of NotNullIfNotNull for NETStandard2 + * https://medium.com/@pawel.gerr/c-8-nullable-reference-types-in-net-standard-2-1-and-net-4-x-e1f5a3e657f3 + */ + +#if !NETSTANDARD2_1 +namespace System.Diagnostics.CodeAnalysis; + +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)] +internal sealed class NotNullIfNotNullAttribute(string parameterName) : Attribute +{ + public string ParameterName { get; } = parameterName; +} +#endif \ No newline at end of file diff --git a/ShipEngineSDK/CompilerSupport/RequiredMemberAttribute.cs b/ShipEngineSDK/CompilerSupport/RequiredMemberAttribute.cs new file mode 100644 index 00000000..5fd5fe4c --- /dev/null +++ b/ShipEngineSDK/CompilerSupport/RequiredMemberAttribute.cs @@ -0,0 +1,13 @@ +namespace System.Runtime.CompilerServices; + +/// Specifies that a type has required members or that a member is required. +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] +#if SYSTEM_PRIVATE_CORELIB + public +#else +internal +#endif + sealed class RequiredMemberAttribute : Attribute +{ + +} \ No newline at end of file diff --git a/ShipEngineSDK/CompilerSupport/SetsRequiredMembersAttribute.cs b/ShipEngineSDK/CompilerSupport/SetsRequiredMembersAttribute.cs new file mode 100644 index 00000000..e22cd407 --- /dev/null +++ b/ShipEngineSDK/CompilerSupport/SetsRequiredMembersAttribute.cs @@ -0,0 +1,16 @@ +namespace System.Diagnostics.CodeAnalysis; + +/// +/// Specifies that this constructor sets all required members for the current type, and callers +/// do not need to set any required members themselves. +/// +[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] +#if SYSTEM_PRIVATE_CORELIB + public +#else +internal +#endif + sealed class SetsRequiredMembersAttribute : Attribute +{ + +} \ No newline at end of file diff --git a/ShipEngineSDK/Config.cs b/ShipEngineSDK/Config.cs index 9f813c47..97f85ef5 100644 --- a/ShipEngineSDK/Config.cs +++ b/ShipEngineSDK/Config.cs @@ -32,7 +32,7 @@ public class Config /// The number of retries to attempt after a failed request. Defaults to 1 public Config(string apiKey, TimeSpan? timeout = null, int retries = 1) { - if (apiKey == null || apiKey == "") + if (string.IsNullOrEmpty(apiKey)) { var message = "A ShipEngine API key must be specified."; throw new ShipEngineException(message, ErrorSource.Shipengine, ErrorType.Validation, ErrorCode.FieldValueRequired); diff --git a/ShipEngineSDK/DateJsonConverter.cs b/ShipEngineSDK/DateJsonConverter.cs index c874b5f0..f5e7015e 100644 --- a/ShipEngineSDK/DateJsonConverter.cs +++ b/ShipEngineSDK/DateJsonConverter.cs @@ -5,13 +5,29 @@ namespace ShipEngineSDK; using System.Text.Json; using System.Text.Json.Serialization; +/// +/// Converts a Date to and from JSON +/// public class DateJsonConverter : JsonConverter { private const string Format = "yyyy-MM-dd"; + /// + /// Read a Date from a JSON string + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => DateTime.ParseExact(reader.GetString()!, Format, CultureInfo.InvariantCulture); - public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString(Format, CultureInfo.InvariantCulture)); + /// + /// Write a Date to a JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString(Format, CultureInfo.InvariantCulture)); } \ No newline at end of file diff --git a/ShipEngineSDK/Enums/ErrorCode.cs b/ShipEngineSDK/Enums/ErrorCode.cs index 6060009d..386ab59f 100644 --- a/ShipEngineSDK/Enums/ErrorCode.cs +++ b/ShipEngineSDK/Enums/ErrorCode.cs @@ -273,7 +273,7 @@ public enum ErrorCode /// [EnumMember(Value = "funding_source_error")] FundingSourceError, - + /// /// The attempted operation does not support multiple packages. /// diff --git a/ShipEngineSDK/JsonWriteOnlyAttribute.cs b/ShipEngineSDK/JsonWriteOnlyAttribute.cs new file mode 100644 index 00000000..067b1a21 --- /dev/null +++ b/ShipEngineSDK/JsonWriteOnlyAttribute.cs @@ -0,0 +1,12 @@ +using System; + +namespace ShipEngineSDK; + +/// +/// Marks a property as write only, which means it won't be deserialized +/// +[AttributeUsage(AttributeTargets.Property)] +internal class JsonWriteOnlyAttribute : Attribute +{ + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AbstractOpenAPISchema.cs b/ShipEngineSDK/Model/AbstractOpenAPISchema.cs new file mode 100644 index 00000000..80146d0d --- /dev/null +++ b/ShipEngineSDK/Model/AbstractOpenAPISchema.cs @@ -0,0 +1,58 @@ +/* + * ShipEngine API + * + * The version of the OpenAPI document: 1.1.202406212006 + * Contact: sales@shipengine.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace ShipEngineSDK.Model; + +/// +/// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification +/// +public abstract partial class AbstractOpenAPISchema +{ + /// + /// Custom JSON serializer + /// + static public readonly JsonSerializerOptions SerializerSettings = new JsonSerializerOptions + { + // OpenAPI generated types generally hide default constructors. + PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, + DictionaryKeyPolicy = JsonNamingPolicy.SnakeCaseLower + }; + + /// + /// Constructor + /// + protected AbstractOpenAPISchema(string schemaType) + { + SchemaType = schemaType; + } + + /// + /// Gets or Sets the actual instance + /// + public abstract Object ActualInstance { get; set; } + + /// + /// Gets or Sets IsNullable to indicate whether the instance is nullable + /// + public bool IsNullable { get; protected set; } + + /// + /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` + /// + public string SchemaType { get; protected set; } + + /// + /// Converts the instance into JSON string. + /// + public abstract string ToJson(); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AccountSettings.cs b/ShipEngineSDK/Model/AccountSettings.cs new file mode 100644 index 00000000..018320e2 --- /dev/null +++ b/ShipEngineSDK/Model/AccountSettings.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A ShipEngine account settings response body +/// +public partial class AccountSettings +{ + + /// + /// Gets or Sets DefaultLabelLayout + /// + [JsonPropertyName("default_label_layout"), JsonPropertyOrder(1)] + public DefaultLabelLayout? DefaultLabelLayout { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AccountSettings {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" DefaultLabelLayout: ").Append(DefaultLabelLayout).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AccountSettingsImages.cs b/ShipEngineSDK/Model/AccountSettingsImages.cs new file mode 100644 index 00000000..8fd68e12 --- /dev/null +++ b/ShipEngineSDK/Model/AccountSettingsImages.cs @@ -0,0 +1,196 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A ShipEngine account images body +/// +public partial class AccountSettingsImages +{ + /// + /// The image type + /// + /// The image type + [JsonConverter(typeof(ImageContentTypeEnumJsonConverter))] + public class ImageContentTypeEnum + { + private readonly string _value; + + /// + /// Create a new instance of ImageContentTypeEnum with a predefined value. + /// + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + /// + /// Create a new instance of ImageContentTypeEnum with a custom value. + /// + /// The value of the ImageContentTypeEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ImageContentTypeEnum(string value) + { + _value = value; + } + + /// + /// Enum Png for value: image/png + /// + public static ImageContentTypeEnum Png { get; } = new("image/png"); + + + /// + /// Enum Jpeg for value: image/jpeg + /// + public static ImageContentTypeEnum Jpeg { get; } = new("image/jpeg"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class ImageContentTypeEnumJsonConverter : JsonConverter + { + public override ImageContentTypeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ImageContentTypeEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ImageContentTypeEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ImageContentTypeEnum); + } + + + /// + /// The date and time that the image was created in ShipEngine. + /// + /// The date and time that the image was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The image type + /// + /// The image type + [JsonPropertyName("image_content_type"), JsonPropertyOrder(2)] + public ImageContentTypeEnum? ImageContentType { get; set; } + + /// + /// A base64 encoded string representation of the image. + /// + /// A base64 encoded string representation of the image. + /// + /// iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg== + /// + [JsonPropertyName("image_data"), JsonPropertyOrder(3)] + public string? ImageData { get; set; } + + /// + /// Indicates whether this image is set as default. + /// + /// Indicates whether this image is set as default. + /// + /// false + /// + [JsonPropertyName("is_default"), JsonPropertyOrder(4)] + public bool? IsDefault { get; set; } + + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonInclude] + public string? LabelImageId { get; set; } + + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name"), JsonPropertyOrder(7)] + public string? Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AccountSettingsImages {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddFundsToCarrierRequestBody.cs b/ShipEngineSDK/Model/AddFundsToCarrierRequestBody.cs new file mode 100644 index 00000000..6bfa7870 --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToCarrierRequestBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An add funds to carrier request body +/// +public partial class AddFundsToCarrierRequestBody +{ + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public required decimal Amount { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("currency"), JsonPropertyOrder(2)] + public required string Currency { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddFundsToCarrierRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddFundsToCarrierResponseBody.cs b/ShipEngineSDK/Model/AddFundsToCarrierResponseBody.cs new file mode 100644 index 00000000..802dc21f --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToCarrierResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The current balance of the requested carrier account +/// +public partial class AddFundsToCarrierResponseBody +{ + + /// + /// The current balance of the account + /// + /// The current balance of the account + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("balance"), JsonInclude] + public MonetaryValue? Balance { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddFundsToCarrierResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Balance: ").Append(Balance).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddFundsToInsuranceRequestBody.cs b/ShipEngineSDK/Model/AddFundsToInsuranceRequestBody.cs new file mode 100644 index 00000000..380bedc6 --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToInsuranceRequestBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An add funds to insurance request body +/// +public partial class AddFundsToInsuranceRequestBody +{ + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public required decimal Amount { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("currency"), JsonPropertyOrder(2)] + public required string Currency { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddFundsToInsuranceRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddFundsToInsuranceResponseBody.cs b/ShipEngineSDK/Model/AddFundsToInsuranceResponseBody.cs new file mode 100644 index 00000000..d526df71 --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToInsuranceResponseBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Add funds to insurance response body +/// +public partial class AddFundsToInsuranceResponseBody +{ + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public required decimal Amount { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("currency"), JsonPropertyOrder(2)] + public required string Currency { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddFundsToInsuranceResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddToBatchRequestBody.cs b/ShipEngineSDK/Model/AddToBatchRequestBody.cs new file mode 100644 index 00000000..25d63d7a --- /dev/null +++ b/ShipEngineSDK/Model/AddToBatchRequestBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An add to batch request body +/// +public partial class AddToBatchRequestBody +{ + + /// + /// Array of Rate IDs to be modifed on the batch + /// + /// Array of Rate IDs to be modifed on the batch + [JsonPropertyName("rate_ids"), JsonPropertyOrder(1)] + public List? RateIds { get; set; } + + /// + /// The Shipment Ids to be modified on the batch + /// + /// The Shipment Ids to be modified on the batch + [JsonPropertyName("shipment_ids"), JsonPropertyOrder(2)] + public List? ShipmentIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddToBatchRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Address.cs b/ShipEngineSDK/Model/Address.cs new file mode 100644 index 00000000..aae5a6a3 --- /dev/null +++ b/ShipEngineSDK/Model/Address.cs @@ -0,0 +1,182 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Any residential or business mailing address, anywhere in the world. > **Note:** Either `name` or `company_name` must be set. Both may be specified, if relevant. +/// +public partial class Address +{ + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public required string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(2)] + public required string CityLocality { get; set; } + + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// John Doe + /// + [JsonPropertyName("name"), JsonPropertyOrder(3)] + public required string Name { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(4)] + public required string PostalCode { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// Manitoba + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(5)] + public required string StateProvince { get; set; } + + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// Unit 408 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(6)] + public string? AddressLine2 { get; set; } + + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// Building #7 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(7)] + public string? AddressLine3 { get; set; } + + /// + /// Indicates whether this is a residential address. + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(8)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// The Home Depot + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(9)] + public string? CompanyName { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(10)] + public string? CountryCode { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(11)] + public string? Email { get; set; } + + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// +1 204-253-9411 ext. 123 + /// + [JsonPropertyName("phone"), JsonPropertyOrder(12)] + public string? Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Address {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressResidentialIndicator.cs b/ShipEngineSDK/Model/AddressResidentialIndicator.cs new file mode 100644 index 00000000..b8891f07 --- /dev/null +++ b/ShipEngineSDK/Model/AddressResidentialIndicator.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Indicates whether an address is residential. +/// +/// Indicates whether an address is residential. +[JsonConverter(typeof(AddressResidentialIndicatorJsonConverter))] +public class AddressResidentialIndicator +{ + private readonly string _value; + + /// + /// Create a new instance of AddressResidentialIndicator with a predefined value. + /// + internal AddressResidentialIndicator() + { + _value = "unknown"; + } + + /// + /// Create a new instance of AddressResidentialIndicator with a custom value. + /// + /// The value of the AddressResidentialIndicator + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public AddressResidentialIndicator(string value) + { + _value = value; + } + + /// + /// Enum Unknown for value: unknown + /// + public static AddressResidentialIndicator Unknown { get; } = new("unknown"); + + + /// + /// Enum Yes for value: yes + /// + public static AddressResidentialIndicator Yes { get; } = new("yes"); + + + /// + /// Enum No for value: no + /// + public static AddressResidentialIndicator No { get; } = new("no"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is AddressResidentialIndicator other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class AddressResidentialIndicatorJsonConverter : JsonConverter +{ + public override AddressResidentialIndicator? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new AddressResidentialIndicator(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, AddressResidentialIndicator value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(AddressResidentialIndicator); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressToValidate.cs b/ShipEngineSDK/Model/AddressToValidate.cs new file mode 100644 index 00000000..96d380b9 --- /dev/null +++ b/ShipEngineSDK/Model/AddressToValidate.cs @@ -0,0 +1,182 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Any residential or business mailing address, anywhere in the world. +/// +public partial class AddressToValidate +{ + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public required string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(2)] + public required string CityLocality { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(3)] + public required string CountryCode { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// Manitoba + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(4)] + public required string StateProvince { get; set; } + + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// Unit 408 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(5)] + public string? AddressLine2 { get; set; } + + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// Building #7 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(6)] + public string? AddressLine3 { get; set; } + + /// + /// Indicates whether this is a residential address. + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(7)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// The Home Depot + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(8)] + public string? CompanyName { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(9)] + public string? Email { get; set; } + + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// John Doe + /// + [JsonPropertyName("name"), JsonPropertyOrder(10)] + public string? Name { get; set; } + + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// +1 204-253-9411 ext. 123 + /// + [JsonPropertyName("phone"), JsonPropertyOrder(11)] + public string? Phone { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(12)] + public string? PostalCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddressToValidate {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressValidatingShipment.cs b/ShipEngineSDK/Model/AddressValidatingShipment.cs new file mode 100644 index 00000000..40831882 --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidatingShipment.cs @@ -0,0 +1,319 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An address validating shipment +/// +public partial class AddressValidatingShipment +{ + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1)] + public required string CarrierId { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(2)] + public required string ServiceCode { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(3)] + public required ShippingAddress ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(4)] + public required ShippingAddressTo ShipTo { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(6)] + public AdvancedShipmentOptions? AdvancedOptions { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(7)] + public string? ComparisonRateType { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(8)] + public DeliveryConfirmation? Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(10)] + public InternationalShipmentOptions? Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(11)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(12)] + public string? ExternalShipmentId { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(13)] + public InsuranceProvider? InsuranceProvider { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(14)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(15)] + public List? Items { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(17)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(18)] + public List? Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(19)] + public ShippingAddress? ReturnTo { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(20)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(21)] + public string? ShipmentNumber { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(23)] + public string? ShippingRuleId { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(25)] + public List? TaxIdentifiers { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(27)] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(28)] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddressValidatingShipment {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressValidationCode.cs b/ShipEngineSDK/Model/AddressValidationCode.cs new file mode 100644 index 00000000..3ddaa93a --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationCode.cs @@ -0,0 +1,158 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The error codes that can be returned by the address validation API +/// +/// The error codes that can be returned by the address validation API +[JsonConverter(typeof(AddressValidationCodeJsonConverter))] +public class AddressValidationCode +{ + private readonly string _value; + + /// + /// Create a new instance of AddressValidationCode with a predefined value. + /// + internal AddressValidationCode() + { + _value = "a1000"; + } + + /// + /// Create a new instance of AddressValidationCode with a custom value. + /// + /// The value of the AddressValidationCode + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public AddressValidationCode(string value) + { + _value = value; + } + + /// + /// Enum A1000 for value: a1000 + /// + public static AddressValidationCode A1000 { get; } = new("a1000"); + + + /// + /// Enum A1001 for value: a1001 + /// + public static AddressValidationCode A1001 { get; } = new("a1001"); + + + /// + /// Enum A1002 for value: a1002 + /// + public static AddressValidationCode A1002 { get; } = new("a1002"); + + + /// + /// Enum A1003 for value: a1003 + /// + public static AddressValidationCode A1003 { get; } = new("a1003"); + + + /// + /// Enum A1004 for value: a1004 + /// + public static AddressValidationCode A1004 { get; } = new("a1004"); + + + /// + /// Enum A1005 for value: a1005 + /// + public static AddressValidationCode A1005 { get; } = new("a1005"); + + + /// + /// Enum A1006 for value: a1006 + /// + public static AddressValidationCode A1006 { get; } = new("a1006"); + + + /// + /// Enum A1007 for value: a1007 + /// + public static AddressValidationCode A1007 { get; } = new("a1007"); + + + /// + /// Enum A1008 for value: a1008 + /// + public static AddressValidationCode A1008 { get; } = new("a1008"); + + + /// + /// Enum R1000 for value: r1000 + /// + public static AddressValidationCode R1000 { get; } = new("r1000"); + + + /// + /// Enum R1001 for value: r1001 + /// + public static AddressValidationCode R1001 { get; } = new("r1001"); + + + /// + /// Enum R1002 for value: r1002 + /// + public static AddressValidationCode R1002 { get; } = new("r1002"); + + + /// + /// Enum R1003 for value: r1003 + /// + public static AddressValidationCode R1003 { get; } = new("r1003"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is AddressValidationCode other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class AddressValidationCodeJsonConverter : JsonConverter +{ + public override AddressValidationCode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new AddressValidationCode(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, AddressValidationCode value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(AddressValidationCode); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressValidationDetailCode.cs b/ShipEngineSDK/Model/AddressValidationDetailCode.cs new file mode 100644 index 00000000..bf5b8d29 --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationDetailCode.cs @@ -0,0 +1,428 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The detailed error codes that can be returned by the address validation API +/// +/// The detailed error codes that can be returned by the address validation API +[JsonConverter(typeof(AddressValidationDetailCodeJsonConverter))] +public class AddressValidationDetailCode +{ + private readonly string _value; + + /// + /// Create a new instance of AddressValidationDetailCode with a predefined value. + /// + internal AddressValidationDetailCode() + { + _value = "unsupported_country"; + } + + /// + /// Create a new instance of AddressValidationDetailCode with a custom value. + /// + /// The value of the AddressValidationDetailCode + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public AddressValidationDetailCode(string value) + { + _value = value; + } + + /// + /// Enum UnsupportedCountry for value: unsupported_country + /// + public static AddressValidationDetailCode UnsupportedCountry { get; } = new("unsupported_country"); + + + /// + /// Enum NonSupportedCountry for value: non_supported_country + /// + public static AddressValidationDetailCode NonSupportedCountry { get; } = new("non_supported_country"); + + + /// + /// Enum MinimumPostalCodeVerificationFailed for value: minimum_postal_code_verification_failed + /// + public static AddressValidationDetailCode MinimumPostalCodeVerificationFailed { get; } = new("minimum_postal_code_verification_failed"); + + + /// + /// Enum StreetDoesNotMatchUniqueStreetName for value: street_does_not_match_unique_street_name + /// + public static AddressValidationDetailCode StreetDoesNotMatchUniqueStreetName { get; } = new("street_does_not_match_unique_street_name"); + + + /// + /// Enum MultipleDirectionals for value: multiple_directionals + /// + public static AddressValidationDetailCode MultipleDirectionals { get; } = new("multiple_directionals"); + + + /// + /// Enum MultipleMatches for value: multiple_matches + /// + public static AddressValidationDetailCode MultipleMatches { get; } = new("multiple_matches"); + + + /// + /// Enum SuiteNotValid for value: suite_not_valid + /// + public static AddressValidationDetailCode SuiteNotValid { get; } = new("suite_not_valid"); + + + /// + /// Enum SuiteMissing for value: suite_missing + /// + public static AddressValidationDetailCode SuiteMissing { get; } = new("suite_missing"); + + + /// + /// Enum IncompatiblePairedLabels for value: incompatible_paired_labels + /// + public static AddressValidationDetailCode IncompatiblePairedLabels { get; } = new("incompatible_paired_labels"); + + + /// + /// Enum InvalidHouseNumber for value: invalid_house_number + /// + public static AddressValidationDetailCode InvalidHouseNumber { get; } = new("invalid_house_number"); + + + /// + /// Enum MissingHouseNumber for value: missing_house_number + /// + public static AddressValidationDetailCode MissingHouseNumber { get; } = new("missing_house_number"); + + + /// + /// Enum InvalidBoxNumber for value: invalid_box_number + /// + public static AddressValidationDetailCode InvalidBoxNumber { get; } = new("invalid_box_number"); + + + /// + /// Enum InvalidChargeEvent for value: invalid_charge_event + /// + public static AddressValidationDetailCode InvalidChargeEvent { get; } = new("invalid_charge_event"); + + + /// + /// Enum MissingBoxNumber for value: missing_box_number + /// + public static AddressValidationDetailCode MissingBoxNumber { get; } = new("missing_box_number"); + + + /// + /// Enum MissingCmraOrPrivateMailBoxNumber for value: missing_cmra_or_private_mail_box_number + /// + public static AddressValidationDetailCode MissingCmraOrPrivateMailBoxNumber { get; } = new("missing_cmra_or_private_mail_box_number"); + + + /// + /// Enum SuiteHasNoSecondaries for value: suite_has_no_secondaries + /// + public static AddressValidationDetailCode SuiteHasNoSecondaries { get; } = new("suite_has_no_secondaries"); + + + /// + /// Enum PostalCodeChangedOrAdded for value: postal_code_changed_or_added + /// + public static AddressValidationDetailCode PostalCodeChangedOrAdded { get; } = new("postal_code_changed_or_added"); + + + /// + /// Enum StateProvinceChangedOrAdded for value: state_province_changed_or_added + /// + public static AddressValidationDetailCode StateProvinceChangedOrAdded { get; } = new("state_province_changed_or_added"); + + + /// + /// Enum CityLocalityChangedOrAdded for value: city_locality_changed_or_added + /// + public static AddressValidationDetailCode CityLocalityChangedOrAdded { get; } = new("city_locality_changed_or_added"); + + + /// + /// Enum UrbanizationChanged for value: urbanization_changed + /// + public static AddressValidationDetailCode UrbanizationChanged { get; } = new("urbanization_changed"); + + + /// + /// Enum StreetNameSpellingChangedOrAdded for value: street_name_spelling_changed_or_added + /// + public static AddressValidationDetailCode StreetNameSpellingChangedOrAdded { get; } = new("street_name_spelling_changed_or_added"); + + + /// + /// Enum StreetNameTypeChangedOrAdded for value: street_name_type_changed_or_added + /// + public static AddressValidationDetailCode StreetNameTypeChangedOrAdded { get; } = new("street_name_type_changed_or_added"); + + + /// + /// Enum StreetDirectionChangedOrAdded for value: street_direction_changed_or_added + /// + public static AddressValidationDetailCode StreetDirectionChangedOrAdded { get; } = new("street_direction_changed_or_added"); + + + /// + /// Enum SuiteTypeChangedOrAdded for value: suite_type_changed_or_added + /// + public static AddressValidationDetailCode SuiteTypeChangedOrAdded { get; } = new("suite_type_changed_or_added"); + + + /// + /// Enum SuiteUnitNumberChangedOrAdded for value: suite_unit_number_changed_or_added + /// + public static AddressValidationDetailCode SuiteUnitNumberChangedOrAdded { get; } = new("suite_unit_number_changed_or_added"); + + + /// + /// Enum DoubleDependentLocalityChangedOrAdded for value: double_dependent_locality_changed_or_added + /// + public static AddressValidationDetailCode DoubleDependentLocalityChangedOrAdded { get; } = new("double_dependent_locality_changed_or_added"); + + + /// + /// Enum SubadministrativeAreaChangedOrAdded for value: subadministrative_area_changed_or_added + /// + public static AddressValidationDetailCode SubadministrativeAreaChangedOrAdded { get; } = new("subadministrative_area_changed_or_added"); + + + /// + /// Enum SubnationalAreaChangedOrAdded for value: subnational_area_changed_or_added + /// + public static AddressValidationDetailCode SubnationalAreaChangedOrAdded { get; } = new("subnational_area_changed_or_added"); + + + /// + /// Enum PoBoxChangedOrAdded for value: po_box_changed_or_added + /// + public static AddressValidationDetailCode PoBoxChangedOrAdded { get; } = new("po_box_changed_or_added"); + + + /// + /// Enum PremiseTypeChangedOrAdded for value: premise_type_changed_or_added + /// + public static AddressValidationDetailCode PremiseTypeChangedOrAdded { get; } = new("premise_type_changed_or_added"); + + + /// + /// Enum HouseNumberChanged for value: house_number_changed + /// + public static AddressValidationDetailCode HouseNumberChanged { get; } = new("house_number_changed"); + + + /// + /// Enum OrganizationChangedOrAdded for value: organization_changed_or_added + /// + public static AddressValidationDetailCode OrganizationChangedOrAdded { get; } = new("organization_changed_or_added"); + + + /// + /// Enum PartiallyVerifiedToStateLevel for value: partially_verified_to_state_level + /// + public static AddressValidationDetailCode PartiallyVerifiedToStateLevel { get; } = new("partially_verified_to_state_level"); + + + /// + /// Enum PartiallyVerifiedToCityLevel for value: partially_verified_to_city_level + /// + public static AddressValidationDetailCode PartiallyVerifiedToCityLevel { get; } = new("partially_verified_to_city_level"); + + + /// + /// Enum PartiallyVerifiedToStreetLevel for value: partially_verified_to_street_level + /// + public static AddressValidationDetailCode PartiallyVerifiedToStreetLevel { get; } = new("partially_verified_to_street_level"); + + + /// + /// Enum PartiallyVerifiedToPremiseLevel for value: partially_verified_to_premise_level + /// + public static AddressValidationDetailCode PartiallyVerifiedToPremiseLevel { get; } = new("partially_verified_to_premise_level"); + + + /// + /// Enum VerifiedToStateLevel for value: verified_to_state_level + /// + public static AddressValidationDetailCode VerifiedToStateLevel { get; } = new("verified_to_state_level"); + + + /// + /// Enum VerifiedToCityLevel for value: verified_to_city_level + /// + public static AddressValidationDetailCode VerifiedToCityLevel { get; } = new("verified_to_city_level"); + + + /// + /// Enum VerifiedToStreetLevel for value: verified_to_street_level + /// + public static AddressValidationDetailCode VerifiedToStreetLevel { get; } = new("verified_to_street_level"); + + + /// + /// Enum VerifiedToPremiseLevel for value: verified_to_premise_level + /// + public static AddressValidationDetailCode VerifiedToPremiseLevel { get; } = new("verified_to_premise_level"); + + + /// + /// Enum VerifiedToSuiteLevel for value: verified_to_suite_level + /// + public static AddressValidationDetailCode VerifiedToSuiteLevel { get; } = new("verified_to_suite_level"); + + + /// + /// Enum CodedToStreetLavel for value: coded_to_street_lavel + /// + public static AddressValidationDetailCode CodedToStreetLavel { get; } = new("coded_to_street_lavel"); + + + /// + /// Enum CodedToNeighborhoodLevel for value: coded_to_neighborhood_level + /// + public static AddressValidationDetailCode CodedToNeighborhoodLevel { get; } = new("coded_to_neighborhood_level"); + + + /// + /// Enum CodedToCommunityLevel for value: coded_to_community_level + /// + public static AddressValidationDetailCode CodedToCommunityLevel { get; } = new("coded_to_community_level"); + + + /// + /// Enum CodedToStateLevel for value: coded_to_state_level + /// + public static AddressValidationDetailCode CodedToStateLevel { get; } = new("coded_to_state_level"); + + + /// + /// Enum CodedToRooftopLevel for value: coded_to_rooftop_level + /// + public static AddressValidationDetailCode CodedToRooftopLevel { get; } = new("coded_to_rooftop_level"); + + + /// + /// Enum CodedToRooftopInterpolationLevel for value: coded_to_rooftop_interpolation_level + /// + public static AddressValidationDetailCode CodedToRooftopInterpolationLevel { get; } = new("coded_to_rooftop_interpolation_level"); + + + /// + /// Enum NameMaxLengthExceeded for value: name_max_length_exceeded + /// + public static AddressValidationDetailCode NameMaxLengthExceeded { get; } = new("name_max_length_exceeded"); + + + /// + /// Enum PhoneMaxLengthExceeded for value: phone_max_length_exceeded + /// + public static AddressValidationDetailCode PhoneMaxLengthExceeded { get; } = new("phone_max_length_exceeded"); + + + /// + /// Enum CompanyNameMaxLengthExceeded for value: company_name_max_length_exceeded + /// + public static AddressValidationDetailCode CompanyNameMaxLengthExceeded { get; } = new("company_name_max_length_exceeded"); + + + /// + /// Enum Line1MinMaxLength for value: line1_min_max_length + /// + public static AddressValidationDetailCode Line1MinMaxLength { get; } = new("line1_min_max_length"); + + + /// + /// Enum Line2MaxLengthExceeded for value: line2_max_length_exceeded + /// + public static AddressValidationDetailCode Line2MaxLengthExceeded { get; } = new("line2_max_length_exceeded"); + + + /// + /// Enum Line3MaxLengthExceeded for value: line3_max_length_exceeded + /// + public static AddressValidationDetailCode Line3MaxLengthExceeded { get; } = new("line3_max_length_exceeded"); + + + /// + /// Enum CityLocalityMaxLengthExceeded for value: city_locality_max_length_exceeded + /// + public static AddressValidationDetailCode CityLocalityMaxLengthExceeded { get; } = new("city_locality_max_length_exceeded"); + + + /// + /// Enum StateProvinceMaxLengthExceeded for value: state_province_max_length_exceeded + /// + public static AddressValidationDetailCode StateProvinceMaxLengthExceeded { get; } = new("state_province_max_length_exceeded"); + + + /// + /// Enum InvalidPostalCode for value: invalid_postal_code + /// + public static AddressValidationDetailCode InvalidPostalCode { get; } = new("invalid_postal_code"); + + + /// + /// Enum CountryInvalidLength for value: country_invalid_length + /// + public static AddressValidationDetailCode CountryInvalidLength { get; } = new("country_invalid_length"); + + + /// + /// Enum AddressNotFound for value: address_not_found + /// + public static AddressValidationDetailCode AddressNotFound { get; } = new("address_not_found"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is AddressValidationDetailCode other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class AddressValidationDetailCodeJsonConverter : JsonConverter +{ + public override AddressValidationDetailCode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new AddressValidationDetailCode(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, AddressValidationDetailCode value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(AddressValidationDetailCode); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressValidationMessageType.cs b/ShipEngineSDK/Model/AddressValidationMessageType.cs new file mode 100644 index 00000000..e84c4ef6 --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationMessageType.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The different types of messages that can be returned by the address validation API +/// +/// The different types of messages that can be returned by the address validation API +[JsonConverter(typeof(AddressValidationMessageTypeJsonConverter))] +public class AddressValidationMessageType +{ + private readonly string _value; + + /// + /// Create a new instance of AddressValidationMessageType with a predefined value. + /// + internal AddressValidationMessageType() + { + _value = "error"; + } + + /// + /// Create a new instance of AddressValidationMessageType with a custom value. + /// + /// The value of the AddressValidationMessageType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public AddressValidationMessageType(string value) + { + _value = value; + } + + /// + /// Enum Error for value: error + /// + public static AddressValidationMessageType Error { get; } = new("error"); + + + /// + /// Enum Warning for value: warning + /// + public static AddressValidationMessageType Warning { get; } = new("warning"); + + + /// + /// Enum Info for value: info + /// + public static AddressValidationMessageType Info { get; } = new("info"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is AddressValidationMessageType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class AddressValidationMessageTypeJsonConverter : JsonConverter +{ + public override AddressValidationMessageType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new AddressValidationMessageType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, AddressValidationMessageType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(AddressValidationMessageType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressValidationResult.cs b/ShipEngineSDK/Model/AddressValidationResult.cs new file mode 100644 index 00000000..f6eb935d --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationResult.cs @@ -0,0 +1,90 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An address validation result +/// +public partial class AddressValidationResult +{ + + /// + /// The list of messages that were generated during the address validation request. + /// + /// The list of messages that were generated during the address validation request. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("messages"), JsonInclude] + public List? Messages { get; set; } + + /// + /// The original address that was sent for validation + /// + /// The original address that was sent for validation + [JsonPropertyName("original_address"), JsonPropertyOrder(2)] + public required Address OriginalAddress { get; set; } + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("status"), JsonPropertyOrder(3)] + public required AddressValidationStatus Status { get; set; } + + /// + /// The matched address found by the Shipengine API + /// + /// The matched address found by the Shipengine API + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("matched_address"), JsonInclude] + public Address? MatchedAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddressValidationResult {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Messages: ").Append(Messages).Append("\n"); + sb.Append(" OriginalAddress: ").Append(OriginalAddress).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" MatchedAddress: ").Append(MatchedAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AddressValidationStatus.cs b/ShipEngineSDK/Model/AddressValidationStatus.cs new file mode 100644 index 00000000..d27c78ca --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationStatus.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible address validation status values +/// +/// The possible address validation status values +[JsonConverter(typeof(AddressValidationStatusJsonConverter))] +public class AddressValidationStatus +{ + private readonly string _value; + + /// + /// Create a new instance of AddressValidationStatus with a predefined value. + /// + internal AddressValidationStatus() + { + _value = "unverified"; + } + + /// + /// Create a new instance of AddressValidationStatus with a custom value. + /// + /// The value of the AddressValidationStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public AddressValidationStatus(string value) + { + _value = value; + } + + /// + /// Enum Unverified for value: unverified + /// + public static AddressValidationStatus Unverified { get; } = new("unverified"); + + + /// + /// Enum Verified for value: verified + /// + public static AddressValidationStatus Verified { get; } = new("verified"); + + + /// + /// Enum Warning for value: warning + /// + public static AddressValidationStatus Warning { get; } = new("warning"); + + + /// + /// Enum Error for value: error + /// + public static AddressValidationStatus Error { get; } = new("error"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is AddressValidationStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class AddressValidationStatusJsonConverter : JsonConverter +{ + public override AddressValidationStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new AddressValidationStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, AddressValidationStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(AddressValidationStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AdvancedShipmentOptions.cs b/ShipEngineSDK/Model/AdvancedShipmentOptions.cs new file mode 100644 index 00000000..387528a5 --- /dev/null +++ b/ShipEngineSDK/Model/AdvancedShipmentOptions.cs @@ -0,0 +1,285 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Advanced shipment options +/// +public partial class AdvancedShipmentOptions +{ + + /// + /// Indicate to the carrier that this shipment requires additional handling. + /// + /// Indicate to the carrier that this shipment requires additional handling. + [JsonPropertyName("additional_handling"), JsonPropertyOrder(1)] + public bool? AdditionalHandling { get; set; } + + /// + /// This field is used to [bill shipping costs to a third party](https://www.shipengine.com/docs/shipping/bill-to-third-party/). This field must be used in conjunction with the `bill_to_country_code`, `bill_to_party`, and `bill_to_postal_code` fields. + /// + /// This field is used to [bill shipping costs to a third party](https://www.shipengine.com/docs/shipping/bill-to-third-party/). This field must be used in conjunction with the `bill_to_country_code`, `bill_to_party`, and `bill_to_postal_code` fields. + [JsonPropertyName("bill_to_account"), JsonPropertyOrder(2)] + public string? BillToAccount { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the third-party that is responsible for shipping costs. + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the third-party that is responsible for shipping costs. + /// + /// CA + /// + [JsonPropertyName("bill_to_country_code"), JsonPropertyOrder(3)] + public string? BillToCountryCode { get; set; } + + /// + /// Indicates whether to bill shipping costs to the recipient or to a third-party. When billing to a third-party, the `bill_to_account`, `bill_to_country_code`, and `bill_to_postal_code` fields must also be set. + /// + /// Indicates whether to bill shipping costs to the recipient or to a third-party. When billing to a third-party, the `bill_to_account`, `bill_to_country_code`, and `bill_to_postal_code` fields must also be set. + [JsonPropertyName("bill_to_party"), JsonPropertyOrder(4)] + public BillToParty? BillToParty { get; set; } + + /// + /// The postal code of the third-party that is responsible for shipping costs. + /// + /// The postal code of the third-party that is responsible for shipping costs. + [JsonPropertyName("bill_to_postal_code"), JsonPropertyOrder(5)] + public string? BillToPostalCode { get; set; } + + /// + /// certificate number. + /// + /// certificate number. + /// + /// 784515 + /// + [JsonPropertyName("certificate_number"), JsonPropertyOrder(6)] + public string? CertificateNumber { get; set; } + + /// + /// Gets or Sets CollectOnDelivery + /// + [JsonPropertyName("collect_on_delivery"), JsonPropertyOrder(7)] + public CollectOnDelivery? CollectOnDelivery { get; set; } + + /// + /// Indicates that the shipment contains alcohol. + /// + /// Indicates that the shipment contains alcohol. + [JsonPropertyName("contains_alcohol"), JsonPropertyOrder(8)] + public bool? ContainsAlcohol { get; set; } + + /// + /// An arbitrary field that can be used to store information about the shipment. + /// + /// An arbitrary field that can be used to store information about the shipment. + [JsonPropertyName("custom_field1"), JsonPropertyOrder(9)] + public string? CustomField1 { get; set; } + + /// + /// An arbitrary field that can be used to store information about the shipment. + /// + /// An arbitrary field that can be used to store information about the shipment. + [JsonPropertyName("custom_field2"), JsonPropertyOrder(10)] + public string? CustomField2 { get; set; } + + /// + /// An arbitrary field that can be used to store information about the shipment. + /// + /// An arbitrary field that can be used to store information about the shipment. + [JsonPropertyName("custom_field3"), JsonPropertyOrder(11)] + public string? CustomField3 { get; set; } + + /// + /// Indicates if the Dangerous goods are present in the shipment + /// + /// Indicates if the Dangerous goods are present in the shipment + [JsonPropertyName("dangerous_goods"), JsonPropertyOrder(12)] + public bool? DangerousGoods { get; set; } + + /// + /// Gets or Sets DangerousGoodsContact + /// + [JsonPropertyName("dangerous_goods_contact"), JsonPropertyOrder(13)] + public AdvancedShipmentOptionsDangerousGoodsContact? DangerousGoodsContact { get; set; } + + /// + /// Indicates that the shipper is paying the international delivery duties for this shipment. This option is supported by UPS, FedEx, and DHL Express. + /// + /// Indicates that the shipper is paying the international delivery duties for this shipment. This option is supported by UPS, FedEx, and DHL Express. + [JsonPropertyName("delivered_duty_paid"), JsonPropertyOrder(14)] + public bool? DeliveredDutyPaid { get; set; } + + /// + /// Indicates if the shipment contain dry ice + /// + /// Indicates if the shipment contain dry ice + [JsonPropertyName("dry_ice"), JsonPropertyOrder(15)] + public bool? DryIce { get; set; } + + /// + /// The weight of the dry ice in the shipment + /// + /// The weight of the dry ice in the shipment + [JsonPropertyName("dry_ice_weight"), JsonPropertyOrder(16)] + public Weight? DryIceWeight { get; set; } + + /// + /// Gets or Sets FedexFreight + /// + [JsonPropertyName("fedex_freight"), JsonPropertyOrder(17)] + public AdvancedShipmentOptionsFedexFreight? FedexFreight { get; set; } + + /// + /// The National Motor Freight Traffic Association [freight class](http://www.nmfta.org/pages/nmfc?AspxAutoDetectCookieSupport=1), such as \"77.5\", \"110\", or \"250\". + /// + /// The National Motor Freight Traffic Association [freight class](http://www.nmfta.org/pages/nmfc?AspxAutoDetectCookieSupport=1), such as \"77.5\", \"110\", or \"250\". + /// + /// 77.5 + /// + [JsonPropertyName("freight_class"), JsonPropertyOrder(18)] + public string? FreightClass { get; set; } + + /// + /// invoice number. + /// + /// invoice number. + /// + /// IOC56888 + /// + [JsonPropertyName("invoice_number"), JsonPropertyOrder(19)] + public string? InvoiceNumber { get; set; } + + /// + /// license number. + /// + /// license number. + /// + /// 514785 + /// + [JsonPropertyName("license_number"), JsonPropertyOrder(20)] + public string? LicenseNumber { get; set; } + + /// + /// Indicates that the package cannot be processed automatically because it is too large or irregularly shaped. This is primarily for USPS shipments. See [Section 1.2 of the USPS parcel standards](https://pe.usps.com/text/dmm300/101.htm#ep1047495) for details. + /// + /// Indicates that the package cannot be processed automatically because it is too large or irregularly shaped. This is primarily for USPS shipments. See [Section 1.2 of the USPS parcel standards](https://pe.usps.com/text/dmm300/101.htm#ep1047495) for details. + [JsonPropertyName("non_machinable"), JsonPropertyOrder(21)] + public bool? NonMachinable { get; set; } + + /// + /// Gets or Sets OriginType + /// + [JsonPropertyName("origin_type"), JsonPropertyOrder(22)] + public OriginType? OriginType { get; set; } + + /// + /// Enables Saturday delivery, if supported by the carrier. + /// + /// Enables Saturday delivery, if supported by the carrier. + [JsonPropertyName("saturday_delivery"), JsonPropertyOrder(23)] + public bool? SaturdayDelivery { get; set; } + + /// + /// Gets or Sets ShipperRelease + /// + [JsonPropertyName("shipper_release"), JsonPropertyOrder(24)] + public bool? ShipperRelease { get; set; } + + /// + /// Third Party Consignee option is a value-added service that allows the shipper to supply goods without commercial invoices being attached + /// + /// Third Party Consignee option is a value-added service that allows the shipper to supply goods without commercial invoices being attached + [JsonPropertyName("third_party_consignee"), JsonPropertyOrder(25)] + public bool? ThirdPartyConsignee { get; set; } + + /// + /// Whether to use [UPS Ground Freight pricing](https://www.shipengine.com/docs/shipping/ups-ground-freight/). If enabled, then a `freight_class` must also be specified. + /// + /// Whether to use [UPS Ground Freight pricing](https://www.shipengine.com/docs/shipping/ups-ground-freight/). If enabled, then a `freight_class` must also be specified. + [JsonPropertyName("use_ups_ground_freight_pricing"), JsonPropertyOrder(26)] + public bool? UseUpsGroundFreightPricing { get; set; } + + /// + /// Gets or Sets WindsorFrameworkDetails + /// + [JsonPropertyName("windsor_framework_details"), JsonPropertyOrder(27)] + public AdvancedShipmentOptionsWindsorFrameworkDetails? WindsorFrameworkDetails { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } = new Dictionary(); + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AdvancedShipmentOptions {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AdditionalHandling: ").Append(AdditionalHandling).Append("\n"); + sb.Append(" BillToAccount: ").Append(BillToAccount).Append("\n"); + sb.Append(" BillToCountryCode: ").Append(BillToCountryCode).Append("\n"); + sb.Append(" BillToParty: ").Append(BillToParty).Append("\n"); + sb.Append(" BillToPostalCode: ").Append(BillToPostalCode).Append("\n"); + sb.Append(" CertificateNumber: ").Append(CertificateNumber).Append("\n"); + sb.Append(" CollectOnDelivery: ").Append(CollectOnDelivery).Append("\n"); + sb.Append(" ContainsAlcohol: ").Append(ContainsAlcohol).Append("\n"); + sb.Append(" CustomField1: ").Append(CustomField1).Append("\n"); + sb.Append(" CustomField2: ").Append(CustomField2).Append("\n"); + sb.Append(" CustomField3: ").Append(CustomField3).Append("\n"); + sb.Append(" DangerousGoods: ").Append(DangerousGoods).Append("\n"); + sb.Append(" DangerousGoodsContact: ").Append(DangerousGoodsContact).Append("\n"); + sb.Append(" DeliveredDutyPaid: ").Append(DeliveredDutyPaid).Append("\n"); + sb.Append(" DryIce: ").Append(DryIce).Append("\n"); + sb.Append(" DryIceWeight: ").Append(DryIceWeight).Append("\n"); + sb.Append(" FedexFreight: ").Append(FedexFreight).Append("\n"); + sb.Append(" FreightClass: ").Append(FreightClass).Append("\n"); + sb.Append(" InvoiceNumber: ").Append(InvoiceNumber).Append("\n"); + sb.Append(" LicenseNumber: ").Append(LicenseNumber).Append("\n"); + sb.Append(" NonMachinable: ").Append(NonMachinable).Append("\n"); + sb.Append(" OriginType: ").Append(OriginType).Append("\n"); + sb.Append(" SaturdayDelivery: ").Append(SaturdayDelivery).Append("\n"); + sb.Append(" ShipperRelease: ").Append(ShipperRelease).Append("\n"); + sb.Append(" ThirdPartyConsignee: ").Append(ThirdPartyConsignee).Append("\n"); + sb.Append(" UseUpsGroundFreightPricing: ").Append(UseUpsGroundFreightPricing).Append("\n"); + sb.Append(" WindsorFrameworkDetails: ").Append(WindsorFrameworkDetails).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AdvancedShipmentOptionsDangerousGoodsContact.cs b/ShipEngineSDK/Model/AdvancedShipmentOptionsDangerousGoodsContact.cs new file mode 100644 index 00000000..bc81efcf --- /dev/null +++ b/ShipEngineSDK/Model/AdvancedShipmentOptionsDangerousGoodsContact.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Contact information for Dangerous goods +/// +public partial class AdvancedShipmentOptionsDangerousGoodsContact +{ + + /// + /// Name of the contact + /// + /// Name of the contact + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public string? Name { get; set; } + + /// + /// Phone number of the contact + /// + /// Phone number of the contact + [JsonPropertyName("phone"), JsonPropertyOrder(2)] + public string? Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AdvancedShipmentOptionsDangerousGoodsContact {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AdvancedShipmentOptionsFedexFreight.cs b/ShipEngineSDK/Model/AdvancedShipmentOptionsFedexFreight.cs new file mode 100644 index 00000000..8bcb7c18 --- /dev/null +++ b/ShipEngineSDK/Model/AdvancedShipmentOptionsFedexFreight.cs @@ -0,0 +1,67 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Provide details for the Fedex freight service +/// +public partial class AdvancedShipmentOptionsFedexFreight +{ + + /// + /// Gets or Sets BookingConfirmation + /// + [JsonPropertyName("booking_confirmation"), JsonPropertyOrder(1)] + public string? BookingConfirmation { get; set; } + + /// + /// Gets or Sets ShipperLoadAndCount + /// + [JsonPropertyName("shipper_load_and_count"), JsonPropertyOrder(2)] + public string? ShipperLoadAndCount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AdvancedShipmentOptionsFedexFreight {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BookingConfirmation: ").Append(BookingConfirmation).Append("\n"); + sb.Append(" ShipperLoadAndCount: ").Append(ShipperLoadAndCount).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AdvancedShipmentOptionsWindsorFrameworkDetails.cs b/ShipEngineSDK/Model/AdvancedShipmentOptionsWindsorFrameworkDetails.cs new file mode 100644 index 00000000..a996440d --- /dev/null +++ b/ShipEngineSDK/Model/AdvancedShipmentOptionsWindsorFrameworkDetails.cs @@ -0,0 +1,141 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The Windsor framework is a new regulation in the UK that simplifies customs procedures for goods moved from the UK mainland to Northern Ireland. +/// +public partial class AdvancedShipmentOptionsWindsorFrameworkDetails +{ + /// + /// An indicator that will tell the carrier and HMRC the type of movement for the shipment. + /// + /// An indicator that will tell the carrier and HMRC the type of movement for the shipment. + [JsonConverter(typeof(MovementIndicatorEnumJsonConverter))] + public class MovementIndicatorEnum + { + private readonly string _value; + + /// + /// Create a new instance of MovementIndicatorEnum with a predefined value. + /// + internal MovementIndicatorEnum() + { + _value = "c2c"; + } + + /// + /// Create a new instance of MovementIndicatorEnum with a custom value. + /// + /// The value of the MovementIndicatorEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public MovementIndicatorEnum(string value) + { + _value = value; + } + + /// + /// Enum C2c for value: c2c + /// + public static MovementIndicatorEnum C2c { get; } = new("c2c"); + + + /// + /// Enum B2c for value: b2c + /// + public static MovementIndicatorEnum B2c { get; } = new("b2c"); + + + /// + /// Enum C2b for value: c2b + /// + public static MovementIndicatorEnum C2b { get; } = new("c2b"); + + + /// + /// Enum B2b for value: b2b + /// + public static MovementIndicatorEnum B2b { get; } = new("b2b"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class MovementIndicatorEnumJsonConverter : JsonConverter + { + public override MovementIndicatorEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new MovementIndicatorEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, MovementIndicatorEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(MovementIndicatorEnum); + } + + + /// + /// An indicator that will tell the carrier and HMRC the type of movement for the shipment. + /// + /// An indicator that will tell the carrier and HMRC the type of movement for the shipment. + [JsonPropertyName("movement_indicator"), JsonPropertyOrder(1)] + public MovementIndicatorEnum? MovementIndicator { get; set; } + + /// + /// An indicator that allows a shipper to declare the shipment as not-at-risk. + /// + /// An indicator that allows a shipper to declare the shipment as not-at-risk. + [JsonPropertyName("not_at_risk"), JsonPropertyOrder(2)] + public bool? NotAtRisk { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AdvancedShipmentOptionsWindsorFrameworkDetails {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" MovementIndicator: ").Append(MovementIndicator).Append("\n"); + sb.Append(" NotAtRisk: ").Append(NotAtRisk).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AllowedIncoterms.cs b/ShipEngineSDK/Model/AllowedIncoterms.cs new file mode 100644 index 00000000..8394464f --- /dev/null +++ b/ShipEngineSDK/Model/AllowedIncoterms.cs @@ -0,0 +1,169 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Defines Allowed incoterms +/// +[JsonConverter(typeof(AllowedIncotermsJsonConverter))] +public class AllowedIncoterms +{ + private readonly string _value; + + /// + /// Create a new instance of AllowedIncoterms with a predefined value. + /// + internal AllowedIncoterms() + { + _value = "exw"; + } + + /// + /// Create a new instance of AllowedIncoterms with a custom value. + /// + /// The value of the AllowedIncoterms + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public AllowedIncoterms(string value) + { + _value = value; + } + + /// + /// Enum Exw for value: exw + /// + public static AllowedIncoterms Exw { get; } = new("exw"); + + + /// + /// Enum Fca for value: fca + /// + public static AllowedIncoterms Fca { get; } = new("fca"); + + + /// + /// Enum Cpt for value: cpt + /// + public static AllowedIncoterms Cpt { get; } = new("cpt"); + + + /// + /// Enum Cip for value: cip + /// + public static AllowedIncoterms Cip { get; } = new("cip"); + + + /// + /// Enum Dpu for value: dpu + /// + public static AllowedIncoterms Dpu { get; } = new("dpu"); + + + /// + /// Enum Dap for value: dap + /// + public static AllowedIncoterms Dap { get; } = new("dap"); + + + /// + /// Enum Ddp for value: ddp + /// + public static AllowedIncoterms Ddp { get; } = new("ddp"); + + + /// + /// Enum Fas for value: fas + /// + public static AllowedIncoterms Fas { get; } = new("fas"); + + + /// + /// Enum Fob for value: fob + /// + public static AllowedIncoterms Fob { get; } = new("fob"); + + + /// + /// Enum Cfr for value: cfr + /// + public static AllowedIncoterms Cfr { get; } = new("cfr"); + + + /// + /// Enum Cif for value: cif + /// + public static AllowedIncoterms Cif { get; } = new("cif"); + + + /// + /// Enum Ddu for value: ddu + /// + public static AllowedIncoterms Ddu { get; } = new("ddu"); + + + /// + /// Enum Daf for value: daf + /// + public static AllowedIncoterms Daf { get; } = new("daf"); + + + /// + /// Enum Deq for value: deq + /// + public static AllowedIncoterms Deq { get; } = new("deq"); + + + /// + /// Enum Des for value: des + /// + public static AllowedIncoterms Des { get; } = new("des"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is AllowedIncoterms other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class AllowedIncotermsJsonConverter : JsonConverter +{ + public override AllowedIncoterms? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new AllowedIncoterms(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, AllowedIncoterms value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(AllowedIncoterms); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AlternativeIdentifier.cs b/ShipEngineSDK/Model/AlternativeIdentifier.cs new file mode 100644 index 00000000..69a7b098 --- /dev/null +++ b/ShipEngineSDK/Model/AlternativeIdentifier.cs @@ -0,0 +1,75 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Additional information some carriers may provide by which to identify a given label in their system. +/// +public partial class AlternativeIdentifier +{ + + /// + /// The type of alternative_identifier that corresponds to the value. + /// + /// The type of alternative_identifier that corresponds to the value. + /// + /// last_mile_tracking_number + /// + [JsonPropertyName("type"), JsonPropertyOrder(1)] + public string? Type { get; set; } + + /// + /// The value of the alternative_identifier. + /// + /// The value of the alternative_identifier. + /// + /// 12345678912345678912 + /// + [JsonPropertyName("value"), JsonPropertyOrder(2)] + public string? Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AlternativeIdentifier {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AlternativeIdentifiers.cs b/ShipEngineSDK/Model/AlternativeIdentifiers.cs new file mode 100644 index 00000000..d55495df --- /dev/null +++ b/ShipEngineSDK/Model/AlternativeIdentifiers.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// AlternativeIdentifiers +/// +public partial class AlternativeIdentifiers +{ + + /// + /// Alternative identifiers associated with this package. + /// + /// Alternative identifiers associated with this package. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? VarAlternativeIdentifiers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AlternativeIdentifiers {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" VarAlternativeIdentifiers: ").Append(VarAlternativeIdentifiers).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AncillaryServiceEndorsement.cs b/ShipEngineSDK/Model/AncillaryServiceEndorsement.cs new file mode 100644 index 00000000..492d05ab --- /dev/null +++ b/ShipEngineSDK/Model/AncillaryServiceEndorsement.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// [Ancillary service endorsements](https://pe.usps.com/text/qsg300/Q507.htm) are used by mailers to request an addressee's new address and to provide the carrier with instructions on how to handle packages that are undeliverable as addressed. | Ancillary Service Endorsement | Description |- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | `none` | No ancillary service is requested. Depending on the carrier servive, the package may be forwarded, returned, or discarded. | `return_service_requested` | The package is returned to the sender. If possible, notification of the new address is is included with the returned package. | `forwarding_service_requested` | Forward the package to the new address, if possible; otherwise, return it to the sender. | `address_service_requested` | Forward the package to the new address, if possible; otherwise, return it to the sender. This is similar to `forwarding_service_requested`, but different restrictions and charges may apply. | `change_service_requested` | The package is discarded. If possible, notification of the new address is sent to the sender. | `leave_if_no_response` | +/// +/// [Ancillary service endorsements](https://pe.usps.com/text/qsg300/Q507.htm) are used by mailers to request an addressee's new address and to provide the carrier with instructions on how to handle packages that are undeliverable as addressed. | Ancillary Service Endorsement | Description |- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | `none` | No ancillary service is requested. Depending on the carrier servive, the package may be forwarded, returned, or discarded. | `return_service_requested` | The package is returned to the sender. If possible, notification of the new address is is included with the returned package. | `forwarding_service_requested` | Forward the package to the new address, if possible; otherwise, return it to the sender. | `address_service_requested` | Forward the package to the new address, if possible; otherwise, return it to the sender. This is similar to `forwarding_service_requested`, but different restrictions and charges may apply. | `change_service_requested` | The package is discarded. If possible, notification of the new address is sent to the sender. | `leave_if_no_response` | +[JsonConverter(typeof(AncillaryServiceEndorsementJsonConverter))] +public class AncillaryServiceEndorsement +{ + private readonly string _value; + + /// + /// Create a new instance of AncillaryServiceEndorsement with a predefined value. + /// + internal AncillaryServiceEndorsement() + { + _value = "none"; + } + + /// + /// Create a new instance of AncillaryServiceEndorsement with a custom value. + /// + /// The value of the AncillaryServiceEndorsement + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public AncillaryServiceEndorsement(string value) + { + _value = value; + } + + /// + /// Enum None for value: none + /// + public static AncillaryServiceEndorsement None { get; } = new("none"); + + + /// + /// Enum ReturnServiceRequested for value: return_service_requested + /// + public static AncillaryServiceEndorsement ReturnServiceRequested { get; } = new("return_service_requested"); + + + /// + /// Enum ForwardingServiceRequested for value: forwarding_service_requested + /// + public static AncillaryServiceEndorsement ForwardingServiceRequested { get; } = new("forwarding_service_requested"); + + + /// + /// Enum AddressServiceRequested for value: address_service_requested + /// + public static AncillaryServiceEndorsement AddressServiceRequested { get; } = new("address_service_requested"); + + + /// + /// Enum ChangeServiceRequested for value: change_service_requested + /// + public static AncillaryServiceEndorsement ChangeServiceRequested { get; } = new("change_service_requested"); + + + /// + /// Enum LeaveIfNoResponse for value: leave_if_no_response + /// + public static AncillaryServiceEndorsement LeaveIfNoResponse { get; } = new("leave_if_no_response"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is AncillaryServiceEndorsement other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class AncillaryServiceEndorsementJsonConverter : JsonConverter +{ + public override AncillaryServiceEndorsement? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new AncillaryServiceEndorsement(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, AncillaryServiceEndorsement value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(AncillaryServiceEndorsement); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Batch.cs b/ShipEngineSDK/Model/Batch.cs new file mode 100644 index 00000000..efc26b74 --- /dev/null +++ b/ShipEngineSDK/Model/Batch.cs @@ -0,0 +1,303 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Batches are an advanced feature of ShipEngine designed for users who need to generate hundreds or thousands of labels at a time. +/// +public partial class Batch +{ + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_errors_url"), JsonInclude] + public OptionalLink? BatchErrorsUrl { get; set; } + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url"), JsonPropertyOrder(3)] + public required OptionalLink BatchLabelsUrl { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_number"), JsonInclude] + public string? BatchNumber { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url"), JsonPropertyOrder(5)] + public required OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("completed"), JsonInclude] + public int? Completed { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("count"), JsonInclude] + public int? Count { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("errors"), JsonInclude] + public int? Errors { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public OptionalLink? FormDownload { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("forms"), JsonInclude] + public int? Forms { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_format"), JsonInclude] + public LabelFormat? LabelFormat { get; set; } + + /// + /// label layout + /// + /// label layout + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_layout"), JsonInclude] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("process_errors"), JsonInclude] + public List? ProcessErrors { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public BatchStatus? Status { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("warnings"), JsonInclude] + public int? Warnings { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes"), JsonInclude] + public string? BatchNotes { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("external_batch_id"), JsonInclude] + public string? ExternalBatchId { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at"), JsonInclude] + public DateTimeOffset? ProcessedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Batch {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/BatchResponseError.cs b/ShipEngineSDK/Model/BatchResponseError.cs new file mode 100644 index 00000000..70a3eae2 --- /dev/null +++ b/ShipEngineSDK/Model/BatchResponseError.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A batch response error +/// +public partial class BatchResponseError +{ + + /// + /// Error message associated with the shipment. + /// + /// Error message associated with the shipment. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Recipient address has not been verified. + /// + [JsonPropertyName("error"), JsonInclude] + public string? Error { get; set; } + + /// + /// An external shipment id associated with the shipment + /// + /// An external shipment id associated with the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("external_shipment_id"), JsonInclude] + public string? ExternalShipmentId { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchResponseError {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/BatchStatus.cs b/ShipEngineSDK/Model/BatchStatus.cs new file mode 100644 index 00000000..1225f025 --- /dev/null +++ b/ShipEngineSDK/Model/BatchStatus.cs @@ -0,0 +1,128 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible batch status values +/// +/// The possible batch status values +[JsonConverter(typeof(BatchStatusJsonConverter))] +public class BatchStatus +{ + private readonly string _value; + + /// + /// Create a new instance of BatchStatus with a predefined value. + /// + internal BatchStatus() + { + _value = "open"; + } + + /// + /// Create a new instance of BatchStatus with a custom value. + /// + /// The value of the BatchStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public BatchStatus(string value) + { + _value = value; + } + + /// + /// Enum Open for value: open + /// + public static BatchStatus Open { get; } = new("open"); + + + /// + /// Enum Queued for value: queued + /// + public static BatchStatus Queued { get; } = new("queued"); + + + /// + /// Enum Processing for value: processing + /// + public static BatchStatus Processing { get; } = new("processing"); + + + /// + /// Enum Completed for value: completed + /// + public static BatchStatus Completed { get; } = new("completed"); + + + /// + /// Enum CompletedWithErrors for value: completed_with_errors + /// + public static BatchStatus CompletedWithErrors { get; } = new("completed_with_errors"); + + + /// + /// Enum Archived for value: archived + /// + public static BatchStatus Archived { get; } = new("archived"); + + + /// + /// Enum Notifying for value: notifying + /// + public static BatchStatus Notifying { get; } = new("notifying"); + + + /// + /// Enum Invalid for value: invalid + /// + public static BatchStatus Invalid { get; } = new("invalid"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is BatchStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class BatchStatusJsonConverter : JsonConverter +{ + public override BatchStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new BatchStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, BatchStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(BatchStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/BatchesSortBy.cs b/ShipEngineSDK/Model/BatchesSortBy.cs new file mode 100644 index 00000000..2c924e6d --- /dev/null +++ b/ShipEngineSDK/Model/BatchesSortBy.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible batches sort by values +/// +/// The possible batches sort by values +[JsonConverter(typeof(BatchesSortByJsonConverter))] +public class BatchesSortBy +{ + private readonly string _value; + + /// + /// Create a new instance of BatchesSortBy with a predefined value. + /// + internal BatchesSortBy() + { + _value = "ship_date"; + } + + /// + /// Create a new instance of BatchesSortBy with a custom value. + /// + /// The value of the BatchesSortBy + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public BatchesSortBy(string value) + { + _value = value; + } + + /// + /// Enum ShipDate for value: ship_date + /// + public static BatchesSortBy ShipDate { get; } = new("ship_date"); + + + /// + /// Enum ProcessedAt for value: processed_at + /// + public static BatchesSortBy ProcessedAt { get; } = new("processed_at"); + + + /// + /// Enum CreatedAt for value: created_at + /// + public static BatchesSortBy CreatedAt { get; } = new("created_at"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is BatchesSortBy other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class BatchesSortByJsonConverter : JsonConverter +{ + public override BatchesSortBy? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new BatchesSortBy(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, BatchesSortBy value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(BatchesSortBy); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/BillToParty.cs b/ShipEngineSDK/Model/BillToParty.cs new file mode 100644 index 00000000..5b0cd908 --- /dev/null +++ b/ShipEngineSDK/Model/BillToParty.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible bill to party values +/// +/// The possible bill to party values +[JsonConverter(typeof(BillToPartyJsonConverter))] +public class BillToParty +{ + private readonly string _value; + + /// + /// Create a new instance of BillToParty with a predefined value. + /// + internal BillToParty() + { + _value = "recipient"; + } + + /// + /// Create a new instance of BillToParty with a custom value. + /// + /// The value of the BillToParty + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public BillToParty(string value) + { + _value = value; + } + + /// + /// Enum Recipient for value: recipient + /// + public static BillToParty Recipient { get; } = new("recipient"); + + + /// + /// Enum ThirdParty for value: third_party + /// + public static BillToParty ThirdParty { get; } = new("third_party"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is BillToParty other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class BillToPartyJsonConverter : JsonConverter +{ + public override BillToParty? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new BillToParty(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, BillToParty value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(BillToParty); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/BulkRate.cs b/ShipEngineSDK/Model/BulkRate.cs new file mode 100644 index 00000000..219c813f --- /dev/null +++ b/ShipEngineSDK/Model/BulkRate.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A bulk rate +/// +public partial class BulkRate +{ + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// An array of errors that were returned while retrieving the bulk rate + /// + /// An array of errors that were returned while retrieving the bulk rate + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// A string that uniquely identifies the rate request + /// + /// A string that uniquely identifies the rate request + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("rate_request_id"), JsonInclude] + public string? RateRequestId { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public RateResponseStatus? Status { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BulkRate {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" RateRequestId: ").Append(RateRequestId).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CalculateRatesRequestBody.cs b/ShipEngineSDK/Model/CalculateRatesRequestBody.cs new file mode 100644 index 00000000..87c19cdb --- /dev/null +++ b/ShipEngineSDK/Model/CalculateRatesRequestBody.cs @@ -0,0 +1,276 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate shipment request body +/// +[JsonConverter(typeof(CalculateRatesRequestBodyJsonConverter))] +//[DataContract(Name = "calculate_rates_request_body")] +public partial class CalculateRatesRequestBody : AbstractOpenAPISchema +{ + + /// + /// The rate options + /// + /// The rate options + [JsonPropertyName("rate_options"), JsonPropertyOrder(1)] + public RateRequestBody? RateOptions { get; set; } + + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ShipmentIdRequest. + public CalculateRatesRequestBody(ShipmentIdRequest actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RateShipmentRequest. + public CalculateRatesRequestBody(RateShipmentRequest actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(ShipmentIdRequest)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RateShipmentRequest)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: ShipmentIdRequest, RateShipmentRequest"); + } + } + } + + /// + /// Get the actual instance of `ShipmentIdRequest`. If the actual instance is not `ShipmentIdRequest`, + /// the InvalidClassException will be thrown + /// + /// An instance of ShipmentIdRequest + public ShipmentIdRequest GetShipmentIdRequest() + { + return (ShipmentIdRequest)this.ActualInstance; + } + + /// + /// Get the actual instance of `RateShipmentRequest`. If the actual instance is not `RateShipmentRequest`, + /// the InvalidClassException will be thrown + /// + /// An instance of RateShipmentRequest + public RateShipmentRequest GetRateShipmentRequest() + { + return (RateShipmentRequest)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CalculateRatesRequestBody {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" RateOptions: ").Append(this.RateOptions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, CalculateRatesRequestBody.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for CalculateRatesRequestBody +/// +public class CalculateRatesRequestBodyJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(ShipmentIdRequest), typeof(RateShipmentRequest)]; + private static readonly HashSet MandatoryFields = ["Shipment", "ShipmentId"]; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, CalculateRatesRequestBody value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("rate_options"); + JsonSerializer.Serialize(writer, value.RateOptions, options); + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override CalculateRatesRequestBody? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + CalculateRatesRequestBody? newCalculateRatesRequestBody = null; + + // Deserialize all the common properties of the model so they can be used in object initializers later + var rateOptions = jsonDoc.RootElement.GetProperty("rate_options").Deserialize(DeserializingOptions)!; + + int match = 0; + var matchedTypes = new List(); + + try + { + newCalculateRatesRequestBody = new CalculateRatesRequestBody(jsonDoc.Deserialize(DeserializingOptions)!) + { + RateOptions = rateOptions, + }; + + matchedTypes.Add("ShipmentIdRequest"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ShipmentIdRequest: {1}", jsonDoc, exception); + } + + try + { + newCalculateRatesRequestBody = new CalculateRatesRequestBody(jsonDoc.Deserialize(DeserializingOptions)!) + { + RateOptions = rateOptions, + }; + + matchedTypes.Add("RateShipmentRequest"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into RateShipmentRequest: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newCalculateRatesRequestBody; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(CalculateRatesRequestBody).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CalculateRatesResponseBody.cs b/ShipEngineSDK/Model/CalculateRatesResponseBody.cs new file mode 100644 index 00000000..6f7e7ff5 --- /dev/null +++ b/ShipEngineSDK/Model/CalculateRatesResponseBody.cs @@ -0,0 +1,320 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate shipment response body +/// +public partial class CalculateRatesResponseBody +{ + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(1)] + public required AdvancedShipmentOptions AdvancedOptions { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(2)] + public required DeliveryConfirmation Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(4)] + public required InsuranceProvider InsuranceProvider { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(6)] + public required List Packages { get; set; } + + /// + /// The rates response + /// + /// The rates response + [JsonPropertyName("rate_response"), JsonPropertyOrder(7)] + public required RatesInformation RateResponse { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(8)] + public required ShippingAddress ReturnTo { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(9)] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(14)] + public string? CarrierId { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(15)] + public string? ComparisonRateType { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(16)] + public required InternationalShipmentOptions Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(17)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(18)] + public string? ExternalShipmentId { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(19)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(20)] + public List? Items { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(21)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(22)] + public string? ServiceCode { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(23)] + public ShippingAddress? ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(24)] + public ShippingAddressTo? ShipTo { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(25)] + public string? ShipmentNumber { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(26)] + public string? ShippingRuleId { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(27)] + public List? TaxIdentifiers { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(28)] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CalculateRatesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" RateResponse: ").Append(RateResponse).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Carrier.cs b/ShipEngineSDK/Model/Carrier.cs new file mode 100644 index 00000000..612ea9e3 --- /dev/null +++ b/ShipEngineSDK/Model/Carrier.cs @@ -0,0 +1,239 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A carrier object that represents a provider such as UPS, USPS, DHL, etc that has been tied to the current account. +/// +public partial class Carrier +{ + + /// + /// The account number that the carrier is connected to. + /// + /// The account number that the carrier is connected to. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// account_570827 + /// + [JsonPropertyName("account_number"), JsonInclude] + public string? AccountNumber { get; set; } + + /// + /// Current available balance + /// + /// Current available balance + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3799.52 + /// + [JsonPropertyName("balance"), JsonInclude] + public decimal? Balance { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// A string that uniquely identifies the carrier. + /// + /// A string that uniquely identifies the carrier. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The carrier is disabled by the current ShipEngine account's billing plan. + /// + /// The carrier is disabled by the current ShipEngine account's billing plan. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("disabled_by_billing_plan"), JsonInclude] + public bool? DisabledByBillingPlan { get; set; } + + /// + /// Screen readable name + /// + /// Screen readable name + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Stamps.com + /// + [JsonPropertyName("friendly_name"), JsonInclude] + public string? FriendlyName { get; set; } + + /// + /// Funding source ID for the carrier + /// + /// Funding source ID for the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("funding_source_id"), JsonInclude] + public string? FundingSourceId { get; set; } + + /// + /// Carrier supports multiple packages per shipment + /// + /// Carrier supports multiple packages per shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("has_multi_package_supporting_services"), JsonInclude] + public bool? HasMultiPackageSupportingServices { get; set; } + + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// ShipEngine Account - Stamps.com + /// + [JsonPropertyName("nickname"), JsonInclude] + public string? Nickname { get; set; } + + /// + /// A list of options that are available to that carrier + /// + /// A list of options that are available to that carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("options"), JsonInclude] + public List? Options { get; set; } + + /// + /// A list of package types that are supported by the carrier + /// + /// A list of package types that are supported by the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// Is this the primary carrier that is used by default when no carrier is specified in label/shipment creation + /// + /// Is this the primary carrier that is used by default when no carrier is specified in label/shipment creation + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("primary"), JsonInclude] + public bool? Primary { get; set; } + + /// + /// Indicates whether the carrier requires funding to use its services + /// + /// Indicates whether the carrier requires funding to use its services + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requires_funded_amount"), JsonInclude] + public bool? RequiresFundedAmount { get; set; } + + /// + /// A list of services that are offered by the carrier + /// + /// A list of services that are offered by the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("services"), JsonInclude] + public List? Services { get; set; } + + /// + /// The carrier supports adding custom label messages to an order. + /// + /// The carrier supports adding custom label messages to an order. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("supports_label_messages"), JsonInclude] + public bool? SupportsLabelMessages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Carrier {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Balance: ").Append(Balance).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" DisabledByBillingPlan: ").Append(DisabledByBillingPlan).Append("\n"); + sb.Append(" FriendlyName: ").Append(FriendlyName).Append("\n"); + sb.Append(" FundingSourceId: ").Append(FundingSourceId).Append("\n"); + sb.Append(" HasMultiPackageSupportingServices: ").Append(HasMultiPackageSupportingServices).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Options: ").Append(Options).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" Primary: ").Append(Primary).Append("\n"); + sb.Append(" RequiresFundedAmount: ").Append(RequiresFundedAmount).Append("\n"); + sb.Append(" Services: ").Append(Services).Append("\n"); + sb.Append(" SupportsLabelMessages: ").Append(SupportsLabelMessages).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CarrierAdvancedOption.cs b/ShipEngineSDK/Model/CarrierAdvancedOption.cs new file mode 100644 index 00000000..cb357005 --- /dev/null +++ b/ShipEngineSDK/Model/CarrierAdvancedOption.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Advanced options that are specific to the carrier +/// +public partial class CarrierAdvancedOption +{ + + /// + /// Default value of option + /// + /// Default value of option + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// false + /// + [JsonPropertyName("default_value"), JsonInclude] + public string? DefaultValue { get; set; } + + /// + /// Description of option + /// + /// Description of option + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("description"), JsonInclude] + public string? Description { get; set; } + + /// + /// Name of advanced option + /// + /// Name of advanced option + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// contains_alcohol + /// + [JsonPropertyName("name"), JsonInclude] + public string? Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CarrierAdvancedOption {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" DefaultValue: ").Append(DefaultValue).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CarrierName.cs b/ShipEngineSDK/Model/CarrierName.cs new file mode 100644 index 00000000..702050b8 --- /dev/null +++ b/ShipEngineSDK/Model/CarrierName.cs @@ -0,0 +1,248 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The shipping carriers that are supported by ShipEngine +/// +/// The shipping carriers that are supported by ShipEngine +[JsonConverter(typeof(CarrierNameJsonConverter))] +public class CarrierName +{ + private readonly string _value; + + /// + /// Create a new instance of CarrierName with a predefined value. + /// + internal CarrierName() + { + _value = "access_worldwide"; + } + + /// + /// Create a new instance of CarrierName with a custom value. + /// + /// The value of the CarrierName + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public CarrierName(string value) + { + _value = value; + } + + /// + /// Enum AccessWorldwide for value: access_worldwide + /// + public static CarrierName AccessWorldwide { get; } = new("access_worldwide"); + + + /// + /// Enum AmazonBuyShipping for value: amazon_buy_shipping + /// + public static CarrierName AmazonBuyShipping { get; } = new("amazon_buy_shipping"); + + + /// + /// Enum AmazonShippingUk for value: amazon_shipping_uk + /// + public static CarrierName AmazonShippingUk { get; } = new("amazon_shipping_uk"); + + + /// + /// Enum Apc for value: apc + /// + public static CarrierName Apc { get; } = new("apc"); + + + /// + /// Enum Asendia for value: asendia + /// + public static CarrierName Asendia { get; } = new("asendia"); + + + /// + /// Enum AustraliaPost for value: australia_post + /// + public static CarrierName AustraliaPost { get; } = new("australia_post"); + + + /// + /// Enum CanadaPost for value: canada_post + /// + public static CarrierName CanadaPost { get; } = new("canada_post"); + + + /// + /// Enum DhlEcommerce for value: dhl_ecommerce + /// + public static CarrierName DhlEcommerce { get; } = new("dhl_ecommerce"); + + + /// + /// Enum DhlExpress for value: dhl_express + /// + public static CarrierName DhlExpress { get; } = new("dhl_express"); + + + /// + /// Enum DhlExpressAu for value: dhl_express_au + /// + public static CarrierName DhlExpressAu { get; } = new("dhl_express_au"); + + + /// + /// Enum DhlExpressCa for value: dhl_express_ca + /// + public static CarrierName DhlExpressCa { get; } = new("dhl_express_ca"); + + + /// + /// Enum DhlExpressUk for value: dhl_express_uk + /// + public static CarrierName DhlExpressUk { get; } = new("dhl_express_uk"); + + + /// + /// Enum Dpd for value: dpd + /// + public static CarrierName Dpd { get; } = new("dpd"); + + + /// + /// Enum Endicia for value: endicia + /// + public static CarrierName Endicia { get; } = new("endicia"); + + + /// + /// Enum Fedex for value: fedex + /// + public static CarrierName Fedex { get; } = new("fedex"); + + + /// + /// Enum FedexUk for value: fedex_uk + /// + public static CarrierName FedexUk { get; } = new("fedex_uk"); + + + /// + /// Enum Firstmile for value: firstmile + /// + public static CarrierName Firstmile { get; } = new("firstmile"); + + + /// + /// Enum Imex for value: imex + /// + public static CarrierName Imex { get; } = new("imex"); + + + /// + /// Enum Newgistics for value: newgistics + /// + public static CarrierName Newgistics { get; } = new("newgistics"); + + + /// + /// Enum Ontrac for value: ontrac + /// + public static CarrierName Ontrac { get; } = new("ontrac"); + + + /// + /// Enum PurolatorCanada for value: purolator_canada + /// + public static CarrierName PurolatorCanada { get; } = new("purolator_canada"); + + + /// + /// Enum RoyalMail for value: royal_mail + /// + public static CarrierName RoyalMail { get; } = new("royal_mail"); + + + /// + /// Enum RrDonnelley for value: rr_donnelley + /// + public static CarrierName RrDonnelley { get; } = new("rr_donnelley"); + + + /// + /// Enum Seko for value: seko + /// + public static CarrierName Seko { get; } = new("seko"); + + + /// + /// Enum Sendle for value: sendle + /// + public static CarrierName Sendle { get; } = new("sendle"); + + + /// + /// Enum StampsCom for value: stamps_com + /// + public static CarrierName StampsCom { get; } = new("stamps_com"); + + + /// + /// Enum Ups for value: ups + /// + public static CarrierName Ups { get; } = new("ups"); + + + /// + /// Enum Lasership for value: lasership + /// + public static CarrierName Lasership { get; } = new("lasership"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is CarrierName other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class CarrierNameJsonConverter : JsonConverter +{ + public override CarrierName? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new CarrierName(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, CarrierName value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(CarrierName); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CarrierNameWithSettings.cs b/ShipEngineSDK/Model/CarrierNameWithSettings.cs new file mode 100644 index 00000000..01148eb0 --- /dev/null +++ b/ShipEngineSDK/Model/CarrierNameWithSettings.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The shipping carriers for which ShipEngine supports carrier settings +/// +/// The shipping carriers for which ShipEngine supports carrier settings +[JsonConverter(typeof(CarrierNameWithSettingsJsonConverter))] +public class CarrierNameWithSettings +{ + private readonly string _value; + + /// + /// Create a new instance of CarrierNameWithSettings with a predefined value. + /// + internal CarrierNameWithSettings() + { + _value = "dhl_express"; + } + + /// + /// Create a new instance of CarrierNameWithSettings with a custom value. + /// + /// The value of the CarrierNameWithSettings + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public CarrierNameWithSettings(string value) + { + _value = value; + } + + /// + /// Enum DhlExpress for value: dhl_express + /// + public static CarrierNameWithSettings DhlExpress { get; } = new("dhl_express"); + + + /// + /// Enum Fedex for value: fedex + /// + public static CarrierNameWithSettings Fedex { get; } = new("fedex"); + + + /// + /// Enum Newgistics for value: newgistics + /// + public static CarrierNameWithSettings Newgistics { get; } = new("newgistics"); + + + /// + /// Enum Ups for value: ups + /// + public static CarrierNameWithSettings Ups { get; } = new("ups"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is CarrierNameWithSettings other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class CarrierNameWithSettingsJsonConverter : JsonConverter +{ + public override CarrierNameWithSettings? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new CarrierNameWithSettings(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, CarrierNameWithSettings value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(CarrierNameWithSettings); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CollectOnDelivery.cs b/ShipEngineSDK/Model/CollectOnDelivery.cs new file mode 100644 index 00000000..0b6bc352 --- /dev/null +++ b/ShipEngineSDK/Model/CollectOnDelivery.cs @@ -0,0 +1,67 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Defer payment until package is delivered, instead of when it is ordered. +/// +public partial class CollectOnDelivery +{ + + /// + /// Gets or Sets PaymentAmount + /// + [JsonPropertyName("payment_amount"), JsonPropertyOrder(1)] + public PaymentAmount? PaymentAmount { get; set; } + + /// + /// Gets or Sets PaymentType + /// + [JsonPropertyName("payment_type"), JsonPropertyOrder(2)] + public CollectOnDeliveryPaymentType? PaymentType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CollectOnDelivery {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" PaymentAmount: ").Append(PaymentAmount).Append("\n"); + sb.Append(" PaymentType: ").Append(PaymentType).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CollectOnDeliveryPaymentType.cs b/ShipEngineSDK/Model/CollectOnDeliveryPaymentType.cs new file mode 100644 index 00000000..0c3ec8e8 --- /dev/null +++ b/ShipEngineSDK/Model/CollectOnDeliveryPaymentType.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Types of payment that are supported +/// +/// Types of payment that are supported +[JsonConverter(typeof(CollectOnDeliveryPaymentTypeJsonConverter))] +public class CollectOnDeliveryPaymentType +{ + private readonly string _value; + + /// + /// Create a new instance of CollectOnDeliveryPaymentType with a predefined value. + /// + internal CollectOnDeliveryPaymentType() + { + _value = "any"; + } + + /// + /// Create a new instance of CollectOnDeliveryPaymentType with a custom value. + /// + /// The value of the CollectOnDeliveryPaymentType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public CollectOnDeliveryPaymentType(string value) + { + _value = value; + } + + /// + /// Enum Any for value: any + /// + public static CollectOnDeliveryPaymentType Any { get; } = new("any"); + + + /// + /// Enum Cash for value: cash + /// + public static CollectOnDeliveryPaymentType Cash { get; } = new("cash"); + + + /// + /// Enum CashEquivalent for value: cash_equivalent + /// + public static CollectOnDeliveryPaymentType CashEquivalent { get; } = new("cash_equivalent"); + + + /// + /// Enum None for value: none + /// + public static CollectOnDeliveryPaymentType None { get; } = new("none"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is CollectOnDeliveryPaymentType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class CollectOnDeliveryPaymentTypeJsonConverter : JsonConverter +{ + public override CollectOnDeliveryPaymentType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new CollectOnDeliveryPaymentType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, CollectOnDeliveryPaymentType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(CollectOnDeliveryPaymentType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CompareBulkRatesRequestBody.cs b/ShipEngineSDK/Model/CompareBulkRatesRequestBody.cs new file mode 100644 index 00000000..a3758451 --- /dev/null +++ b/ShipEngineSDK/Model/CompareBulkRatesRequestBody.cs @@ -0,0 +1,276 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate shipments request body +/// +[JsonConverter(typeof(CompareBulkRatesRequestBodyJsonConverter))] +//[DataContract(Name = "compare_bulk_rates_request_body")] +public partial class CompareBulkRatesRequestBody : AbstractOpenAPISchema +{ + + /// + /// The rate options + /// + /// The rate options + [JsonPropertyName("rate_options"), JsonPropertyOrder(1)] + public required RateRequestBody RateOptions { get; set; } + + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RateRequestByShipmentIds. + public CompareBulkRatesRequestBody(RateRequestByShipmentIds actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RateRequestByShipments. + public CompareBulkRatesRequestBody(RateRequestByShipments actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(RateRequestByShipmentIds)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RateRequestByShipments)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: RateRequestByShipmentIds, RateRequestByShipments"); + } + } + } + + /// + /// Get the actual instance of `RateRequestByShipmentIds`. If the actual instance is not `RateRequestByShipmentIds`, + /// the InvalidClassException will be thrown + /// + /// An instance of RateRequestByShipmentIds + public RateRequestByShipmentIds GetRateRequestByShipmentIds() + { + return (RateRequestByShipmentIds)this.ActualInstance; + } + + /// + /// Get the actual instance of `RateRequestByShipments`. If the actual instance is not `RateRequestByShipments`, + /// the InvalidClassException will be thrown + /// + /// An instance of RateRequestByShipments + public RateRequestByShipments GetRateRequestByShipments() + { + return (RateRequestByShipments)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CompareBulkRatesRequestBody {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" RateOptions: ").Append(this.RateOptions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, CompareBulkRatesRequestBody.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for CompareBulkRatesRequestBody +/// +public class CompareBulkRatesRequestBodyJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(RateRequestByShipmentIds), typeof(RateRequestByShipments)]; + private static readonly HashSet MandatoryFields = ["RateOptions"]; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, CompareBulkRatesRequestBody value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("rate_options"); + JsonSerializer.Serialize(writer, value.RateOptions, options); + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override CompareBulkRatesRequestBody? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + CompareBulkRatesRequestBody? newCompareBulkRatesRequestBody = null; + + // Deserialize all the common properties of the model so they can be used in object initializers later + var rateOptions = jsonDoc.RootElement.GetProperty("rate_options").Deserialize(DeserializingOptions)!; + + int match = 0; + var matchedTypes = new List(); + + try + { + newCompareBulkRatesRequestBody = new CompareBulkRatesRequestBody(jsonDoc.Deserialize(DeserializingOptions)!) + { + RateOptions = rateOptions, + }; + + matchedTypes.Add("RateRequestByShipmentIds"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into RateRequestByShipmentIds: {1}", jsonDoc, exception); + } + + try + { + newCompareBulkRatesRequestBody = new CompareBulkRatesRequestBody(jsonDoc.Deserialize(DeserializingOptions)!) + { + RateOptions = rateOptions, + }; + + matchedTypes.Add("RateRequestByShipments"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into RateRequestByShipments: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newCompareBulkRatesRequestBody; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(CompareBulkRatesRequestBody).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectAccessWorldwideRequestBody.cs b/ShipEngineSDK/Model/ConnectAccessWorldwideRequestBody.cs new file mode 100644 index 00000000..d866da41 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAccessWorldwideRequestBody.cs @@ -0,0 +1,80 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Access Worldwide account information request body +/// +public partial class ConnectAccessWorldwideRequestBody +{ + + /// + /// The nickname associated with the carrier connection + /// + /// The nickname associated with the carrier connection + /// + /// Stamps.com + /// + [JsonPropertyName("nickname"), JsonPropertyOrder(1)] + public required string Nickname { get; set; } + + /// + /// Access Worldwide Password + /// + /// Access Worldwide Password + [JsonPropertyName("password"), JsonPropertyOrder(2)] + public required string Password { get; set; } + + /// + /// Access Worldwide Username + /// + /// Access Worldwide Username + [JsonPropertyName("username"), JsonPropertyOrder(3)] + public required string Username { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectAccessWorldwideRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectAmazonBuyShippingRequestBody.cs b/ShipEngineSDK/Model/ConnectAmazonBuyShippingRequestBody.cs new file mode 100644 index 00000000..3cbf6027 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAmazonBuyShippingRequestBody.cs @@ -0,0 +1,89 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Amazon account information request body +/// +public partial class ConnectAmazonBuyShippingRequestBody +{ + + /// + /// An email address. + /// + /// An email address. + /// + /// john.doe@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(1)] + public required string Email { get; set; } + + /// + /// Gets or Sets MerchantSellerId + /// + [JsonPropertyName("merchant_seller_id"), JsonPropertyOrder(2)] + public required string MerchantSellerId { get; set; } + + /// + /// Gets or Sets MwsAuthToken + /// + [JsonPropertyName("mws_auth_token"), JsonPropertyOrder(3)] + public required string MwsAuthToken { get; set; } + + /// + /// Nickname to be associated with the account connection + /// + /// Nickname to be associated with the account connection + /// + /// Test Amazon Buy Shipping + /// + [JsonPropertyName("nickname"), JsonPropertyOrder(4)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectAmazonBuyShippingRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" MerchantSellerId: ").Append(MerchantSellerId).Append("\n"); + sb.Append(" MwsAuthToken: ").Append(MwsAuthToken).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectAmazonShippingUk.cs b/ShipEngineSDK/Model/ConnectAmazonShippingUk.cs new file mode 100644 index 00000000..72cb7ba5 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAmazonShippingUk.cs @@ -0,0 +1,72 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Amazon Shipping UK account information request body +/// +public partial class ConnectAmazonShippingUk +{ + + /// + /// Amazon UK Shipping auth code. + /// + /// Amazon UK Shipping auth code. + [JsonPropertyName("auth_code"), JsonPropertyOrder(1)] + public required string AuthCode { get; set; } + + /// + /// The nickname associated with the carrier connection + /// + /// The nickname associated with the carrier connection + /// + /// Stamps.com + /// + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectAmazonShippingUk {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectApcRequestBody.cs b/ShipEngineSDK/Model/ConnectApcRequestBody.cs new file mode 100644 index 00000000..8139381d --- /dev/null +++ b/ShipEngineSDK/Model/ConnectApcRequestBody.cs @@ -0,0 +1,86 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An APC account information request body +/// +public partial class ConnectApcRequestBody +{ + + /// + /// The nickname for the APC account + /// + /// The nickname for the APC account + /// + /// APC carrier account + /// + [JsonPropertyName("nickname"), JsonPropertyOrder(1)] + public required string Nickname { get; set; } + + /// + /// The password for the APC account + /// + /// The password for the APC account + /// + /// 12345 + /// + [JsonPropertyName("password"), JsonPropertyOrder(2)] + public required string Password { get; set; } + + /// + /// The username for the APC account + /// + /// The username for the APC account + /// + /// john_doe + /// + [JsonPropertyName("username"), JsonPropertyOrder(3)] + public required string Username { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectApcRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectAsendiaRequestBody.cs b/ShipEngineSDK/Model/ConnectAsendiaRequestBody.cs new file mode 100644 index 00000000..c991fa3c --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAsendiaRequestBody.cs @@ -0,0 +1,112 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Asendia account information request body +/// +public partial class ConnectAsendiaRequestBody +{ + + /// + /// Asendia account number + /// + /// Asendia account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Asendia api_key + /// + /// Asendia api_key + [JsonPropertyName("api_key"), JsonPropertyOrder(2)] + public required string ApiKey { get; set; } + + /// + /// The nickname of the Asendia account + /// + /// The nickname of the Asendia account + /// + /// Asendia account + /// + [JsonPropertyName("nickname"), JsonPropertyOrder(3)] + public required string Nickname { get; set; } + + /// + /// Asendia password + /// + /// Asendia password + [JsonPropertyName("password"), JsonPropertyOrder(4)] + public required string Password { get; set; } + + /// + /// Asendia processing location, one of: 'MIA', 'JFK', 'ORD', 'PHL', 'SFO', 'LAX', 'SLC', 'TOR', 'BUF', 'CAL' + /// + /// Asendia processing location, one of: 'MIA', 'JFK', 'ORD', 'PHL', 'SFO', 'LAX', 'SLC', 'TOR', 'BUF', 'CAL' + [JsonPropertyName("processing_location"), JsonPropertyOrder(5)] + public required string ProcessingLocation { get; set; } + + /// + /// Asendia username + /// + /// Asendia username + [JsonPropertyName("username"), JsonPropertyOrder(6)] + public required string Username { get; set; } + + /// + /// Asendia sub account number + /// + /// Asendia sub account number + [JsonPropertyName("sub_account_number"), JsonPropertyOrder(7)] + public string? SubAccountNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectAsendiaRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" ProcessingLocation: ").Append(ProcessingLocation).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" SubAccountNumber: ").Append(SubAccountNumber).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectAustraliaPostRequestBody.cs b/ShipEngineSDK/Model/ConnectAustraliaPostRequestBody.cs new file mode 100644 index 00000000..cd4e12f1 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAustraliaPostRequestBody.cs @@ -0,0 +1,85 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Australia Post account information request body +/// +public partial class ConnectAustraliaPostRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// API key + /// + /// API key + [JsonPropertyName("api_key"), JsonPropertyOrder(2)] + public required string ApiKey { get; set; } + + /// + /// API secret + /// + /// API secret + [JsonPropertyName("api_secret"), JsonPropertyOrder(3)] + public required string ApiSecret { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(4)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectAustraliaPostRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" ApiSecret: ").Append(ApiSecret).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectCanadaPostRequestBody.cs b/ShipEngineSDK/Model/ConnectCanadaPostRequestBody.cs new file mode 100644 index 00000000..9b9b90c5 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectCanadaPostRequestBody.cs @@ -0,0 +1,93 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Canada Post account information request body +/// +public partial class ConnectCanadaPostRequestBody +{ + + /// + /// Canada Post Account Number + /// + /// Canada Post Account Number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Canada Post Account API Key + /// + /// Canada Post Account API Key + [JsonPropertyName("api_key"), JsonPropertyOrder(2)] + public required string ApiKey { get; set; } + + /// + /// Canada Post Account API Secret + /// + /// Canada Post Account API Secret + [JsonPropertyName("api_secret"), JsonPropertyOrder(3)] + public required string ApiSecret { get; set; } + + /// + /// Canada Post Account Contract ID + /// + /// Canada Post Account Contract ID + [JsonPropertyName("contract_id"), JsonPropertyOrder(4)] + public required string ContractId { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(5)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectCanadaPostRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" ApiSecret: ").Append(ApiSecret).Append("\n"); + sb.Append(" ContractId: ").Append(ContractId).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectCarrierRequestBody.cs b/ShipEngineSDK/Model/ConnectCarrierRequestBody.cs new file mode 100644 index 00000000..0adc92ae --- /dev/null +++ b/ShipEngineSDK/Model/ConnectCarrierRequestBody.cs @@ -0,0 +1,1245 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ConnectCarrierRequestBody +/// +[JsonConverter(typeof(ConnectCarrierRequestBodyJsonConverter))] +//[DataContract(Name = "connect_carrier_request_body")] +public partial class ConnectCarrierRequestBody : AbstractOpenAPISchema +{ + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectAccessWorldwideRequestBody. + public ConnectCarrierRequestBody(ConnectAccessWorldwideRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectAmazonBuyShippingRequestBody. + public ConnectCarrierRequestBody(ConnectAmazonBuyShippingRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectAmazonShippingUk. + public ConnectCarrierRequestBody(ConnectAmazonShippingUk actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectApcRequestBody. + public ConnectCarrierRequestBody(ConnectApcRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectAsendiaRequestBody. + public ConnectCarrierRequestBody(ConnectAsendiaRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectAustraliaPostRequestBody. + public ConnectCarrierRequestBody(ConnectAustraliaPostRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectCanadaPostRequestBody. + public ConnectCarrierRequestBody(ConnectCanadaPostRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectDhlEcommerceRequestBody. + public ConnectCarrierRequestBody(ConnectDhlEcommerceRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectDhlExpressRequestBody. + public ConnectCarrierRequestBody(ConnectDhlExpressRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectDhlExpressAuRequestBody. + public ConnectCarrierRequestBody(ConnectDhlExpressAuRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectDhlExpressCaRequestBody. + public ConnectCarrierRequestBody(ConnectDhlExpressCaRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectDhlExpressUkRequestBody. + public ConnectCarrierRequestBody(ConnectDhlExpressUkRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectDpdRequestBody. + public ConnectCarrierRequestBody(ConnectDpdRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectEndiciaRequestBody. + public ConnectCarrierRequestBody(ConnectEndiciaRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectFedexRequestBody. + public ConnectCarrierRequestBody(ConnectFedexRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectFedexUkRequestBody. + public ConnectCarrierRequestBody(ConnectFedexUkRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectFirstmileRequestBody. + public ConnectCarrierRequestBody(ConnectFirstmileRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectImexRequestBody. + public ConnectCarrierRequestBody(ConnectImexRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectLasershipRequestBody. + public ConnectCarrierRequestBody(ConnectLasershipRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectNewgisticsRequestBody. + public ConnectCarrierRequestBody(ConnectNewgisticsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectOntracRequestBody. + public ConnectCarrierRequestBody(ConnectOntracRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectPurolatorRequestBody. + public ConnectCarrierRequestBody(ConnectPurolatorRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectRoyalMailRequestBody. + public ConnectCarrierRequestBody(ConnectRoyalMailRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectRrDonnelleyRequestBody. + public ConnectCarrierRequestBody(ConnectRrDonnelleyRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectSekoRequestBody. + public ConnectCarrierRequestBody(ConnectSekoRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectSendleRequestBody. + public ConnectCarrierRequestBody(ConnectSendleRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectStampsRequestBody. + public ConnectCarrierRequestBody(ConnectStampsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ConnectUpsRequestBody. + public ConnectCarrierRequestBody(ConnectUpsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(ConnectAccessWorldwideRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectAmazonBuyShippingRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectAmazonShippingUk)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectApcRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectAsendiaRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectAustraliaPostRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectCanadaPostRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectDhlEcommerceRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectDhlExpressRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectDhlExpressAuRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectDhlExpressCaRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectDhlExpressUkRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectDpdRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectEndiciaRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectFedexRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectFedexUkRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectFirstmileRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectImexRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectLasershipRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectNewgisticsRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectOntracRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectPurolatorRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectRoyalMailRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectRrDonnelleyRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectSekoRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectSendleRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectStampsRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ConnectUpsRequestBody)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: ConnectAccessWorldwideRequestBody, ConnectAmazonBuyShippingRequestBody, ConnectAmazonShippingUk, ConnectApcRequestBody, ConnectAsendiaRequestBody, ConnectAustraliaPostRequestBody, ConnectCanadaPostRequestBody, ConnectDhlEcommerceRequestBody, ConnectDhlExpressRequestBody, ConnectDhlExpressAuRequestBody, ConnectDhlExpressCaRequestBody, ConnectDhlExpressUkRequestBody, ConnectDpdRequestBody, ConnectEndiciaRequestBody, ConnectFedexRequestBody, ConnectFedexUkRequestBody, ConnectFirstmileRequestBody, ConnectImexRequestBody, ConnectLasershipRequestBody, ConnectNewgisticsRequestBody, ConnectOntracRequestBody, ConnectPurolatorRequestBody, ConnectRoyalMailRequestBody, ConnectRrDonnelleyRequestBody, ConnectSekoRequestBody, ConnectSendleRequestBody, ConnectStampsRequestBody, ConnectUpsRequestBody"); + } + } + } + + /// + /// Get the actual instance of `ConnectAccessWorldwideRequestBody`. If the actual instance is not `ConnectAccessWorldwideRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectAccessWorldwideRequestBody + public ConnectAccessWorldwideRequestBody GetConnectAccessWorldwideRequestBody() + { + return (ConnectAccessWorldwideRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectAmazonBuyShippingRequestBody`. If the actual instance is not `ConnectAmazonBuyShippingRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectAmazonBuyShippingRequestBody + public ConnectAmazonBuyShippingRequestBody GetConnectAmazonBuyShippingRequestBody() + { + return (ConnectAmazonBuyShippingRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectAmazonShippingUk`. If the actual instance is not `ConnectAmazonShippingUk`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectAmazonShippingUk + public ConnectAmazonShippingUk GetConnectAmazonShippingUk() + { + return (ConnectAmazonShippingUk)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectApcRequestBody`. If the actual instance is not `ConnectApcRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectApcRequestBody + public ConnectApcRequestBody GetConnectApcRequestBody() + { + return (ConnectApcRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectAsendiaRequestBody`. If the actual instance is not `ConnectAsendiaRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectAsendiaRequestBody + public ConnectAsendiaRequestBody GetConnectAsendiaRequestBody() + { + return (ConnectAsendiaRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectAustraliaPostRequestBody`. If the actual instance is not `ConnectAustraliaPostRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectAustraliaPostRequestBody + public ConnectAustraliaPostRequestBody GetConnectAustraliaPostRequestBody() + { + return (ConnectAustraliaPostRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectCanadaPostRequestBody`. If the actual instance is not `ConnectCanadaPostRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectCanadaPostRequestBody + public ConnectCanadaPostRequestBody GetConnectCanadaPostRequestBody() + { + return (ConnectCanadaPostRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectDhlEcommerceRequestBody`. If the actual instance is not `ConnectDhlEcommerceRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectDhlEcommerceRequestBody + public ConnectDhlEcommerceRequestBody GetConnectDhlEcommerceRequestBody() + { + return (ConnectDhlEcommerceRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectDhlExpressRequestBody`. If the actual instance is not `ConnectDhlExpressRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectDhlExpressRequestBody + public ConnectDhlExpressRequestBody GetConnectDhlExpressRequestBody() + { + return (ConnectDhlExpressRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectDhlExpressAuRequestBody`. If the actual instance is not `ConnectDhlExpressAuRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectDhlExpressAuRequestBody + public ConnectDhlExpressAuRequestBody GetConnectDhlExpressAuRequestBody() + { + return (ConnectDhlExpressAuRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectDhlExpressCaRequestBody`. If the actual instance is not `ConnectDhlExpressCaRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectDhlExpressCaRequestBody + public ConnectDhlExpressCaRequestBody GetConnectDhlExpressCaRequestBody() + { + return (ConnectDhlExpressCaRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectDhlExpressUkRequestBody`. If the actual instance is not `ConnectDhlExpressUkRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectDhlExpressUkRequestBody + public ConnectDhlExpressUkRequestBody GetConnectDhlExpressUkRequestBody() + { + return (ConnectDhlExpressUkRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectDpdRequestBody`. If the actual instance is not `ConnectDpdRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectDpdRequestBody + public ConnectDpdRequestBody GetConnectDpdRequestBody() + { + return (ConnectDpdRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectEndiciaRequestBody`. If the actual instance is not `ConnectEndiciaRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectEndiciaRequestBody + public ConnectEndiciaRequestBody GetConnectEndiciaRequestBody() + { + return (ConnectEndiciaRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectFedexRequestBody`. If the actual instance is not `ConnectFedexRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectFedexRequestBody + public ConnectFedexRequestBody GetConnectFedexRequestBody() + { + return (ConnectFedexRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectFedexUkRequestBody`. If the actual instance is not `ConnectFedexUkRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectFedexUkRequestBody + public ConnectFedexUkRequestBody GetConnectFedexUkRequestBody() + { + return (ConnectFedexUkRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectFirstmileRequestBody`. If the actual instance is not `ConnectFirstmileRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectFirstmileRequestBody + public ConnectFirstmileRequestBody GetConnectFirstmileRequestBody() + { + return (ConnectFirstmileRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectImexRequestBody`. If the actual instance is not `ConnectImexRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectImexRequestBody + public ConnectImexRequestBody GetConnectImexRequestBody() + { + return (ConnectImexRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectLasershipRequestBody`. If the actual instance is not `ConnectLasershipRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectLasershipRequestBody + public ConnectLasershipRequestBody GetConnectLasershipRequestBody() + { + return (ConnectLasershipRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectNewgisticsRequestBody`. If the actual instance is not `ConnectNewgisticsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectNewgisticsRequestBody + public ConnectNewgisticsRequestBody GetConnectNewgisticsRequestBody() + { + return (ConnectNewgisticsRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectOntracRequestBody`. If the actual instance is not `ConnectOntracRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectOntracRequestBody + public ConnectOntracRequestBody GetConnectOntracRequestBody() + { + return (ConnectOntracRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectPurolatorRequestBody`. If the actual instance is not `ConnectPurolatorRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectPurolatorRequestBody + public ConnectPurolatorRequestBody GetConnectPurolatorRequestBody() + { + return (ConnectPurolatorRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectRoyalMailRequestBody`. If the actual instance is not `ConnectRoyalMailRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectRoyalMailRequestBody + public ConnectRoyalMailRequestBody GetConnectRoyalMailRequestBody() + { + return (ConnectRoyalMailRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectRrDonnelleyRequestBody`. If the actual instance is not `ConnectRrDonnelleyRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectRrDonnelleyRequestBody + public ConnectRrDonnelleyRequestBody GetConnectRrDonnelleyRequestBody() + { + return (ConnectRrDonnelleyRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectSekoRequestBody`. If the actual instance is not `ConnectSekoRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectSekoRequestBody + public ConnectSekoRequestBody GetConnectSekoRequestBody() + { + return (ConnectSekoRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectSendleRequestBody`. If the actual instance is not `ConnectSendleRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectSendleRequestBody + public ConnectSendleRequestBody GetConnectSendleRequestBody() + { + return (ConnectSendleRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectStampsRequestBody`. If the actual instance is not `ConnectStampsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectStampsRequestBody + public ConnectStampsRequestBody GetConnectStampsRequestBody() + { + return (ConnectStampsRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `ConnectUpsRequestBody`. If the actual instance is not `ConnectUpsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of ConnectUpsRequestBody + public ConnectUpsRequestBody GetConnectUpsRequestBody() + { + return (ConnectUpsRequestBody)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectCarrierRequestBody {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, ConnectCarrierRequestBody.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for ConnectCarrierRequestBody +/// +public class ConnectCarrierRequestBodyJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(ConnectAccessWorldwideRequestBody), typeof(ConnectAmazonBuyShippingRequestBody), typeof(ConnectAmazonShippingUk), typeof(ConnectApcRequestBody), typeof(ConnectAsendiaRequestBody), typeof(ConnectAustraliaPostRequestBody), typeof(ConnectCanadaPostRequestBody), typeof(ConnectDhlEcommerceRequestBody), typeof(ConnectDhlExpressRequestBody), typeof(ConnectDhlExpressAuRequestBody), typeof(ConnectDhlExpressCaRequestBody), typeof(ConnectDhlExpressUkRequestBody), typeof(ConnectDpdRequestBody), typeof(ConnectEndiciaRequestBody), typeof(ConnectFedexRequestBody), typeof(ConnectFedexUkRequestBody), typeof(ConnectFirstmileRequestBody), typeof(ConnectImexRequestBody), typeof(ConnectLasershipRequestBody), typeof(ConnectNewgisticsRequestBody), typeof(ConnectOntracRequestBody), typeof(ConnectPurolatorRequestBody), typeof(ConnectRoyalMailRequestBody), typeof(ConnectRrDonnelleyRequestBody), typeof(ConnectSekoRequestBody), typeof(ConnectSendleRequestBody), typeof(ConnectStampsRequestBody), typeof(ConnectUpsRequestBody)]; + private static readonly HashSet MandatoryFields = ["AccessKey", "Account", "AccountCountryCode", "AccountNumber", "AccountPostalCode", "ActivationKey", "Address", "Address1", "AgreeToEula", "ApiKey", "ApiSecret", "AuthCode", "City", "ClientId", "ContactName", "ContractId", "CountryCode", "CustomerBranch", "DistributionCenter", "Email", "FirstName", "InductionSite", "LasershipCriticalEntryTime", "LasershipCriticalPullTime", "LastName", "MailerId", "MerchantSellerId", "MwsAuthToken", "Nickname", "Passphrase", "Password", "Phone", "PickupNumber", "PostalCode", "ProcessingLocation", "SendleId", "SiteId", "State", "Username", "WebServicesId", "WebServicesKey"]; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, ConnectCarrierRequestBody value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override ConnectCarrierRequestBody? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + ConnectCarrierRequestBody? newConnectCarrierRequestBody = null; + + + int match = 0; + var matchedTypes = new List(); + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectAccessWorldwideRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectAccessWorldwideRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectAmazonBuyShippingRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectAmazonBuyShippingRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectAmazonShippingUk"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectAmazonShippingUk: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectApcRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectApcRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectAsendiaRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectAsendiaRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectAustraliaPostRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectAustraliaPostRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectCanadaPostRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectCanadaPostRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectDhlEcommerceRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectDhlEcommerceRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectDhlExpressRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectDhlExpressRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectDhlExpressAuRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectDhlExpressAuRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectDhlExpressCaRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectDhlExpressCaRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectDhlExpressUkRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectDhlExpressUkRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectDpdRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectDpdRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectEndiciaRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectEndiciaRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectFedexRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectFedexRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectFedexUkRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectFedexUkRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectFirstmileRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectFirstmileRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectImexRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectImexRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectLasershipRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectLasershipRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectNewgisticsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectNewgisticsRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectOntracRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectOntracRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectPurolatorRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectPurolatorRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectRoyalMailRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectRoyalMailRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectRrDonnelleyRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectRrDonnelleyRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectSekoRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectSekoRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectSendleRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectSendleRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectStampsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectStampsRequestBody: {1}", jsonDoc, exception); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("ConnectUpsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into ConnectUpsRequestBody: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newConnectCarrierRequestBody; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(ConnectCarrierRequestBody).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectCarrierResponseBody.cs b/ShipEngineSDK/Model/ConnectCarrierResponseBody.cs new file mode 100644 index 00000000..95b3f955 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectCarrierResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A connect account response body +/// +public partial class ConnectCarrierResponseBody +{ + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1)] + public required string CarrierId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectCarrierResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectDhlEcommerceRequestBody.cs b/ShipEngineSDK/Model/ConnectDhlEcommerceRequestBody.cs new file mode 100644 index 00000000..985268ac --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlEcommerceRequestBody.cs @@ -0,0 +1,170 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DHL Ecommerce account information request body +/// +public partial class ConnectDhlEcommerceRequestBody +{ + + /// + /// The client id + /// + /// The client id + [JsonPropertyName("client_id"), JsonPropertyOrder(1)] + public required string ClientId { get; set; } + + /// + /// The distribution center + /// + /// The distribution center + [JsonPropertyName("distribution_center"), JsonPropertyOrder(2)] + public required string DistributionCenter { get; set; } + + /// + /// A nickname to help you identify this account + /// + /// A nickname to help you identify this account + [JsonPropertyName("nickname"), JsonPropertyOrder(3)] + public required string Nickname { get; set; } + + /// + /// The account password + /// + /// The account password + [JsonPropertyName("password"), JsonPropertyOrder(4)] + public required string Password { get; set; } + + /// + /// The pickup number + /// + /// The pickup number + [JsonPropertyName("pickup_number"), JsonPropertyOrder(5)] + public required string PickupNumber { get; set; } + + /// + /// The account username + /// + /// The account username + [JsonPropertyName("username"), JsonPropertyOrder(6)] + public required string Username { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(7), Obsolete] + public string? AccountNumber { get; set; } + + /// + /// Gets or Sets AncillaryEndorsement + /// + [JsonPropertyName("ancillary_endorsement"), JsonPropertyOrder(8)] + public AncillaryServiceEndorsement? AncillaryEndorsement { get; set; } + + /// + /// The DHL E-Commerce API key. This field is optional, but if not set you will not be able to get rates for this account. + /// + /// The DHL E-Commerce API key. This field is optional, but if not set you will not be able to get rates for this account. + [JsonPropertyName("api_key"), JsonPropertyOrder(9)] + public string? ApiKey { get; set; } + + /// + /// The DHL E-Commerce API secret. This field is optional, but if not set you will not be able to get rates for this account. + /// + /// The DHL E-Commerce API secret. This field is optional, but if not set you will not be able to get rates for this account. + [JsonPropertyName("api_secret"), JsonPropertyOrder(10)] + public string? ApiSecret { get; set; } + + /// + /// FTP password + /// + /// FTP password + [JsonPropertyName("ftp_password"), JsonPropertyOrder(11), Obsolete] + public string? FtpPassword { get; set; } + + /// + /// FTP username + /// + /// FTP username + [JsonPropertyName("ftp_username"), JsonPropertyOrder(12), Obsolete] + public string? FtpUsername { get; set; } + + /// + /// Gets or Sets RegistrationId + /// + [JsonPropertyName("registration_id"), JsonPropertyOrder(13)] + public string? RegistrationId { get; set; } + + /// + /// Gets or Sets SoftwareName + /// + [JsonPropertyName("software_name"), JsonPropertyOrder(14)] + public string? SoftwareName { get; set; } + + /// + /// Sold To field + /// + /// Sold To field + [JsonPropertyName("sold_to"), JsonPropertyOrder(15)] + public string? SoldTo { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectDhlEcommerceRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" DistributionCenter: ").Append(DistributionCenter).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" PickupNumber: ").Append(PickupNumber).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" AncillaryEndorsement: ").Append(AncillaryEndorsement).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" ApiSecret: ").Append(ApiSecret).Append("\n"); + sb.Append(" FtpPassword: ").Append(FtpPassword).Append("\n"); + sb.Append(" FtpUsername: ").Append(FtpUsername).Append("\n"); + sb.Append(" RegistrationId: ").Append(RegistrationId).Append("\n"); + sb.Append(" SoftwareName: ").Append(SoftwareName).Append("\n"); + sb.Append(" SoldTo: ").Append(SoldTo).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectDhlExpressAuRequestBody.cs b/ShipEngineSDK/Model/ConnectDhlExpressAuRequestBody.cs new file mode 100644 index 00000000..6d95e5f3 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressAuRequestBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DHL Express AU account information request body +/// +public partial class ConnectDhlExpressAuRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressAuRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectDhlExpressCaRequestBody.cs b/ShipEngineSDK/Model/ConnectDhlExpressCaRequestBody.cs new file mode 100644 index 00000000..13417ef9 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressCaRequestBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DHL Express CA account information request body +/// +public partial class ConnectDhlExpressCaRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressCaRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectDhlExpressRequestBody.cs b/ShipEngineSDK/Model/ConnectDhlExpressRequestBody.cs new file mode 100644 index 00000000..6cb9c515 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressRequestBody.cs @@ -0,0 +1,96 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DHL express account information request body +/// +public partial class ConnectDhlExpressRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(3)] + public string? CountryCode { get; set; } + + /// + /// Required if site id is provided + /// + /// Required if site id is provided + [JsonPropertyName("password"), JsonPropertyOrder(4)] + public string? Password { get; set; } + + /// + /// Required if password is provided + /// + /// Required if password is provided + [JsonPropertyName("site_id"), JsonPropertyOrder(5)] + public string? SiteId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" SiteId: ").Append(SiteId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectDhlExpressUkRequestBody.cs b/ShipEngineSDK/Model/ConnectDhlExpressUkRequestBody.cs new file mode 100644 index 00000000..3826cf20 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressUkRequestBody.cs @@ -0,0 +1,88 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DHL Express UK account information request body +/// +public partial class ConnectDhlExpressUkRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password"), JsonPropertyOrder(3)] + public required string Password { get; set; } + + /// + /// A string that uniquely identifies the site + /// + /// A string that uniquely identifies the site + /// + /// se-28529731 + /// + [JsonPropertyName("site_id"), JsonPropertyOrder(4)] + public required string SiteId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressUkRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" SiteId: ").Append(SiteId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectDpdRequestBody.cs b/ShipEngineSDK/Model/ConnectDpdRequestBody.cs new file mode 100644 index 00000000..62822af1 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDpdRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DPD account information request body +/// +public partial class ConnectDpdRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password"), JsonPropertyOrder(3)] + public required string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectDpdRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectEndiciaRequestBody.cs b/ShipEngineSDK/Model/ConnectEndiciaRequestBody.cs new file mode 100644 index 00000000..e1702904 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectEndiciaRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Endicia account information request body +/// +public partial class ConnectEndiciaRequestBody +{ + + /// + /// Account + /// + /// Account + [JsonPropertyName("account"), JsonPropertyOrder(1)] + public required string Account { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// Passphrase + /// + /// Passphrase + [JsonPropertyName("passphrase"), JsonPropertyOrder(3)] + public required string Passphrase { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectEndiciaRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Account: ").Append(Account).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Passphrase: ").Append(Passphrase).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectFedexRequestBody.cs b/ShipEngineSDK/Model/ConnectFedexRequestBody.cs new file mode 100644 index 00000000..49781969 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectFedexRequestBody.cs @@ -0,0 +1,176 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Fedex account information request body +/// +public partial class ConnectFedexRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address1"), JsonPropertyOrder(2)] + public required string Address1 { get; set; } + + /// + /// Boolean signaling agreement to the Fedex End User License Agreement + /// + /// Boolean signaling agreement to the Fedex End User License Agreement + [JsonPropertyName("agree_to_eula"), JsonPropertyOrder(3)] + public required bool AgreeToEula { get; set; } + + /// + /// The city + /// + /// The city + [JsonPropertyName("city"), JsonPropertyOrder(4)] + public required string City { get; set; } + + /// + /// Country code + /// + /// Country code + [JsonPropertyName("country_code"), JsonPropertyOrder(5)] + public required string CountryCode { get; set; } + + /// + /// The email address + /// + /// The email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(6)] + public required string Email { get; set; } + + /// + /// First name + /// + /// First name + [JsonPropertyName("first_name"), JsonPropertyOrder(7)] + public required string FirstName { get; set; } + + /// + /// Last name + /// + /// Last name + [JsonPropertyName("last_name"), JsonPropertyOrder(8)] + public required string LastName { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(9)] + public required string Nickname { get; set; } + + /// + /// Phone number + /// + /// Phone number + [JsonPropertyName("phone"), JsonPropertyOrder(10)] + public required string Phone { get; set; } + + /// + /// Postal Code + /// + /// Postal Code + [JsonPropertyName("postal_code"), JsonPropertyOrder(11)] + public required string PostalCode { get; set; } + + /// + /// State + /// + /// State + [JsonPropertyName("state"), JsonPropertyOrder(12)] + public required string State { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address2"), JsonPropertyOrder(13)] + public string? Address2 { get; set; } + + /// + /// The company + /// + /// The company + [JsonPropertyName("company"), JsonPropertyOrder(14)] + public string? Company { get; set; } + + /// + /// Meter number + /// + /// Meter number + [JsonPropertyName("meter_number"), JsonPropertyOrder(15)] + public string? MeterNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectFedexRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Address1: ").Append(Address1).Append("\n"); + sb.Append(" AgreeToEula: ").Append(AgreeToEula).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Address2: ").Append(Address2).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" MeterNumber: ").Append(MeterNumber).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectFedexUkRequestBody.cs b/ShipEngineSDK/Model/ConnectFedexUkRequestBody.cs new file mode 100644 index 00000000..c18f1b6c --- /dev/null +++ b/ShipEngineSDK/Model/ConnectFedexUkRequestBody.cs @@ -0,0 +1,176 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Fedex UK account information request body +/// +public partial class ConnectFedexUkRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address1"), JsonPropertyOrder(2)] + public required string Address1 { get; set; } + + /// + /// Boolean signaling agreement to the Fedex End User License Agreement + /// + /// Boolean signaling agreement to the Fedex End User License Agreement + [JsonPropertyName("agree_to_eula"), JsonPropertyOrder(3)] + public required bool AgreeToEula { get; set; } + + /// + /// The city + /// + /// The city + [JsonPropertyName("city"), JsonPropertyOrder(4)] + public required string City { get; set; } + + /// + /// Country code + /// + /// Country code + [JsonPropertyName("country_code"), JsonPropertyOrder(5)] + public required string CountryCode { get; set; } + + /// + /// The email address + /// + /// The email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(6)] + public required string Email { get; set; } + + /// + /// First name + /// + /// First name + [JsonPropertyName("first_name"), JsonPropertyOrder(7)] + public required string FirstName { get; set; } + + /// + /// Last name + /// + /// Last name + [JsonPropertyName("last_name"), JsonPropertyOrder(8)] + public required string LastName { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(9)] + public required string Nickname { get; set; } + + /// + /// Phone number + /// + /// Phone number + [JsonPropertyName("phone"), JsonPropertyOrder(10)] + public required string Phone { get; set; } + + /// + /// Postal Code + /// + /// Postal Code + [JsonPropertyName("postal_code"), JsonPropertyOrder(11)] + public required string PostalCode { get; set; } + + /// + /// State + /// + /// State + [JsonPropertyName("state"), JsonPropertyOrder(12)] + public required string State { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address2"), JsonPropertyOrder(13)] + public string? Address2 { get; set; } + + /// + /// The company + /// + /// The company + [JsonPropertyName("company"), JsonPropertyOrder(14)] + public string? Company { get; set; } + + /// + /// Meter number + /// + /// Meter number + [JsonPropertyName("meter_number"), JsonPropertyOrder(15)] + public string? MeterNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectFedexUkRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Address1: ").Append(Address1).Append("\n"); + sb.Append(" AgreeToEula: ").Append(AgreeToEula).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Address2: ").Append(Address2).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" MeterNumber: ").Append(MeterNumber).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectFirstmileRequestBody.cs b/ShipEngineSDK/Model/ConnectFirstmileRequestBody.cs new file mode 100644 index 00000000..b8df1b40 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectFirstmileRequestBody.cs @@ -0,0 +1,88 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A First Mile account information request body +/// +public partial class ConnectFirstmileRequestBody +{ + + /// + /// A string that uniquely identifies the mailer + /// + /// A string that uniquely identifies the mailer + /// + /// se-28529731 + /// + [JsonPropertyName("mailer_id"), JsonPropertyOrder(1)] + public required string MailerId { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password"), JsonPropertyOrder(3)] + public required string Password { get; set; } + + /// + /// Profile name + /// + /// Profile name + [JsonPropertyName("profile_name"), JsonPropertyOrder(4)] + public string? ProfileName { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectFirstmileRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" MailerId: ").Append(MailerId).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" ProfileName: ").Append(ProfileName).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectImexRequestBody.cs b/ShipEngineSDK/Model/ConnectImexRequestBody.cs new file mode 100644 index 00000000..1c13872e --- /dev/null +++ b/ShipEngineSDK/Model/ConnectImexRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Imex account information request body +/// +public partial class ConnectImexRequestBody +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(1)] + public required string Nickname { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password"), JsonPropertyOrder(2)] + public required string Password { get; set; } + + /// + /// Username + /// + /// Username + [JsonPropertyName("username"), JsonPropertyOrder(3)] + public required string Username { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectImexRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectInsurerRequestBody.cs b/ShipEngineSDK/Model/ConnectInsurerRequestBody.cs new file mode 100644 index 00000000..18957631 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectInsurerRequestBody.cs @@ -0,0 +1,71 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create shipsurance connection request body +/// +public partial class ConnectInsurerRequestBody +{ + + /// + /// An email address. + /// + /// An email address. + /// + /// john.doe@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(1)] + public required string Email { get; set; } + + /// + /// Gets or Sets PolicyId + /// + [JsonPropertyName("policy_id"), JsonPropertyOrder(2)] + public required string PolicyId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectInsurerRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" PolicyId: ").Append(PolicyId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectLasershipRequestBody.cs b/ShipEngineSDK/Model/ConnectLasershipRequestBody.cs new file mode 100644 index 00000000..c4c9b930 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectLasershipRequestBody.cs @@ -0,0 +1,261 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Lasership account information request body +/// +public partial class ConnectLasershipRequestBody +{ + + /// + /// Address + /// + /// Address + [JsonPropertyName("Address"), JsonPropertyOrder(1)] + public required String Address { get; set; } + + /// + /// City + /// + /// City + [JsonPropertyName("City"), JsonPropertyOrder(2)] + public required String City { get; set; } + + /// + /// Customer Branch + /// + /// Customer Branch + [JsonPropertyName("customer_branch"), JsonPropertyOrder(3)] + public required string CustomerBranch { get; set; } + + /// + /// Critical Entry Time (local time) + /// + /// Critical Entry Time (local time) + [JsonPropertyName("lasership_critical_entry_time"), JsonPropertyOrder(4)] + public required String LasershipCriticalEntryTime { get; set; } + + /// + /// Critical Pull Time (local time) + /// + /// Critical Pull Time (local time) + [JsonPropertyName("lasership_critical_pull_time"), JsonPropertyOrder(5)] + public required String LasershipCriticalPullTime { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(6)] + public required string Nickname { get; set; } + + /// + /// PostalCode + /// + /// PostalCode + [JsonPropertyName("PostalCode"), JsonPropertyOrder(7)] + public required String PostalCode { get; set; } + + /// + /// State + /// + /// State + [JsonPropertyName("State"), JsonPropertyOrder(8)] + public required String State { get; set; } + + /// + /// Web Service ID (WSID) + /// + /// Web Service ID (WSID) + [JsonPropertyName("web_services_id"), JsonPropertyOrder(9)] + public required string WebServicesId { get; set; } + + /// + /// Web Service Key (WSKey) + /// + /// Web Service Key (WSKey) + [JsonPropertyName("web_services_key"), JsonPropertyOrder(10)] + public required string WebServicesKey { get; set; } + + /// + /// Address2 + /// + /// Address2 + [JsonPropertyName("Address2"), JsonPropertyOrder(11)] + public String? Address2 { get; set; } + + /// + /// Set this to true if your shipments will always contain Alcohol + /// + /// Set this to true if your shipments will always contain Alcohol + [JsonPropertyName("AttrAlcohol"), JsonPropertyOrder(12)] + public Boolean? AttrAlcohol { get; set; } + + /// + /// Set this to true if your shipments will always contain Controlled Substances + /// + /// Set this to true if your shipments will always contain Controlled Substances + [JsonPropertyName("AttrControlledSubstance"), JsonPropertyOrder(13)] + public Boolean? AttrControlledSubstance { get; set; } + + /// + /// Set this to true if your shipments will always contain DryIce + /// + /// Set this to true if your shipments will always contain DryIce + [JsonPropertyName("AttrDryIce"), JsonPropertyOrder(14)] + public Boolean? AttrDryIce { get; set; } + + /// + /// Set this to true if your shipments will always contain Explosives + /// + /// Set this to true if your shipments will always contain Explosives + [JsonPropertyName("AttrExplosive"), JsonPropertyOrder(15)] + public Boolean? AttrExplosive { get; set; } + + /// + /// Set this to true if your shipments will always contain Hazmat + /// + /// Set this to true if your shipments will always contain Hazmat + [JsonPropertyName("AttrHazmat"), JsonPropertyOrder(16)] + public Boolean? AttrHazmat { get; set; } + + /// + /// Set this to true if your shipments will always use \"No Return To Sender\" + /// + /// Set this to true if your shipments will always use \"No Return To Sender\" + [JsonPropertyName("AttrNoRTS"), JsonPropertyOrder(17)] + public Boolean? AttrNoRTS { get; set; } + + /// + /// Set this to true if your shipments will always be Perishable + /// + /// Set this to true if your shipments will always be Perishable + [JsonPropertyName("AttrPerishable"), JsonPropertyOrder(18)] + public Boolean? AttrPerishable { get; set; } + + /// + /// Set this to true if your shipments will always require Refrigeration + /// + /// Set this to true if your shipments will always require Refrigeration + [JsonPropertyName("AttrRefrigerated"), JsonPropertyOrder(19)] + public Boolean? AttrRefrigerated { get; set; } + + /// + /// Set this to true if your shipments will always require Two Persons + /// + /// Set this to true if your shipments will always require Two Persons + [JsonPropertyName("AttrTwoPersons"), JsonPropertyOrder(20)] + public Boolean? AttrTwoPersons { get; set; } + + /// + /// Country + /// + /// Country + [JsonPropertyName("country"), JsonPropertyOrder(21)] + public String? Country { get; set; } + + /// + /// Declare piece attributes separately for every shipment, overrides individual attribute below. + /// + /// Declare piece attributes separately for every shipment, overrides individual attribute below. + [JsonPropertyName("declare_piece_attributes_separately_for_every_shipment"), JsonPropertyOrder(22)] + public Boolean? DeclarePieceAttributesSeparatelyForEveryShipment { get; set; } + + /// + /// Email + /// + /// Email + [JsonPropertyName("Email"), JsonPropertyOrder(23)] + public String? Email { get; set; } + + /// + /// Facility Code + /// + /// Facility Code + [JsonPropertyName("facility_code"), JsonPropertyOrder(24)] + public String? FacilityCode { get; set; } + + /// + /// Instructions + /// + /// Instructions + [JsonPropertyName("instructions"), JsonPropertyOrder(25)] + public String? Instructions { get; set; } + + /// + /// Phone + /// + /// Phone + [JsonPropertyName("Phone"), JsonPropertyOrder(26)] + public String? Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectLasershipRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" CustomerBranch: ").Append(CustomerBranch).Append("\n"); + sb.Append(" LasershipCriticalEntryTime: ").Append(LasershipCriticalEntryTime).Append("\n"); + sb.Append(" LasershipCriticalPullTime: ").Append(LasershipCriticalPullTime).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" WebServicesId: ").Append(WebServicesId).Append("\n"); + sb.Append(" WebServicesKey: ").Append(WebServicesKey).Append("\n"); + sb.Append(" Address2: ").Append(Address2).Append("\n"); + sb.Append(" AttrAlcohol: ").Append(AttrAlcohol).Append("\n"); + sb.Append(" AttrControlledSubstance: ").Append(AttrControlledSubstance).Append("\n"); + sb.Append(" AttrDryIce: ").Append(AttrDryIce).Append("\n"); + sb.Append(" AttrExplosive: ").Append(AttrExplosive).Append("\n"); + sb.Append(" AttrHazmat: ").Append(AttrHazmat).Append("\n"); + sb.Append(" AttrNoRTS: ").Append(AttrNoRTS).Append("\n"); + sb.Append(" AttrPerishable: ").Append(AttrPerishable).Append("\n"); + sb.Append(" AttrRefrigerated: ").Append(AttrRefrigerated).Append("\n"); + sb.Append(" AttrTwoPersons: ").Append(AttrTwoPersons).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append(" DeclarePieceAttributesSeparatelyForEveryShipment: ").Append(DeclarePieceAttributesSeparatelyForEveryShipment).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FacilityCode: ").Append(FacilityCode).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectNewgisticsRequestBody.cs b/ShipEngineSDK/Model/ConnectNewgisticsRequestBody.cs new file mode 100644 index 00000000..ae61bae7 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectNewgisticsRequestBody.cs @@ -0,0 +1,85 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Newgistics account information request body +/// +public partial class ConnectNewgisticsRequestBody +{ + + /// + /// Induction site + /// + /// Induction site + [JsonPropertyName("induction_site"), JsonPropertyOrder(1)] + public required string InductionSite { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// Mailer id + /// + /// Mailer id + [JsonPropertyName("mailer_id"), JsonPropertyOrder(3)] + public int? MailerId { get; set; } + + /// + /// Merchant id + /// + /// Merchant id + [JsonPropertyName("merchant_id"), JsonPropertyOrder(4)] + public int? MerchantId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectNewgisticsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" InductionSite: ").Append(InductionSite).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" MailerId: ").Append(MailerId).Append("\n"); + sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectOntracRequestBody.cs b/ShipEngineSDK/Model/ConnectOntracRequestBody.cs new file mode 100644 index 00000000..cc1c1686 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectOntracRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An Ontrac account information request body +/// +public partial class ConnectOntracRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password"), JsonPropertyOrder(3)] + public required string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectOntracRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectPurolatorRequestBody.cs b/ShipEngineSDK/Model/ConnectPurolatorRequestBody.cs new file mode 100644 index 00000000..afdeaf84 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectPurolatorRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Purolator account information request body +/// +public partial class ConnectPurolatorRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// Activation key + /// + /// Activation key + [JsonPropertyName("activation_key"), JsonPropertyOrder(2)] + public required string ActivationKey { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(3)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectPurolatorRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" ActivationKey: ").Append(ActivationKey).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectRoyalMailRequestBody.cs b/ShipEngineSDK/Model/ConnectRoyalMailRequestBody.cs new file mode 100644 index 00000000..8d295c61 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectRoyalMailRequestBody.cs @@ -0,0 +1,155 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Royal Mail account information request body +/// +public partial class ConnectRoyalMailRequestBody +{ + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(1)] + public required string AccountNumber { get; set; } + + /// + /// City + /// + /// City + [JsonPropertyName("city"), JsonPropertyOrder(2)] + public required string City { get; set; } + + /// + /// Contact name + /// + /// Contact name + [JsonPropertyName("contact_name"), JsonPropertyOrder(3)] + public required string ContactName { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(4)] + public required string Nickname { get; set; } + + /// + /// Postal code + /// + /// Postal code + [JsonPropertyName("postal_code"), JsonPropertyOrder(5)] + public required string PostalCode { get; set; } + + /// + /// Company name + /// + /// Company name + [JsonPropertyName("company_name"), JsonPropertyOrder(6)] + public string? CompanyName { get; set; } + + /// + /// The email address + /// + /// The email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(7)] + public string? Email { get; set; } + + /// + /// The oba email address + /// + /// The oba email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("oba_email"), JsonPropertyOrder(8)] + public string? ObaEmail { get; set; } + + /// + /// Phone + /// + /// Phone + [JsonPropertyName("phone"), JsonPropertyOrder(9)] + public string? Phone { get; set; } + + /// + /// Street line1 + /// + /// Street line1 + [JsonPropertyName("street_line1"), JsonPropertyOrder(10)] + public string? StreetLine1 { get; set; } + + /// + /// Street line2 + /// + /// Street line2 + [JsonPropertyName("street_line2"), JsonPropertyOrder(11)] + public string? StreetLine2 { get; set; } + + /// + /// Street line3 + /// + /// Street line3 + [JsonPropertyName("street_line3"), JsonPropertyOrder(12)] + public string? StreetLine3 { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectRoyalMailRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" ContactName: ").Append(ContactName).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" ObaEmail: ").Append(ObaEmail).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" StreetLine1: ").Append(StreetLine1).Append("\n"); + sb.Append(" StreetLine2: ").Append(StreetLine2).Append("\n"); + sb.Append(" StreetLine3: ").Append(StreetLine3).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectRrDonnelleyRequestBody.cs b/ShipEngineSDK/Model/ConnectRrDonnelleyRequestBody.cs new file mode 100644 index 00000000..b1fb142b --- /dev/null +++ b/ShipEngineSDK/Model/ConnectRrDonnelleyRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A RR Donnelley account information request body +/// +public partial class ConnectRrDonnelleyRequestBody +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(1)] + public required string Nickname { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password"), JsonPropertyOrder(2)] + public required string Password { get; set; } + + /// + /// Username + /// + /// Username + [JsonPropertyName("username"), JsonPropertyOrder(3)] + public required string Username { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectRrDonnelleyRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectSekoRequestBody.cs b/ShipEngineSDK/Model/ConnectSekoRequestBody.cs new file mode 100644 index 00000000..801ce3f7 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectSekoRequestBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A SEKO account information request body +/// +public partial class ConnectSekoRequestBody +{ + + /// + /// Seko Account Access Key + /// + /// Seko Account Access Key + [JsonPropertyName("access_key"), JsonPropertyOrder(1)] + public required string AccessKey { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectSekoRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccessKey: ").Append(AccessKey).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectSendleRequestBody.cs b/ShipEngineSDK/Model/ConnectSendleRequestBody.cs new file mode 100644 index 00000000..fc01ec6d --- /dev/null +++ b/ShipEngineSDK/Model/ConnectSendleRequestBody.cs @@ -0,0 +1,80 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Sendle account information request body +/// +public partial class ConnectSendleRequestBody +{ + + /// + /// API key + /// + /// API key + [JsonPropertyName("api_key"), JsonPropertyOrder(1)] + public required string ApiKey { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public required string Nickname { get; set; } + + /// + /// A string that uniquely identifies the sendle + /// + /// A string that uniquely identifies the sendle + /// + /// se-28529731 + /// + [JsonPropertyName("sendle_id"), JsonPropertyOrder(3)] + public required string SendleId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectSendleRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" SendleId: ").Append(SendleId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectStampsRequestBody.cs b/ShipEngineSDK/Model/ConnectStampsRequestBody.cs new file mode 100644 index 00000000..527cce3d --- /dev/null +++ b/ShipEngineSDK/Model/ConnectStampsRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Stamps account information request body +/// +public partial class ConnectStampsRequestBody +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(1)] + public required string Nickname { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password"), JsonPropertyOrder(2)] + public required string Password { get; set; } + + /// + /// Username + /// + /// Username + [JsonPropertyName("username"), JsonPropertyOrder(3)] + public required string Username { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectStampsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ConnectUpsRequestBody.cs b/ShipEngineSDK/Model/ConnectUpsRequestBody.cs new file mode 100644 index 00000000..a7f69380 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectUpsRequestBody.cs @@ -0,0 +1,85 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A UPS account information request body. The location header from this call should be used to redirect to UPS for sign in. +/// +public partial class ConnectUpsRequestBody +{ + + /// + /// Account Country Code + /// + /// Account Country Code + [JsonPropertyName("account_country_code"), JsonPropertyOrder(1)] + public required string AccountCountryCode { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number"), JsonPropertyOrder(2)] + public required string AccountNumber { get; set; } + + /// + /// Account Postal Code + /// + /// Account Postal Code + [JsonPropertyName("account_postal_code"), JsonPropertyOrder(3)] + public required string AccountPostalCode { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(4)] + public required string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConnectUpsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountCountryCode: ").Append(AccountCountryCode).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" AccountPostalCode: ").Append(AccountPostalCode).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ContactDetails.cs b/ShipEngineSDK/Model/ContactDetails.cs new file mode 100644 index 00000000..243cff25 --- /dev/null +++ b/ShipEngineSDK/Model/ContactDetails.cs @@ -0,0 +1,79 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ContactDetails +/// +public partial class ContactDetails +{ + + /// + /// An email address. + /// + /// An email address. + /// + /// john.doe@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(1)] + public required string Email { get; set; } + + /// + /// Gets or Sets Name + /// + [JsonPropertyName("name"), JsonPropertyOrder(2)] + public required string Name { get; set; } + + /// + /// Phone number associated + /// + /// Phone number associated + [JsonPropertyName("phone"), JsonPropertyOrder(3)] + public required string Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ContactDetails {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateAccountSettingsImageRequestBody.cs b/ShipEngineSDK/Model/CreateAccountSettingsImageRequestBody.cs new file mode 100644 index 00000000..540a2ae6 --- /dev/null +++ b/ShipEngineSDK/Model/CreateAccountSettingsImageRequestBody.cs @@ -0,0 +1,196 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A ShipEngine account settings images request body +/// +public partial class CreateAccountSettingsImageRequestBody +{ + /// + /// The image type + /// + /// The image type + [JsonConverter(typeof(ImageContentTypeEnumJsonConverter))] + public class ImageContentTypeEnum + { + private readonly string _value; + + /// + /// Create a new instance of ImageContentTypeEnum with a predefined value. + /// + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + /// + /// Create a new instance of ImageContentTypeEnum with a custom value. + /// + /// The value of the ImageContentTypeEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ImageContentTypeEnum(string value) + { + _value = value; + } + + /// + /// Enum Png for value: image/png + /// + public static ImageContentTypeEnum Png { get; } = new("image/png"); + + + /// + /// Enum Jpeg for value: image/jpeg + /// + public static ImageContentTypeEnum Jpeg { get; } = new("image/jpeg"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class ImageContentTypeEnumJsonConverter : JsonConverter + { + public override ImageContentTypeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ImageContentTypeEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ImageContentTypeEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ImageContentTypeEnum); + } + + + /// + /// The image type + /// + /// The image type + [JsonPropertyName("image_content_type"), JsonPropertyOrder(1)] + public required ImageContentTypeEnum ImageContentType { get; set; } + + /// + /// A base64 encoded string representation of the image. + /// + /// A base64 encoded string representation of the image. + /// + /// iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg== + /// + [JsonPropertyName("image_data"), JsonPropertyOrder(2)] + public required string ImageData { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name"), JsonPropertyOrder(3)] + public required string Name { get; set; } + + /// + /// The date and time that the image was created in ShipEngine. + /// + /// The date and time that the image was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Indicates whether this image is set as default. + /// + /// Indicates whether this image is set as default. + /// + /// false + /// + [JsonPropertyName("is_default"), JsonPropertyOrder(5)] + public bool? IsDefault { get; set; } + + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonInclude] + public string? LabelImageId { get; set; } + + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateAccountSettingsImageRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateAndProcessBatchRequestBody.cs b/ShipEngineSDK/Model/CreateAndProcessBatchRequestBody.cs new file mode 100644 index 00000000..9a6b277e --- /dev/null +++ b/ShipEngineSDK/Model/CreateAndProcessBatchRequestBody.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create and process batch request body +/// +public partial class CreateAndProcessBatchRequestBody +{ + + /// + /// Add custom messages for a particular batch + /// + /// Add custom messages for a particular batch + /// + /// This is my batch + /// + [JsonPropertyName("batch_notes"), JsonPropertyOrder(1)] + public string? BatchNotes { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// se-28529731 + /// + [JsonPropertyName("external_batch_id"), JsonPropertyOrder(2)] + public string? ExternalBatchId { get; set; } + + /// + /// Gets or Sets ProcessLabels + /// + [JsonPropertyName("process_labels"), JsonPropertyOrder(3)] + public CreateAndProcessBatchRequestBodyProcessLabels? ProcessLabels { get; set; } + + /// + /// Array of rate IDs used in the batch + /// + /// Array of rate IDs used in the batch + [JsonPropertyName("rate_ids"), JsonPropertyOrder(4)] + public List? RateIds { get; set; } + + /// + /// Array of shipment IDs used in the batch + /// + /// Array of shipment IDs used in the batch + [JsonPropertyName("shipment_ids"), JsonPropertyOrder(5)] + public List? ShipmentIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateAndProcessBatchRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" ProcessLabels: ").Append(ProcessLabels).Append("\n"); + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateAndProcessBatchRequestBodyProcessLabels.cs b/ShipEngineSDK/Model/CreateAndProcessBatchRequestBodyProcessLabels.cs new file mode 100644 index 00000000..4f0b3c4e --- /dev/null +++ b/ShipEngineSDK/Model/CreateAndProcessBatchRequestBodyProcessLabels.cs @@ -0,0 +1,94 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The information used to process the batch +/// +public partial class CreateAndProcessBatchRequestBodyProcessLabels +{ + + /// + /// When 'true', the batch will be enqueued for processing + /// + /// When 'true', the batch will be enqueued for processing + [JsonPropertyName("create_batch_and_process_labels"), JsonPropertyOrder(1)] + public bool? CreateBatchAndProcessLabels { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(2)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + [JsonPropertyName("label_format"), JsonPropertyOrder(3)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// Gets or Sets LabelLayout + /// + [JsonPropertyName("label_layout"), JsonPropertyOrder(4)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The Ship date the batch is being processed for + /// + /// The Ship date the batch is being processed for + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(5)] + public DateTimeOffset? ShipDate { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateAndProcessBatchRequestBodyProcessLabels {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreateBatchAndProcessLabels: ").Append(CreateBatchAndProcessLabels).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateAndValidateShipment.cs b/ShipEngineSDK/Model/CreateAndValidateShipment.cs new file mode 100644 index 00000000..7b55c964 --- /dev/null +++ b/ShipEngineSDK/Model/CreateAndValidateShipment.cs @@ -0,0 +1,331 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create and validate shipment resource +/// +public partial class CreateAndValidateShipment +{ + + /// + /// The address validation + /// + /// The address validation + [JsonPropertyName("address_validation"), JsonPropertyOrder(1)] + public AddressValidationResult? AddressValidation { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(2)] + public AdvancedShipmentOptions? AdvancedOptions { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(3)] + public string? CarrierId { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(4)] + public string? ComparisonRateType { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(5)] + public DeliveryConfirmation? Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(7)] + public InternationalShipmentOptions? Customs { get; set; } + + /// + /// An array of errors that occurred while creating shipment. + /// + /// An array of errors that occurred while creating shipment. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude, Obsolete] + public List? Errors { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(9)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(10)] + public string? ExternalShipmentId { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(11)] + public InsuranceProvider? InsuranceProvider { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(12)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(13)] + public List? Items { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(15)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(16)] + public List? Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(17)] + public ShippingAddress? ReturnTo { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(18)] + public string? ServiceCode { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(19)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(20)] + public ShippingAddress? ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(21)] + public ShippingAddressTo? ShipTo { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(23)] + public string? ShipmentNumber { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(25)] + public string? ShippingRuleId { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(27)] + public List? TaxIdentifiers { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(29)] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateAndValidateShipment {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressValidation: ").Append(AddressValidation).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateBatchRequest.cs b/ShipEngineSDK/Model/CreateBatchRequest.cs new file mode 100644 index 00000000..5f0bb15e --- /dev/null +++ b/ShipEngineSDK/Model/CreateBatchRequest.cs @@ -0,0 +1,257 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// CreateBatchRequest +/// +[JsonConverter(typeof(CreateBatchRequestJsonConverter))] +//[DataContract(Name = "create_batch_request")] +public partial class CreateBatchRequest : AbstractOpenAPISchema +{ + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of CreateBatchRequestBody. + public CreateBatchRequest(CreateBatchRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of CreateAndProcessBatchRequestBody. + public CreateBatchRequest(CreateAndProcessBatchRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(CreateBatchRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(CreateAndProcessBatchRequestBody)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: CreateBatchRequestBody, CreateAndProcessBatchRequestBody"); + } + } + } + + /// + /// Get the actual instance of `CreateBatchRequestBody`. If the actual instance is not `CreateBatchRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of CreateBatchRequestBody + public CreateBatchRequestBody GetCreateBatchRequestBody() + { + return (CreateBatchRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `CreateAndProcessBatchRequestBody`. If the actual instance is not `CreateAndProcessBatchRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of CreateAndProcessBatchRequestBody + public CreateAndProcessBatchRequestBody GetCreateAndProcessBatchRequestBody() + { + return (CreateAndProcessBatchRequestBody)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateBatchRequest {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, CreateBatchRequest.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for CreateBatchRequest +/// +public class CreateBatchRequestJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(CreateBatchRequestBody), typeof(CreateAndProcessBatchRequestBody)]; + private static readonly HashSet MandatoryFields = []; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, CreateBatchRequest value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override CreateBatchRequest? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + CreateBatchRequest? newCreateBatchRequest = null; + + + int match = 0; + var matchedTypes = new List(); + + try + { + newCreateBatchRequest = new CreateBatchRequest(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("CreateBatchRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into CreateBatchRequestBody: {1}", jsonDoc, exception); + } + + try + { + newCreateBatchRequest = new CreateBatchRequest(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("CreateAndProcessBatchRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into CreateAndProcessBatchRequestBody: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newCreateBatchRequest; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(CreateBatchRequest).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateBatchRequestBody.cs b/ShipEngineSDK/Model/CreateBatchRequestBody.cs new file mode 100644 index 00000000..4a921453 --- /dev/null +++ b/ShipEngineSDK/Model/CreateBatchRequestBody.cs @@ -0,0 +1,91 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create batch request body +/// +public partial class CreateBatchRequestBody +{ + + /// + /// Add custom messages for a particular batch + /// + /// Add custom messages for a particular batch + /// + /// This is my batch + /// + [JsonPropertyName("batch_notes"), JsonPropertyOrder(1)] + public string? BatchNotes { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// se-28529731 + /// + [JsonPropertyName("external_batch_id"), JsonPropertyOrder(2)] + public string? ExternalBatchId { get; set; } + + /// + /// Array of rate IDs used in the batch + /// + /// Array of rate IDs used in the batch + [JsonPropertyName("rate_ids"), JsonPropertyOrder(3)] + public List? RateIds { get; set; } + + /// + /// Array of shipment IDs used in the batch + /// + /// Array of shipment IDs used in the batch + [JsonPropertyName("shipment_ids"), JsonPropertyOrder(4)] + public List? ShipmentIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateBatchRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateBatchResponseBody.cs b/ShipEngineSDK/Model/CreateBatchResponseBody.cs new file mode 100644 index 00000000..63c54f0c --- /dev/null +++ b/ShipEngineSDK/Model/CreateBatchResponseBody.cs @@ -0,0 +1,303 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create batch response body +/// +public partial class CreateBatchResponseBody +{ + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_errors_url"), JsonInclude] + public OptionalLink? BatchErrorsUrl { get; set; } + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url"), JsonPropertyOrder(3)] + public required OptionalLink BatchLabelsUrl { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_number"), JsonInclude] + public string? BatchNumber { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url"), JsonPropertyOrder(5)] + public required OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("completed"), JsonInclude] + public int? Completed { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("count"), JsonInclude] + public int? Count { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("errors"), JsonInclude] + public int? Errors { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public OptionalLink? FormDownload { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("forms"), JsonInclude] + public int? Forms { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_format"), JsonInclude] + public LabelFormat? LabelFormat { get; set; } + + /// + /// label layout + /// + /// label layout + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_layout"), JsonInclude] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("process_errors"), JsonInclude] + public List? ProcessErrors { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public BatchStatus? Status { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("warnings"), JsonInclude] + public int? Warnings { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes"), JsonInclude] + public string? BatchNotes { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("external_batch_id"), JsonInclude] + public string? ExternalBatchId { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at"), JsonInclude] + public DateTimeOffset? ProcessedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateBatchResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateLabelFromRateRequestBody.cs b/ShipEngineSDK/Model/CreateLabelFromRateRequestBody.cs new file mode 100644 index 00000000..c6bf92c4 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromRateRequestBody.cs @@ -0,0 +1,113 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A purchase label without shipment request body +/// +public partial class CreateLabelFromRateRequestBody +{ + + /// + /// Optional - Value will be saved in the shipment's advanced_options > custom_field1 + /// + /// Optional - Value will be saved in the shipment's advanced_options > custom_field1 + [JsonPropertyName("custom_field1"), JsonPropertyOrder(1)] + public string? CustomField1 { get; set; } + + /// + /// Optional - Value will be saved in the shipment's advanced_options > custom_field2 + /// + /// Optional - Value will be saved in the shipment's advanced_options > custom_field2 + [JsonPropertyName("custom_field2"), JsonPropertyOrder(2)] + public string? CustomField2 { get; set; } + + /// + /// Optional - Value will be saved in the shipment's advanced_options > custom_field3 + /// + /// Optional - Value will be saved in the shipment's advanced_options > custom_field3 + [JsonPropertyName("custom_field3"), JsonPropertyOrder(3)] + public string? CustomField3 { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(4)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(5)] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + [JsonPropertyName("label_format"), JsonPropertyOrder(6)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// Gets or Sets LabelLayout + /// + [JsonPropertyName("label_layout"), JsonPropertyOrder(7)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(8)] + public ValidateAddress? ValidateAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLabelFromRateRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CustomField1: ").Append(CustomField1).Append("\n"); + sb.Append(" CustomField2: ").Append(CustomField2).Append("\n"); + sb.Append(" CustomField3: ").Append(CustomField3).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateLabelFromRateResponseBody.cs b/ShipEngineSDK/Model/CreateLabelFromRateResponseBody.cs new file mode 100644 index 00000000..2aacd939 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromRateResponseBody.cs @@ -0,0 +1,484 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create label from rate response body +/// +public partial class CreateLabelFromRateResponseBody +{ + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(5)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(7)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(12)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(14), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(15)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(17)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(18)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(19), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(25)] + public string? RmaNumber { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(28), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(32), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(37), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLabelFromRateResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateLabelFromShipmentRequestBody.cs b/ShipEngineSDK/Model/CreateLabelFromShipmentRequestBody.cs new file mode 100644 index 00000000..31bcc2cb --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromShipmentRequestBody.cs @@ -0,0 +1,89 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A purchase label without shipment request body +/// +public partial class CreateLabelFromShipmentRequestBody +{ + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(1)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(2)] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + [JsonPropertyName("label_format"), JsonPropertyOrder(3)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// Gets or Sets LabelLayout + /// + [JsonPropertyName("label_layout"), JsonPropertyOrder(4)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(5)] + public ValidateAddress? ValidateAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLabelFromShipmentRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateLabelFromShipmentResponseBody.cs b/ShipEngineSDK/Model/CreateLabelFromShipmentResponseBody.cs new file mode 100644 index 00000000..d4f799f8 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromShipmentResponseBody.cs @@ -0,0 +1,484 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create label from shipment response body +/// +public partial class CreateLabelFromShipmentResponseBody +{ + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(5)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(7)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(12)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(14), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(15)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(17)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(18)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(19), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(25)] + public string? RmaNumber { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(28), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(32), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(37), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLabelFromShipmentResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateLabelRequestBody.cs b/ShipEngineSDK/Model/CreateLabelRequestBody.cs new file mode 100644 index 00000000..759dccb0 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelRequestBody.cs @@ -0,0 +1,175 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A purchase label request body +/// +public partial class CreateLabelRequestBody +{ + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(1)] + public required ShipmentRequest Shipment { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(2)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(3)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(4)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(5), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(6)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(7)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(8)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(9), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(10)] + public string? RmaNumber { get; set; } + + /// + /// A unique identifier for a carrier drop off point where a merchant plans to deliver packages. This will take precedence over a shipment's ship from address. + /// + /// A unique identifier for a carrier drop off point where a merchant plans to deliver packages. This will take precedence over a shipment's ship from address. + /// + /// 614940 + /// + [JsonPropertyName("ship_from_service_point_id"), JsonPropertyOrder(11)] + public string? ShipFromServicePointId { get; set; } + + /// + /// A unique identifier for a carrier service point where the shipment will be delivered by the carrier. This will take precedence over a shipment's ship to address. + /// + /// A unique identifier for a carrier service point where the shipment will be delivered by the carrier. This will take precedence over a shipment's ship to address. + /// + /// 614940 + /// + [JsonPropertyName("ship_to_service_point_id"), JsonPropertyOrder(12)] + public string? ShipToServicePointId { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(13), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(14), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLabelRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" ShipFromServicePointId: ").Append(ShipFromServicePointId).Append("\n"); + sb.Append(" ShipToServicePointId: ").Append(ShipToServicePointId).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateLabelResponseBody.cs b/ShipEngineSDK/Model/CreateLabelResponseBody.cs new file mode 100644 index 00000000..b55e0f65 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelResponseBody.cs @@ -0,0 +1,484 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create label response body +/// +public partial class CreateLabelResponseBody +{ + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(4)] + public required LabelChargeEvent ChargeEvent { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(6)] + public required DisplayScheme DisplayScheme { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(9)] + public required bool IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(11)] + public required LabelFormat LabelFormat { get; set; } + + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(13)] + public required LabelLayout LabelLayout { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(28), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(29)] + public required string LabelImageId { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(30), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(34)] + public required string RmaNumber { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(35), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(36), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(38), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateLabelResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateManifestByObjectRequestBody.cs b/ShipEngineSDK/Model/CreateManifestByObjectRequestBody.cs new file mode 100644 index 00000000..417690ad --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestByObjectRequestBody.cs @@ -0,0 +1,102 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create manifest request body +/// +public partial class CreateManifestByObjectRequestBody +{ + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1)] + public required string CarrierId { get; set; } + + /// + /// The ship date that the shipment will be sent out on + /// + /// The ship date that the shipment will be sent out on + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(2)] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(3)] + public required string WarehouseId { get; set; } + + /// + /// The list of label ids to exclude from the manifest + /// + /// The list of label ids to exclude from the manifest + [JsonPropertyName("excluded_label_ids"), JsonPropertyOrder(4)] + public List? ExcludedLabelIds { get; set; } + + /// + /// The list of label ids to include for the manifest + /// + /// The list of label ids to include for the manifest + [JsonPropertyName("label_ids"), JsonPropertyOrder(5)] + public List? LabelIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateManifestByObjectRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ExcludedLabelIds: ").Append(ExcludedLabelIds).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateManifestLabelIdsRequestBody.cs b/ShipEngineSDK/Model/CreateManifestLabelIdsRequestBody.cs new file mode 100644 index 00000000..3b73a9b5 --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestLabelIdsRequestBody.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create manifest request body +/// +public partial class CreateManifestLabelIdsRequestBody +{ + + /// + /// The list of label ids to include in the manifest + /// + /// The list of label ids to include in the manifest + [JsonPropertyName("label_ids"), JsonPropertyOrder(1)] + public required List LabelIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateManifestLabelIdsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateManifestRequestBody.cs b/ShipEngineSDK/Model/CreateManifestRequestBody.cs new file mode 100644 index 00000000..4e3931b9 --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestRequestBody.cs @@ -0,0 +1,257 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// CreateManifestRequestBody +/// +[JsonConverter(typeof(CreateManifestRequestBodyJsonConverter))] +//[DataContract(Name = "create_manifest_request_body")] +public partial class CreateManifestRequestBody : AbstractOpenAPISchema +{ + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of CreateManifestByObjectRequestBody. + public CreateManifestRequestBody(CreateManifestByObjectRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of CreateManifestLabelIdsRequestBody. + public CreateManifestRequestBody(CreateManifestLabelIdsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(CreateManifestByObjectRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(CreateManifestLabelIdsRequestBody)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: CreateManifestByObjectRequestBody, CreateManifestLabelIdsRequestBody"); + } + } + } + + /// + /// Get the actual instance of `CreateManifestByObjectRequestBody`. If the actual instance is not `CreateManifestByObjectRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of CreateManifestByObjectRequestBody + public CreateManifestByObjectRequestBody GetCreateManifestByObjectRequestBody() + { + return (CreateManifestByObjectRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `CreateManifestLabelIdsRequestBody`. If the actual instance is not `CreateManifestLabelIdsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of CreateManifestLabelIdsRequestBody + public CreateManifestLabelIdsRequestBody GetCreateManifestLabelIdsRequestBody() + { + return (CreateManifestLabelIdsRequestBody)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateManifestRequestBody {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, CreateManifestRequestBody.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for CreateManifestRequestBody +/// +public class CreateManifestRequestBodyJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(CreateManifestByObjectRequestBody), typeof(CreateManifestLabelIdsRequestBody)]; + private static readonly HashSet MandatoryFields = ["CarrierId", "LabelIds", "ShipDate", "WarehouseId"]; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, CreateManifestRequestBody value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override CreateManifestRequestBody? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + CreateManifestRequestBody? newCreateManifestRequestBody = null; + + + int match = 0; + var matchedTypes = new List(); + + try + { + newCreateManifestRequestBody = new CreateManifestRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("CreateManifestByObjectRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into CreateManifestByObjectRequestBody: {1}", jsonDoc, exception); + } + + try + { + newCreateManifestRequestBody = new CreateManifestRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("CreateManifestLabelIdsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into CreateManifestLabelIdsRequestBody: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newCreateManifestRequestBody; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(CreateManifestRequestBody).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateManifestResponseBody.cs b/ShipEngineSDK/Model/CreateManifestResponseBody.cs new file mode 100644 index 00000000..8ce26a57 --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestResponseBody.cs @@ -0,0 +1,200 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create manifest response body +/// +public partial class CreateManifestResponseBody +{ + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1), Obsolete] + public required string CarrierId { get; set; } + + /// + /// The date-time that the manifest was created + /// + /// The date-time that the manifest was created + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("created_at"), JsonPropertyOrder(2), Obsolete] + public required DateTimeOffset CreatedAt { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// se-28529731 + /// + [JsonPropertyName("form_id"), JsonPropertyOrder(4), Obsolete] + public required string FormId { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + [JsonPropertyName("manifest_download"), JsonPropertyOrder(5), Obsolete] + public required ManifestDownload ManifestDownload { get; set; } + + /// + /// A string that uniquely identifies the manifest + /// + /// A string that uniquely identifies the manifest + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id"), JsonPropertyOrder(6), Obsolete] + public required string ManifestId { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(7)] + public required Guid RequestId { get; set; } + + /// + /// The date-time that the manifests shipments will be picked up + /// + /// The date-time that the manifests shipments will be picked up + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(8), Obsolete] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 100 + /// + [JsonPropertyName("shipments"), JsonInclude, Obsolete] + public int? Shipments { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id"), JsonPropertyOrder(10), Obsolete] + public required string SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(11), Obsolete] + public required string WarehouseId { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_ids"), JsonInclude, Obsolete] + public List? LabelIds { get; set; } + + /// + /// Resulting manifest requests with statuses + /// + /// Resulting manifest requests with statuses + [JsonPropertyName("manifest_requests"), JsonPropertyOrder(13)] + public List? ManifestRequests { get; set; } + + /// + /// Resulting Manifests + /// + /// Resulting Manifests + [JsonPropertyName("manifests"), JsonPropertyOrder(14)] + public List? Manifests { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateManifestResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" ManifestRequests: ").Append(ManifestRequests).Append("\n"); + sb.Append(" Manifests: ").Append(Manifests).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreatePackageTypeRequestBody.cs b/ShipEngineSDK/Model/CreatePackageTypeRequestBody.cs new file mode 100644 index 00000000..83e7dc67 --- /dev/null +++ b/ShipEngineSDK/Model/CreatePackageTypeRequestBody.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create package type request body +/// +public partial class CreatePackageTypeRequestBody +{ + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(2)] + public required string PackageCode { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description"), JsonPropertyOrder(3)] + public string? Description { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions"), JsonPropertyOrder(4)] + public Dimensions? Dimensions { get; set; } + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id"), JsonPropertyOrder(5)] + public string? PackageId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePackageTypeRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreatePackageTypeResponseBody.cs b/ShipEngineSDK/Model/CreatePackageTypeResponseBody.cs new file mode 100644 index 00000000..de3d75fe --- /dev/null +++ b/ShipEngineSDK/Model/CreatePackageTypeResponseBody.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create package type response body +/// +public partial class CreatePackageTypeResponseBody +{ + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(2)] + public required string PackageCode { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description"), JsonPropertyOrder(3)] + public string? Description { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions"), JsonPropertyOrder(4)] + public Dimensions? Dimensions { get; set; } + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id"), JsonPropertyOrder(5)] + public string? PackageId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePackageTypeResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateReturnLabelRequestBody.cs b/ShipEngineSDK/Model/CreateReturnLabelRequestBody.cs new file mode 100644 index 00000000..76c78891 --- /dev/null +++ b/ShipEngineSDK/Model/CreateReturnLabelRequestBody.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create return label request body +/// +public partial class CreateReturnLabelRequestBody +{ + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(1)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(2)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(3), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(4)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(5)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(6)] + public LabelLayout? LabelLayout { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateReturnLabelRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateReturnLabelResponseBody.cs b/ShipEngineSDK/Model/CreateReturnLabelResponseBody.cs new file mode 100644 index 00000000..c9691217 --- /dev/null +++ b/ShipEngineSDK/Model/CreateReturnLabelResponseBody.cs @@ -0,0 +1,484 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create return label response body +/// +public partial class CreateReturnLabelResponseBody +{ + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(5)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(7)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(12)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(14), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(15)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(17)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(18)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(19), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(25)] + public string? RmaNumber { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(28), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(32), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(37), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateReturnLabelResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateShipmentResponseBodyFields.cs b/ShipEngineSDK/Model/CreateShipmentResponseBodyFields.cs new file mode 100644 index 00000000..293f00e8 --- /dev/null +++ b/ShipEngineSDK/Model/CreateShipmentResponseBodyFields.cs @@ -0,0 +1,72 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// CreateShipmentResponseBodyFields +/// +public partial class CreateShipmentResponseBodyFields +{ + + /// + /// The address validation + /// + /// The address validation + [JsonPropertyName("address_validation"), JsonPropertyOrder(1)] + public AddressValidationResult? AddressValidation { get; set; } + + /// + /// An array of errors that occurred while creating shipment. + /// + /// An array of errors that occurred while creating shipment. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude, Obsolete] + public List? Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateShipmentResponseBodyFields {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressValidation: ").Append(AddressValidation).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateShipmentsRequestBody.cs b/ShipEngineSDK/Model/CreateShipmentsRequestBody.cs new file mode 100644 index 00000000..00028939 --- /dev/null +++ b/ShipEngineSDK/Model/CreateShipmentsRequestBody.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create shipments request body +/// +public partial class CreateShipmentsRequestBody +{ + + /// + /// An array of shipments to be created. + /// + /// An array of shipments to be created. + [JsonPropertyName("shipments"), JsonPropertyOrder(1)] + public required List Shipments { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateShipmentsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateShipmentsResponseBody.cs b/ShipEngineSDK/Model/CreateShipmentsResponseBody.cs new file mode 100644 index 00000000..9fc26adf --- /dev/null +++ b/ShipEngineSDK/Model/CreateShipmentsResponseBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create shipments response body +/// +public partial class CreateShipmentsResponseBody +{ + + /// + /// An array of shipments that were created. + /// + /// An array of shipments that were created. + [JsonPropertyName("shipments"), JsonPropertyOrder(1)] + public required List Shipments { get; set; } + + /// + /// Indicates if errors occured while creating the shipments + /// + /// Indicates if errors occured while creating the shipments + [JsonPropertyName("has_errors"), JsonPropertyOrder(2)] + public required bool HasErrors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateShipmentsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" HasErrors: ").Append(HasErrors).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateTagResponseBody.cs b/ShipEngineSDK/Model/CreateTagResponseBody.cs new file mode 100644 index 00000000..be7e513b --- /dev/null +++ b/ShipEngineSDK/Model/CreateTagResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Response body for creating tags +/// +public partial class CreateTagResponseBody +{ + + /// + /// The tag name. + /// + /// The tag name. + /// + /// Fragile + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateTagResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateWarehouseRequestBody.cs b/ShipEngineSDK/Model/CreateWarehouseRequestBody.cs new file mode 100644 index 00000000..6b07d8e6 --- /dev/null +++ b/ShipEngineSDK/Model/CreateWarehouseRequestBody.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create warehouse request body +/// +public partial class CreateWarehouseRequestBody +{ + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address"), JsonPropertyOrder(2)] + public required Address OriginAddress { get; set; } + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Designates which single warehouse is the default on the account + /// + /// Designates which single warehouse is the default on the account + [JsonPropertyName("is_default"), JsonPropertyOrder(4)] + public bool? IsDefault { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address"), JsonPropertyOrder(5)] + public Address? ReturnAddress { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateWarehouseRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateWarehouseResponseBody.cs b/ShipEngineSDK/Model/CreateWarehouseResponseBody.cs new file mode 100644 index 00000000..c32dc376 --- /dev/null +++ b/ShipEngineSDK/Model/CreateWarehouseResponseBody.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create warehouse response body +/// +public partial class CreateWarehouseResponseBody +{ + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name"), JsonPropertyOrder(2)] + public required string Name { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address"), JsonPropertyOrder(3)] + public required Address OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address"), JsonPropertyOrder(4)] + public required Address ReturnAddress { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + /// + /// Designates which single warehouse is the default on the account + /// + /// Designates which single warehouse is the default on the account + [JsonPropertyName("is_default"), JsonPropertyOrder(6)] + public bool? IsDefault { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateWarehouseResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateWebhookRequestBody.cs b/ShipEngineSDK/Model/CreateWebhookRequestBody.cs new file mode 100644 index 00000000..e3ecbce4 --- /dev/null +++ b/ShipEngineSDK/Model/CreateWebhookRequestBody.cs @@ -0,0 +1,79 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A create webhook request body +/// +public partial class CreateWebhookRequestBody +{ + + /// + /// Gets or Sets Event + /// + [JsonPropertyName("event"), JsonPropertyOrder(1)] + public required WebhookEvent Event { get; set; } + + /// + /// The url that the webhook sends the request to + /// + /// The url that the webhook sends the request to + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("url"), JsonPropertyOrder(2)] + public required string Url { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers"), JsonPropertyOrder(3)] + public List? Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateWebhookRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CreateWebhookResponseBody.cs b/ShipEngineSDK/Model/CreateWebhookResponseBody.cs new file mode 100644 index 00000000..61e4343b --- /dev/null +++ b/ShipEngineSDK/Model/CreateWebhookResponseBody.cs @@ -0,0 +1,93 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A webhook response body +/// +public partial class CreateWebhookResponseBody +{ + + /// + /// Gets or Sets Event + /// + [JsonPropertyName("event"), JsonPropertyOrder(1)] + public required WebhookEvent Event { get; set; } + + /// + /// The url that the webhook sends the request to + /// + /// The url that the webhook sends the request to + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("url"), JsonPropertyOrder(2)] + public required string Url { get; set; } + + /// + /// A string that uniquely identifies the webhook + /// + /// A string that uniquely identifies the webhook + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("webhook_id"), JsonInclude] + public string? WebhookId { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers"), JsonPropertyOrder(4)] + public List? Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateWebhookResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/CustomsItem.cs b/ShipEngineSDK/Model/CustomsItem.cs new file mode 100644 index 00000000..d14bad8c --- /dev/null +++ b/ShipEngineSDK/Model/CustomsItem.cs @@ -0,0 +1,152 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The customs declaration for a single item in the shipment. +/// +public partial class CustomsItem +{ + + /// + /// A string that uniquely identifies the customs item + /// + /// A string that uniquely identifies the customs item + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("customs_item_id"), JsonInclude] + public string? CustomsItemId { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated + /// + /// CA + /// + [JsonPropertyName("country_of_origin"), JsonPropertyOrder(2)] + public string? CountryOfOrigin { get; set; } + + /// + /// A description of the item + /// + /// A description of the item + [JsonPropertyName("description"), JsonPropertyOrder(3)] + public string? Description { get; set; } + + /// + /// The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item. + /// + /// The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item. + /// + /// 3926.1 + /// + [JsonPropertyName("harmonized_tariff_code"), JsonPropertyOrder(4)] + public string? HarmonizedTariffCode { get; set; } + + /// + /// The quantity of this item in the shipment. + /// + /// The quantity of this item in the shipment. + [JsonPropertyName("quantity"), JsonPropertyOrder(5)] + public int? Quantity { get; set; } + + /// + /// The SKU (Stock Keeping Unit) of the customs item + /// + /// The SKU (Stock Keeping Unit) of the customs item + [JsonPropertyName("sku"), JsonPropertyOrder(6)] + public string? Sku { get; set; } + + /// + /// Description of the Custom Item's SKU + /// + /// Description of the Custom Item's SKU + [JsonPropertyName("sku_description"), JsonPropertyOrder(7)] + public string? SkuDescription { get; set; } + + /// + /// Gets or Sets UnitOfMeasure + /// + [JsonPropertyName("unit_of_measure"), JsonPropertyOrder(8)] + public string? UnitOfMeasure { get; set; } + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("value"), JsonPropertyOrder(9)] + public decimal? Value { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("value_currency"), JsonPropertyOrder(10)] + public string? ValueCurrency { get; set; } + + /// + /// The item weight + /// + /// The item weight + [JsonPropertyName("weight"), JsonPropertyOrder(11)] + public Weight? Weight { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CustomsItem {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CustomsItemId: ").Append(CustomsItemId).Append("\n"); + sb.Append(" CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" HarmonizedTariffCode: ").Append(HarmonizedTariffCode).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" Sku: ").Append(Sku).Append("\n"); + sb.Append(" SkuDescription: ").Append(SkuDescription).Append("\n"); + sb.Append(" UnitOfMeasure: ").Append(UnitOfMeasure).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" ValueCurrency: ").Append(ValueCurrency).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DangerousAmount.cs b/ShipEngineSDK/Model/DangerousAmount.cs new file mode 100644 index 00000000..b2588684 --- /dev/null +++ b/ShipEngineSDK/Model/DangerousAmount.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// This model represents the amount of the dangerous goods.. +/// +public partial class DangerousAmount +{ + + /// + /// The amount of dangerous goods. + /// + /// The amount of dangerous goods. + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public decimal? Amount { get; set; } + + /// + /// The unit of dangerous goods. + /// + /// The unit of dangerous goods. + [JsonPropertyName("unit"), JsonPropertyOrder(2)] + public string? Unit { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DangerousAmount {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Unit: ").Append(Unit).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DangerousGoods.cs b/ShipEngineSDK/Model/DangerousGoods.cs new file mode 100644 index 00000000..2e8e050f --- /dev/null +++ b/ShipEngineSDK/Model/DangerousGoods.cs @@ -0,0 +1,207 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Dangerous goods attribute associated with the product +/// +public partial class DangerousGoods +{ + + /// + /// Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier + /// + /// Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier + [JsonPropertyName("additional_description"), JsonPropertyOrder(1)] + public string? AdditionalDescription { get; set; } + + /// + /// This model represents the amount of the dangerous goods. + /// + /// This model represents the amount of the dangerous goods. + [JsonPropertyName("dangerous_amount"), JsonPropertyOrder(2)] + public DangerousAmount? DangerousAmount { get; set; } + + /// + /// UN number to identify the dangerous goods. + /// + /// UN number to identify the dangerous goods. + [JsonPropertyName("id_number"), JsonPropertyOrder(3)] + public string? IdNumber { get; set; } + + /// + /// Gets or Sets PackagingGroup + /// + [JsonPropertyName("packaging_group"), JsonPropertyOrder(4)] + public PackagingGroup? PackagingGroup { get; set; } + + /// + /// The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container. + /// + /// The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container. + [JsonPropertyName("packaging_instruction"), JsonPropertyOrder(5)] + public string? PackagingInstruction { get; set; } + + /// + /// Gets or Sets PackagingInstructionSection + /// + [JsonPropertyName("packaging_instruction_section"), JsonPropertyOrder(6)] + public PackagingInstructionSection? PackagingInstructionSection { get; set; } + + /// + /// The type of exterior packaging used to contain the dangerous good. + /// + /// The type of exterior packaging used to contain the dangerous good. + [JsonPropertyName("packaging_type"), JsonPropertyOrder(7)] + public string? PackagingType { get; set; } + + /// + /// Dangerous goods product class based on regulation. + /// + /// Dangerous goods product class based on regulation. + [JsonPropertyName("product_class"), JsonPropertyOrder(8)] + public string? ProductClass { get; set; } + + /// + /// A secondary of product class for substances presenting more than one particular hazard + /// + /// A secondary of product class for substances presenting more than one particular hazard + [JsonPropertyName("product_class_subsidiary"), JsonPropertyOrder(9)] + public string? ProductClassSubsidiary { get; set; } + + /// + /// Quantity of dangerous goods. + /// + /// Quantity of dangerous goods. + [JsonPropertyName("quantity"), JsonPropertyOrder(10)] + public int? Quantity { get; set; } + + /// + /// Indication if the substance is radioactive. + /// + /// Indication if the substance is radioactive. + /// + /// false + /// + [JsonPropertyName("radioactive"), JsonPropertyOrder(11)] + public bool? Radioactive { get; set; } + + /// + /// Name of the regulatory authority. + /// + /// Name of the regulatory authority. + [JsonPropertyName("regulation_authority"), JsonPropertyOrder(12)] + public string? RegulationAuthority { get; set; } + + /// + /// Gets or Sets RegulationLevel + /// + [JsonPropertyName("regulation_level"), JsonPropertyOrder(13)] + public RegulationLevel? RegulationLevel { get; set; } + + /// + /// Indication if the substance needs to be reported to regulatory authority based on the quantity. + /// + /// Indication if the substance needs to be reported to regulatory authority based on the quantity. + /// + /// false + /// + [JsonPropertyName("reportable_quantity"), JsonPropertyOrder(14)] + public bool? ReportableQuantity { get; set; } + + /// + /// Trade description of the dangerous goods. + /// + /// Trade description of the dangerous goods. + [JsonPropertyName("shipping_name"), JsonPropertyOrder(15)] + public string? ShippingName { get; set; } + + /// + /// Recognized Technical or chemical name of dangerous goods. + /// + /// Recognized Technical or chemical name of dangerous goods. + [JsonPropertyName("technical_name"), JsonPropertyOrder(16)] + public string? TechnicalName { get; set; } + + /// + /// Transport category assign to dangerous goods for the transport purpose. + /// + /// Transport category assign to dangerous goods for the transport purpose. + [JsonPropertyName("transport_category"), JsonPropertyOrder(17)] + public string? TransportCategory { get; set; } + + /// + /// Gets or Sets TransportMean + /// + [JsonPropertyName("transport_mean"), JsonPropertyOrder(18)] + public TransportMean? TransportMean { get; set; } + + /// + /// Defines which types of tunnels the shipment is allowed to go through + /// + /// Defines which types of tunnels the shipment is allowed to go through + [JsonPropertyName("tunnel_code"), JsonPropertyOrder(19)] + public string? TunnelCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DangerousGoods {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AdditionalDescription: ").Append(AdditionalDescription).Append("\n"); + sb.Append(" DangerousAmount: ").Append(DangerousAmount).Append("\n"); + sb.Append(" IdNumber: ").Append(IdNumber).Append("\n"); + sb.Append(" PackagingGroup: ").Append(PackagingGroup).Append("\n"); + sb.Append(" PackagingInstruction: ").Append(PackagingInstruction).Append("\n"); + sb.Append(" PackagingInstructionSection: ").Append(PackagingInstructionSection).Append("\n"); + sb.Append(" PackagingType: ").Append(PackagingType).Append("\n"); + sb.Append(" ProductClass: ").Append(ProductClass).Append("\n"); + sb.Append(" ProductClassSubsidiary: ").Append(ProductClassSubsidiary).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" Radioactive: ").Append(Radioactive).Append("\n"); + sb.Append(" RegulationAuthority: ").Append(RegulationAuthority).Append("\n"); + sb.Append(" RegulationLevel: ").Append(RegulationLevel).Append("\n"); + sb.Append(" ReportableQuantity: ").Append(ReportableQuantity).Append("\n"); + sb.Append(" ShippingName: ").Append(ShippingName).Append("\n"); + sb.Append(" TechnicalName: ").Append(TechnicalName).Append("\n"); + sb.Append(" TransportCategory: ").Append(TransportCategory).Append("\n"); + sb.Append(" TransportMean: ").Append(TransportMean).Append("\n"); + sb.Append(" TunnelCode: ").Append(TunnelCode).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DefaultLabelLayout.cs b/ShipEngineSDK/Model/DefaultLabelLayout.cs new file mode 100644 index 00000000..17bc92fb --- /dev/null +++ b/ShipEngineSDK/Model/DefaultLabelLayout.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible default label layout values +/// +/// The possible default label layout values +[JsonConverter(typeof(DefaultLabelLayoutJsonConverter))] +public class DefaultLabelLayout +{ + private readonly string _value; + + /// + /// Create a new instance of DefaultLabelLayout with a predefined value. + /// + internal DefaultLabelLayout() + { + _value = "4x6"; + } + + /// + /// Create a new instance of DefaultLabelLayout with a custom value. + /// + /// The value of the DefaultLabelLayout + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public DefaultLabelLayout(string value) + { + _value = value; + } + + /// + /// Enum _4x6 for value: 4x6 + /// + public static DefaultLabelLayout _4x6 { get; } = new("4x6"); + + + /// + /// Enum Letter for value: Letter + /// + public static DefaultLabelLayout Letter { get; } = new("Letter"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is DefaultLabelLayout other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class DefaultLabelLayoutJsonConverter : JsonConverter +{ + public override DefaultLabelLayout? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new DefaultLabelLayout(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, DefaultLabelLayout value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(DefaultLabelLayout); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DeletePickupByIdResponseBody.cs b/ShipEngineSDK/Model/DeletePickupByIdResponseBody.cs new file mode 100644 index 00000000..1f28f444 --- /dev/null +++ b/ShipEngineSDK/Model/DeletePickupByIdResponseBody.cs @@ -0,0 +1,86 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// DeletePickupByIdResponseBody +/// +public partial class DeletePickupByIdResponseBody +{ + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id"), JsonPropertyOrder(2)] + public required string PickupId { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(3)] + public required Guid RequestId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeletePickupByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DeleteScheduledPickupResponseBody.cs b/ShipEngineSDK/Model/DeleteScheduledPickupResponseBody.cs new file mode 100644 index 00000000..c4c84bec --- /dev/null +++ b/ShipEngineSDK/Model/DeleteScheduledPickupResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A delete scheduled pickup response body +/// +public partial class DeleteScheduledPickupResponseBody +{ + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id"), JsonPropertyOrder(1)] + public required string PickupId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteScheduledPickupResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DeliveryConfirmation.cs b/ShipEngineSDK/Model/DeliveryConfirmation.cs new file mode 100644 index 00000000..6bb36134 --- /dev/null +++ b/ShipEngineSDK/Model/DeliveryConfirmation.cs @@ -0,0 +1,122 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible delivery confirmation values +/// +/// The possible delivery confirmation values +[JsonConverter(typeof(DeliveryConfirmationJsonConverter))] +public class DeliveryConfirmation +{ + private readonly string _value; + + /// + /// Create a new instance of DeliveryConfirmation with a predefined value. + /// + internal DeliveryConfirmation() + { + _value = "none"; + } + + /// + /// Create a new instance of DeliveryConfirmation with a custom value. + /// + /// The value of the DeliveryConfirmation + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public DeliveryConfirmation(string value) + { + _value = value; + } + + /// + /// Enum None for value: none + /// + public static DeliveryConfirmation None { get; } = new("none"); + + + /// + /// Enum Delivery for value: delivery + /// + public static DeliveryConfirmation Delivery { get; } = new("delivery"); + + + /// + /// Enum Signature for value: signature + /// + public static DeliveryConfirmation Signature { get; } = new("signature"); + + + /// + /// Enum AdultSignature for value: adult_signature + /// + public static DeliveryConfirmation AdultSignature { get; } = new("adult_signature"); + + + /// + /// Enum DirectSignature for value: direct_signature + /// + public static DeliveryConfirmation DirectSignature { get; } = new("direct_signature"); + + + /// + /// Enum DeliveryMailed for value: delivery_mailed + /// + public static DeliveryConfirmation DeliveryMailed { get; } = new("delivery_mailed"); + + + /// + /// Enum VerbalConfirmation for value: verbal_confirmation + /// + public static DeliveryConfirmation VerbalConfirmation { get; } = new("verbal_confirmation"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is DeliveryConfirmation other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class DeliveryConfirmationJsonConverter : JsonConverter +{ + public override DeliveryConfirmation? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new DeliveryConfirmation(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, DeliveryConfirmation value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(DeliveryConfirmation); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DeprecatedManifest.cs b/ShipEngineSDK/Model/DeprecatedManifest.cs new file mode 100644 index 00000000..0550eba1 --- /dev/null +++ b/ShipEngineSDK/Model/DeprecatedManifest.cs @@ -0,0 +1,162 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Deprecated manifest resource +/// +public partial class DeprecatedManifest +{ + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1), Obsolete] + public string? CarrierId { get; set; } + + /// + /// The date-time that the manifest was created + /// + /// The date-time that the manifest was created + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("created_at"), JsonPropertyOrder(2), Obsolete] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// se-28529731 + /// + [JsonPropertyName("form_id"), JsonPropertyOrder(3), Obsolete] + public string? FormId { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_ids"), JsonInclude, Obsolete] + public List? LabelIds { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + [JsonPropertyName("manifest_download"), JsonPropertyOrder(5), Obsolete] + public ManifestDownload? ManifestDownload { get; set; } + + /// + /// A string that uniquely identifies the manifest + /// + /// A string that uniquely identifies the manifest + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id"), JsonPropertyOrder(6), Obsolete] + public string? ManifestId { get; set; } + + /// + /// The date-time that the manifests shipments will be picked up + /// + /// The date-time that the manifests shipments will be picked up + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(7), Obsolete] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 100 + /// + [JsonPropertyName("shipments"), JsonInclude, Obsolete] + public int? Shipments { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id"), JsonPropertyOrder(9), Obsolete] + public string? SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(10), Obsolete] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeprecatedManifest {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DhlExpressAccountSettings.cs b/ShipEngineSDK/Model/DhlExpressAccountSettings.cs new file mode 100644 index 00000000..66b04947 --- /dev/null +++ b/ShipEngineSDK/Model/DhlExpressAccountSettings.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DHL Express account settings +/// +public partial class DhlExpressAccountSettings +{ + + /// + /// Indicates if this is primary account + /// + /// Indicates if this is primary account + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(1)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public string? Nickname { get; set; } + + /// + /// Indicates if the account number should be hidden on the archive documentation + /// + /// Indicates if the account number should be hidden on the archive documentation + [JsonPropertyName("should_hide_account_number_on_archive_doc"), JsonPropertyOrder(3)] + public bool? ShouldHideAccountNumberOnArchiveDoc { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DhlExpressAccountSettings {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ShouldHideAccountNumberOnArchiveDoc: ").Append(ShouldHideAccountNumberOnArchiveDoc).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DhlExpressSettingsResponseBody.cs b/ShipEngineSDK/Model/DhlExpressSettingsResponseBody.cs new file mode 100644 index 00000000..b6cc170b --- /dev/null +++ b/ShipEngineSDK/Model/DhlExpressSettingsResponseBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A DHL Express response body +/// +public partial class DhlExpressSettingsResponseBody +{ + + /// + /// Indicates if this is primary account + /// + /// Indicates if this is primary account + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(1)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public string? Nickname { get; set; } + + /// + /// Indicates if the account number should be hidden on the archive documentation + /// + /// Indicates if the account number should be hidden on the archive documentation + [JsonPropertyName("should_hide_account_number_on_archive_doc"), JsonPropertyOrder(3)] + public bool? ShouldHideAccountNumberOnArchiveDoc { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DhlExpressSettingsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ShouldHideAccountNumberOnArchiveDoc: ").Append(ShouldHideAccountNumberOnArchiveDoc).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DimensionUnit.cs b/ShipEngineSDK/Model/DimensionUnit.cs new file mode 100644 index 00000000..33b5a1e6 --- /dev/null +++ b/ShipEngineSDK/Model/DimensionUnit.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The dimension units that are supported by ShipEngine. +/// +/// The dimension units that are supported by ShipEngine. +[JsonConverter(typeof(DimensionUnitJsonConverter))] +public class DimensionUnit +{ + private readonly string _value; + + /// + /// Create a new instance of DimensionUnit with a predefined value. + /// + internal DimensionUnit() + { + _value = "inch"; + } + + /// + /// Create a new instance of DimensionUnit with a custom value. + /// + /// The value of the DimensionUnit + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public DimensionUnit(string value) + { + _value = value; + } + + /// + /// Enum Inch for value: inch + /// + public static DimensionUnit Inch { get; } = new("inch"); + + + /// + /// Enum Centimeter for value: centimeter + /// + public static DimensionUnit Centimeter { get; } = new("centimeter"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is DimensionUnit other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class DimensionUnitJsonConverter : JsonConverter +{ + public override DimensionUnit? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new DimensionUnit(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, DimensionUnit value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(DimensionUnit); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Dimensions.cs b/ShipEngineSDK/Model/Dimensions.cs new file mode 100644 index 00000000..f73fc232 --- /dev/null +++ b/ShipEngineSDK/Model/Dimensions.cs @@ -0,0 +1,84 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The dimensions of a package +/// +public partial class Dimensions +{ + + /// + /// Gets or Sets Unit + /// + [JsonPropertyName("unit"), JsonPropertyOrder(1)] + public required DimensionUnit Unit { get; set; } + + /// + /// The height of the package, in the specified unit + /// + /// The height of the package, in the specified unit + [JsonPropertyName("height"), JsonPropertyOrder(2)] + public required decimal Height { get; set; } + + /// + /// The length of the package, in the specified unit + /// + /// The length of the package, in the specified unit + [JsonPropertyName("length"), JsonPropertyOrder(3)] + public required decimal Length { get; set; } + + /// + /// The width of the package, in the specified unit + /// + /// The width of the package, in the specified unit + [JsonPropertyName("width"), JsonPropertyOrder(4)] + public required decimal Width { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Dimensions {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Unit: ").Append(Unit).Append("\n"); + sb.Append(" Height: ").Append(Height).Append("\n"); + sb.Append(" Length: ").Append(Length).Append("\n"); + sb.Append(" Width: ").Append(Width).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/DisplayScheme.cs b/ShipEngineSDK/Model/DisplayScheme.cs new file mode 100644 index 00000000..605cbf5b --- /dev/null +++ b/ShipEngineSDK/Model/DisplayScheme.cs @@ -0,0 +1,110 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The display format that the label should be shown in. +/// +/// The display format that the label should be shown in. +[JsonConverter(typeof(DisplaySchemeJsonConverter))] +public class DisplayScheme +{ + private readonly string _value; + + /// + /// Create a new instance of DisplayScheme with a predefined value. + /// + internal DisplayScheme() + { + _value = "label"; + } + + /// + /// Create a new instance of DisplayScheme with a custom value. + /// + /// The value of the DisplayScheme + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public DisplayScheme(string value) + { + _value = value; + } + + /// + /// Enum Label for value: label + /// + public static DisplayScheme Label { get; } = new("label"); + + + /// + /// Enum QrCode for value: qr_code + /// + public static DisplayScheme QrCode { get; } = new("qr_code"); + + + /// + /// Enum LabelAndQrCode for value: label_and_qr_code + /// + public static DisplayScheme LabelAndQrCode { get; } = new("label_and_qr_code"); + + + /// + /// Enum Paperless for value: paperless + /// + public static DisplayScheme Paperless { get; } = new("paperless"); + + + /// + /// Enum LabelAndPaperless for value: label_and_paperless + /// + public static DisplayScheme LabelAndPaperless { get; } = new("label_and_paperless"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is DisplayScheme other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class DisplaySchemeJsonConverter : JsonConverter +{ + public override DisplayScheme? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new DisplayScheme(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, DisplayScheme value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(DisplayScheme); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Error.cs b/ShipEngineSDK/Model/Error.cs new file mode 100644 index 00000000..c513a4e0 --- /dev/null +++ b/ShipEngineSDK/Model/Error.cs @@ -0,0 +1,130 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The error structure that gets returned with almost all failed API calls +/// +public partial class Error +{ + + /// + /// Gets or Sets ErrorCode + /// + [JsonPropertyName("error_code"), JsonPropertyOrder(1)] + public required ErrorCode ErrorCode { get; set; } + + /// + /// Gets or Sets ErrorSource + /// + [JsonPropertyName("error_source"), JsonPropertyOrder(2)] + public required ErrorSource ErrorSource { get; set; } + + /// + /// Gets or Sets ErrorType + /// + [JsonPropertyName("error_type"), JsonPropertyOrder(3)] + public required ErrorType ErrorType { get; set; } + + /// + /// An error message associated with the failed API call + /// + /// An error message associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Body of request cannot be null. + /// + [JsonPropertyName("message"), JsonInclude] + public string? Message { get; set; } + + /// + /// The name of the [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) that generated the error, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The name of the [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) that generated the error, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// A string that uniquely identifies the carrier that generated the error. + /// + /// A string that uniquely identifies the carrier that generated the error. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The name of the field that caused the error + /// + /// The name of the field that caused the error + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// shipment.ship_to.phone_number + /// + [JsonPropertyName("field_name"), JsonInclude] + public string? FieldName { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Error {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); + sb.Append(" ErrorSource: ").Append(ErrorSource).Append("\n"); + sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" FieldName: ").Append(FieldName).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ErrorCode.cs b/ShipEngineSDK/Model/ErrorCode.cs new file mode 100644 index 00000000..47bae8f4 --- /dev/null +++ b/ShipEngineSDK/Model/ErrorCode.cs @@ -0,0 +1,386 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The error code specified for the failed API Call +/// +/// The error code specified for the failed API Call +[JsonConverter(typeof(ErrorCodeJsonConverter))] +public class ErrorCode +{ + private readonly string _value; + + /// + /// Create a new instance of ErrorCode with a predefined value. + /// + internal ErrorCode() + { + _value = "auto_fund_not_supported"; + } + + /// + /// Create a new instance of ErrorCode with a custom value. + /// + /// The value of the ErrorCode + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ErrorCode(string value) + { + _value = value; + } + + /// + /// Enum AutoFundNotSupported for value: auto_fund_not_supported + /// + public static ErrorCode AutoFundNotSupported { get; } = new("auto_fund_not_supported"); + + + /// + /// Enum BatchCannotBeModified for value: batch_cannot_be_modified + /// + public static ErrorCode BatchCannotBeModified { get; } = new("batch_cannot_be_modified"); + + + /// + /// Enum CarrierConflict for value: carrier_conflict + /// + public static ErrorCode CarrierConflict { get; } = new("carrier_conflict"); + + + /// + /// Enum CarrierDisconnected for value: carrier_disconnected + /// + public static ErrorCode CarrierDisconnected { get; } = new("carrier_disconnected"); + + + /// + /// Enum CarrierNotConnected for value: carrier_not_connected + /// + public static ErrorCode CarrierNotConnected { get; } = new("carrier_not_connected"); + + + /// + /// Enum CarrierNotSupported for value: carrier_not_supported + /// + public static ErrorCode CarrierNotSupported { get; } = new("carrier_not_supported"); + + + /// + /// Enum ConfirmationNotSupported for value: confirmation_not_supported + /// + public static ErrorCode ConfirmationNotSupported { get; } = new("confirmation_not_supported"); + + + /// + /// Enum DefaultWarehouseCannotBeDeleted for value: default_warehouse_cannot_be_deleted + /// + public static ErrorCode DefaultWarehouseCannotBeDeleted { get; } = new("default_warehouse_cannot_be_deleted"); + + + /// + /// Enum FieldConflict for value: field_conflict + /// + public static ErrorCode FieldConflict { get; } = new("field_conflict"); + + + /// + /// Enum FieldValueRequired for value: field_value_required + /// + public static ErrorCode FieldValueRequired { get; } = new("field_value_required"); + + + /// + /// Enum Forbidden for value: forbidden + /// + public static ErrorCode Forbidden { get; } = new("forbidden"); + + + /// + /// Enum IdentifierConflict for value: identifier_conflict + /// + public static ErrorCode IdentifierConflict { get; } = new("identifier_conflict"); + + + /// + /// Enum IdentifiersMustMatch for value: identifiers_must_match + /// + public static ErrorCode IdentifiersMustMatch { get; } = new("identifiers_must_match"); + + + /// + /// Enum InsufficientFunds for value: insufficient_funds + /// + public static ErrorCode InsufficientFunds { get; } = new("insufficient_funds"); + + + /// + /// Enum InvalidAddress for value: invalid_address + /// + public static ErrorCode InvalidAddress { get; } = new("invalid_address"); + + + /// + /// Enum InvalidBillingPlan for value: invalid_billing_plan + /// + public static ErrorCode InvalidBillingPlan { get; } = new("invalid_billing_plan"); + + + /// + /// Enum InvalidFieldValue for value: invalid_field_value + /// + public static ErrorCode InvalidFieldValue { get; } = new("invalid_field_value"); + + + /// + /// Enum InvalidIdentifier for value: invalid_identifier + /// + public static ErrorCode InvalidIdentifier { get; } = new("invalid_identifier"); + + + /// + /// Enum InvalidStatus for value: invalid_status + /// + public static ErrorCode InvalidStatus { get; } = new("invalid_status"); + + + /// + /// Enum InvalidStringLength for value: invalid_string_length + /// + public static ErrorCode InvalidStringLength { get; } = new("invalid_string_length"); + + + /// + /// Enum LabelImagesNotSupported for value: label_images_not_supported + /// + public static ErrorCode LabelImagesNotSupported { get; } = new("label_images_not_supported"); + + + /// + /// Enum MeterFailure for value: meter_failure + /// + public static ErrorCode MeterFailure { get; } = new("meter_failure"); + + + /// + /// Enum OrderSourceNotActive for value: order_source_not_active + /// + public static ErrorCode OrderSourceNotActive { get; } = new("order_source_not_active"); + + + /// + /// Enum RateLimitExceeded for value: rate_limit_exceeded + /// + public static ErrorCode RateLimitExceeded { get; } = new("rate_limit_exceeded"); + + + /// + /// Enum RefreshNotSupported for value: refresh_not_supported + /// + public static ErrorCode RefreshNotSupported { get; } = new("refresh_not_supported"); + + + /// + /// Enum RequestBodyRequired for value: request_body_required + /// + public static ErrorCode RequestBodyRequired { get; } = new("request_body_required"); + + + /// + /// Enum ReturnLabelNotSupported for value: return_label_not_supported + /// + public static ErrorCode ReturnLabelNotSupported { get; } = new("return_label_not_supported"); + + + /// + /// Enum SettingsNotSupported for value: settings_not_supported + /// + public static ErrorCode SettingsNotSupported { get; } = new("settings_not_supported"); + + + /// + /// Enum SubscriptionInactive for value: subscription_inactive + /// + public static ErrorCode SubscriptionInactive { get; } = new("subscription_inactive"); + + + /// + /// Enum TermsNotAccepted for value: terms_not_accepted + /// + public static ErrorCode TermsNotAccepted { get; } = new("terms_not_accepted"); + + + /// + /// Enum TrackingNotSupported for value: tracking_not_supported + /// + public static ErrorCode TrackingNotSupported { get; } = new("tracking_not_supported"); + + + /// + /// Enum TrialExpired for value: trial_expired + /// + public static ErrorCode TrialExpired { get; } = new("trial_expired"); + + + /// + /// Enum Unauthorized for value: unauthorized + /// + public static ErrorCode Unauthorized { get; } = new("unauthorized"); + + + /// + /// Enum Unknown for value: unknown + /// + public static ErrorCode Unknown { get; } = new("unknown"); + + + /// + /// Enum Unspecified for value: unspecified + /// + public static ErrorCode Unspecified { get; } = new("unspecified"); + + + /// + /// Enum VerificationFailure for value: verification_failure + /// + public static ErrorCode VerificationFailure { get; } = new("verification_failure"); + + + /// + /// Enum WarehouseConflict for value: warehouse_conflict + /// + public static ErrorCode WarehouseConflict { get; } = new("warehouse_conflict"); + + + /// + /// Enum WebhookEventTypeConflict for value: webhook_event_type_conflict + /// + public static ErrorCode WebhookEventTypeConflict { get; } = new("webhook_event_type_conflict"); + + + /// + /// Enum CustomsItemsRequired for value: customs_items_required + /// + public static ErrorCode CustomsItemsRequired { get; } = new("customs_items_required"); + + + /// + /// Enum IncompatiblePairedLabels for value: incompatible_paired_labels + /// + public static ErrorCode IncompatiblePairedLabels { get; } = new("incompatible_paired_labels"); + + + /// + /// Enum InvalidChargeEvent for value: invalid_charge_event + /// + public static ErrorCode InvalidChargeEvent { get; } = new("invalid_charge_event"); + + + /// + /// Enum InvalidObject for value: invalid_object + /// + public static ErrorCode InvalidObject { get; } = new("invalid_object"); + + + /// + /// Enum NoRatesReturned for value: no_rates_returned + /// + public static ErrorCode NoRatesReturned { get; } = new("no_rates_returned"); + + + /// + /// Enum FileNotFound for value: file_not_found + /// + public static ErrorCode FileNotFound { get; } = new("file_not_found"); + + + /// + /// Enum ShippingRuleNotFound for value: shipping_rule_not_found + /// + public static ErrorCode ShippingRuleNotFound { get; } = new("shipping_rule_not_found"); + + + /// + /// Enum ServiceNotDetermined for value: service_not_determined + /// + public static ErrorCode ServiceNotDetermined { get; } = new("service_not_determined"); + + + /// + /// Enum NoRatesReturned2 for value: no_rates_returned + /// + public static ErrorCode NoRatesReturned2 { get; } = new("no_rates_returned"); + + + /// + /// Enum FundingSourceRegistrationInProgress for value: funding_source_registration_in_progress + /// + public static ErrorCode FundingSourceRegistrationInProgress { get; } = new("funding_source_registration_in_progress"); + + + /// + /// Enum InsuranceFailure for value: insurance_failure + /// + public static ErrorCode InsuranceFailure { get; } = new("insurance_failure"); + + + /// + /// Enum FundingSourceMissingConfiguration for value: funding_source_missing_configuration + /// + public static ErrorCode FundingSourceMissingConfiguration { get; } = new("funding_source_missing_configuration"); + + + /// + /// Enum FundingSourceError for value: funding_source_error + /// + public static ErrorCode FundingSourceError { get; } = new("funding_source_error"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ErrorCode other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ErrorCodeJsonConverter : JsonConverter +{ + public override ErrorCode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ErrorCode(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ErrorCode value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ErrorCode); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ErrorResponseBody.cs b/ShipEngineSDK/Model/ErrorResponseBody.cs new file mode 100644 index 00000000..a4c9449c --- /dev/null +++ b/ShipEngineSDK/Model/ErrorResponseBody.cs @@ -0,0 +1,75 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An error response body +/// +public partial class ErrorResponseBody +{ + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(2)] + public required Guid RequestId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ErrorResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ErrorSource.cs b/ShipEngineSDK/Model/ErrorSource.cs new file mode 100644 index 00000000..4b3810c8 --- /dev/null +++ b/ShipEngineSDK/Model/ErrorSource.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipEngine API itself. +/// +/// The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipEngine API itself. +[JsonConverter(typeof(ErrorSourceJsonConverter))] +public class ErrorSource +{ + private readonly string _value; + + /// + /// Create a new instance of ErrorSource with a predefined value. + /// + internal ErrorSource() + { + _value = "carrier"; + } + + /// + /// Create a new instance of ErrorSource with a custom value. + /// + /// The value of the ErrorSource + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ErrorSource(string value) + { + _value = value; + } + + /// + /// Enum Carrier for value: carrier + /// + public static ErrorSource Carrier { get; } = new("carrier"); + + + /// + /// Enum OrderSource for value: order_source + /// + public static ErrorSource OrderSource { get; } = new("order_source"); + + + /// + /// Enum Shipengine for value: shipengine + /// + public static ErrorSource Shipengine { get; } = new("shipengine"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ErrorSource other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ErrorSourceJsonConverter : JsonConverter +{ + public override ErrorSource? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ErrorSource(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ErrorSource value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ErrorSource); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ErrorType.cs b/ShipEngineSDK/Model/ErrorType.cs new file mode 100644 index 00000000..07ea4e80 --- /dev/null +++ b/ShipEngineSDK/Model/ErrorType.cs @@ -0,0 +1,128 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The type of error +/// +/// The type of error +[JsonConverter(typeof(ErrorTypeJsonConverter))] +public class ErrorType +{ + private readonly string _value; + + /// + /// Create a new instance of ErrorType with a predefined value. + /// + internal ErrorType() + { + _value = "account_status"; + } + + /// + /// Create a new instance of ErrorType with a custom value. + /// + /// The value of the ErrorType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ErrorType(string value) + { + _value = value; + } + + /// + /// Enum AccountStatus for value: account_status + /// + public static ErrorType AccountStatus { get; } = new("account_status"); + + + /// + /// Enum BusinessRules for value: business_rules + /// + public static ErrorType BusinessRules { get; } = new("business_rules"); + + + /// + /// Enum Validation for value: validation + /// + public static ErrorType Validation { get; } = new("validation"); + + + /// + /// Enum Security for value: security + /// + public static ErrorType Security { get; } = new("security"); + + + /// + /// Enum System for value: system + /// + public static ErrorType System { get; } = new("system"); + + + /// + /// Enum Integrations for value: integrations + /// + public static ErrorType Integrations { get; } = new("integrations"); + + + /// + /// Enum Wallet for value: wallet + /// + public static ErrorType Wallet { get; } = new("wallet"); + + + /// + /// Enum FundingSources for value: funding_sources + /// + public static ErrorType FundingSources { get; } = new("funding_sources"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ErrorType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ErrorTypeJsonConverter : JsonConverter +{ + public override ErrorType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ErrorType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ErrorType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ErrorType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ErrorWithLabelIdResponseBody.cs b/ShipEngineSDK/Model/ErrorWithLabelIdResponseBody.cs new file mode 100644 index 00000000..bb0fcce2 --- /dev/null +++ b/ShipEngineSDK/Model/ErrorWithLabelIdResponseBody.cs @@ -0,0 +1,75 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An error response body +/// +public partial class ErrorWithLabelIdResponseBody +{ + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(2)] + public required Guid RequestId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ErrorWithLabelIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/EstimateRatesRequestBody.cs b/ShipEngineSDK/Model/EstimateRatesRequestBody.cs new file mode 100644 index 00000000..dbcfa134 --- /dev/null +++ b/ShipEngineSDK/Model/EstimateRatesRequestBody.cs @@ -0,0 +1,453 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate estimate request body +/// +[JsonConverter(typeof(EstimateRatesRequestBodyJsonConverter))] +//[DataContract(Name = "estimate_rates_request_body")] +public partial class EstimateRatesRequestBody : AbstractOpenAPISchema +{ + + /// + /// from postal code + /// + /// from postal code + /// + /// Austin + /// + [JsonPropertyName("from_city_locality"), JsonPropertyOrder(1)] + public required string FromCityLocality { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("from_country_code"), JsonPropertyOrder(2)] + public required string FromCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("from_postal_code"), JsonPropertyOrder(3)] + public required string FromPostalCode { get; set; } + + /// + /// From state province + /// + /// From state province + /// + /// Austin + /// + [JsonPropertyName("from_state_province"), JsonPropertyOrder(4)] + public required string FromStateProvince { get; set; } + + /// + /// ship date + /// + /// ship date + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(5)] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// The city locality the package is being shipped to + /// + /// The city locality the package is being shipped to + /// + /// Austin + /// + [JsonPropertyName("to_city_locality"), JsonPropertyOrder(6)] + public required string ToCityLocality { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("to_country_code"), JsonPropertyOrder(7)] + public required string ToCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("to_postal_code"), JsonPropertyOrder(8)] + public required string ToPostalCode { get; set; } + + /// + /// To state province + /// + /// To state province + /// + /// Houston + /// + [JsonPropertyName("to_state_province"), JsonPropertyOrder(9)] + public required string ToStateProvince { get; set; } + + /// + /// The weight of the package + /// + /// The weight of the package + [JsonPropertyName("weight"), JsonPropertyOrder(10)] + public required Weight Weight { get; set; } + + /// + /// Gets or Sets AddressResidentialIndicator + /// + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(11)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } /// + /// Gets or Sets Confirmation + /// + [JsonPropertyName("confirmation"), JsonPropertyOrder(12)] + public DeliveryConfirmation? Confirmation { get; set; } /// + /// The dimensions of the package + /// + /// The dimensions of the package + [JsonPropertyName("dimensions"), JsonPropertyOrder(13)] + public Dimensions? Dimensions { get; set; } + + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RateEstimateByCarrierId. + public EstimateRatesRequestBody(RateEstimateByCarrierId actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RateEstimateByCarrierIds. + public EstimateRatesRequestBody(RateEstimateByCarrierIds actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(RateEstimateByCarrierId)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RateEstimateByCarrierIds)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: RateEstimateByCarrierId, RateEstimateByCarrierIds"); + } + } + } + + /// + /// Get the actual instance of `RateEstimateByCarrierId`. If the actual instance is not `RateEstimateByCarrierId`, + /// the InvalidClassException will be thrown + /// + /// An instance of RateEstimateByCarrierId + public RateEstimateByCarrierId GetRateEstimateByCarrierId() + { + return (RateEstimateByCarrierId)this.ActualInstance; + } + + /// + /// Get the actual instance of `RateEstimateByCarrierIds`. If the actual instance is not `RateEstimateByCarrierIds`, + /// the InvalidClassException will be thrown + /// + /// An instance of RateEstimateByCarrierIds + public RateEstimateByCarrierIds GetRateEstimateByCarrierIds() + { + return (RateEstimateByCarrierIds)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EstimateRatesRequestBody {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append(" FromCityLocality: ").Append(this.FromCityLocality).Append("\n"); + sb.Append(" FromCountryCode: ").Append(this.FromCountryCode).Append("\n"); + sb.Append(" FromPostalCode: ").Append(this.FromPostalCode).Append("\n"); + sb.Append(" FromStateProvince: ").Append(this.FromStateProvince).Append("\n"); + sb.Append(" ShipDate: ").Append(this.ShipDate).Append("\n"); + sb.Append(" ToCityLocality: ").Append(this.ToCityLocality).Append("\n"); + sb.Append(" ToCountryCode: ").Append(this.ToCountryCode).Append("\n"); + sb.Append(" ToPostalCode: ").Append(this.ToPostalCode).Append("\n"); + sb.Append(" ToStateProvince: ").Append(this.ToStateProvince).Append("\n"); + sb.Append(" Weight: ").Append(this.Weight).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(this.AddressResidentialIndicator).Append("\n"); + sb.Append(" Confirmation: ").Append(this.Confirmation).Append("\n"); + sb.Append(" Dimensions: ").Append(this.Dimensions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, EstimateRatesRequestBody.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for EstimateRatesRequestBody +/// +public class EstimateRatesRequestBodyJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(RateEstimateByCarrierId), typeof(RateEstimateByCarrierIds)]; + private static readonly HashSet MandatoryFields = ["FromCityLocality", "FromCountryCode", "FromPostalCode", "FromStateProvince", "ShipDate", "ToCityLocality", "ToCountryCode", "ToPostalCode", "ToStateProvince", "Weight"]; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, EstimateRatesRequestBody value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("from_city_locality"); + JsonSerializer.Serialize(writer, value.FromCityLocality, options); + writer.WritePropertyName("from_country_code"); + JsonSerializer.Serialize(writer, value.FromCountryCode, options); + writer.WritePropertyName("from_postal_code"); + JsonSerializer.Serialize(writer, value.FromPostalCode, options); + writer.WritePropertyName("from_state_province"); + JsonSerializer.Serialize(writer, value.FromStateProvince, options); + writer.WritePropertyName("ship_date"); + JsonSerializer.Serialize(writer, value.ShipDate, options); + writer.WritePropertyName("to_city_locality"); + JsonSerializer.Serialize(writer, value.ToCityLocality, options); + writer.WritePropertyName("to_country_code"); + JsonSerializer.Serialize(writer, value.ToCountryCode, options); + writer.WritePropertyName("to_postal_code"); + JsonSerializer.Serialize(writer, value.ToPostalCode, options); + writer.WritePropertyName("to_state_province"); + JsonSerializer.Serialize(writer, value.ToStateProvince, options); + writer.WritePropertyName("weight"); + JsonSerializer.Serialize(writer, value.Weight, options); + writer.WritePropertyName("address_residential_indicator"); + JsonSerializer.Serialize(writer, value.AddressResidentialIndicator, options); + writer.WritePropertyName("confirmation"); + JsonSerializer.Serialize(writer, value.Confirmation, options); + writer.WritePropertyName("dimensions"); + JsonSerializer.Serialize(writer, value.Dimensions, options); + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override EstimateRatesRequestBody? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + EstimateRatesRequestBody? newEstimateRatesRequestBody = null; + + // Deserialize all the common properties of the model so they can be used in object initializers later + var fromCityLocality = jsonDoc.RootElement.GetProperty("from_city_locality").Deserialize(DeserializingOptions)!; + var fromCountryCode = jsonDoc.RootElement.GetProperty("from_country_code").Deserialize(DeserializingOptions)!; + var fromPostalCode = jsonDoc.RootElement.GetProperty("from_postal_code").Deserialize(DeserializingOptions)!; + var fromStateProvince = jsonDoc.RootElement.GetProperty("from_state_province").Deserialize(DeserializingOptions)!; + var shipDate = jsonDoc.RootElement.GetProperty("ship_date").Deserialize(DeserializingOptions)!; + var toCityLocality = jsonDoc.RootElement.GetProperty("to_city_locality").Deserialize(DeserializingOptions)!; + var toCountryCode = jsonDoc.RootElement.GetProperty("to_country_code").Deserialize(DeserializingOptions)!; + var toPostalCode = jsonDoc.RootElement.GetProperty("to_postal_code").Deserialize(DeserializingOptions)!; + var toStateProvince = jsonDoc.RootElement.GetProperty("to_state_province").Deserialize(DeserializingOptions)!; + var weight = jsonDoc.RootElement.GetProperty("weight").Deserialize(DeserializingOptions)!; + var addressResidentialIndicator = jsonDoc.RootElement.GetProperty("address_residential_indicator").Deserialize(DeserializingOptions)!; + var confirmation = jsonDoc.RootElement.GetProperty("confirmation").Deserialize(DeserializingOptions)!; + var dimensions = jsonDoc.RootElement.GetProperty("dimensions").Deserialize(DeserializingOptions)!; + + int match = 0; + var matchedTypes = new List(); + + try + { + newEstimateRatesRequestBody = new EstimateRatesRequestBody(jsonDoc.Deserialize(DeserializingOptions)!) + { + FromCityLocality = fromCityLocality, + FromCountryCode = fromCountryCode, + FromPostalCode = fromPostalCode, + FromStateProvince = fromStateProvince, + ShipDate = shipDate, + ToCityLocality = toCityLocality, + ToCountryCode = toCountryCode, + ToPostalCode = toPostalCode, + ToStateProvince = toStateProvince, + Weight = weight, + AddressResidentialIndicator = addressResidentialIndicator, + Confirmation = confirmation, + Dimensions = dimensions, + }; + + matchedTypes.Add("RateEstimateByCarrierId"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into RateEstimateByCarrierId: {1}", jsonDoc, exception); + } + + try + { + newEstimateRatesRequestBody = new EstimateRatesRequestBody(jsonDoc.Deserialize(DeserializingOptions)!) + { + FromCityLocality = fromCityLocality, + FromCountryCode = fromCountryCode, + FromPostalCode = fromPostalCode, + FromStateProvince = fromStateProvince, + ShipDate = shipDate, + ToCityLocality = toCityLocality, + ToCountryCode = toCountryCode, + ToPostalCode = toPostalCode, + ToStateProvince = toStateProvince, + Weight = weight, + AddressResidentialIndicator = addressResidentialIndicator, + Confirmation = confirmation, + Dimensions = dimensions, + }; + + matchedTypes.Add("RateEstimateByCarrierIds"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into RateEstimateByCarrierIds: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newEstimateRatesRequestBody; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(EstimateRatesRequestBody).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/FedexAccountSettings.cs b/ShipEngineSDK/Model/FedexAccountSettings.cs new file mode 100644 index 00000000..f556d2d7 --- /dev/null +++ b/ShipEngineSDK/Model/FedexAccountSettings.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Fedex account settings request body +/// +public partial class FedexAccountSettings +{ + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(1)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image"), JsonPropertyOrder(2)] + public string? LetterheadImage { get; set; } + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(3)] + public string? Nickname { get; set; } + + /// + /// Gets or Sets PickupType + /// + [JsonPropertyName("pickup_type"), JsonPropertyOrder(4)] + public FedexPickupType? PickupType { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image"), JsonPropertyOrder(5)] + public string? SignatureImage { get; set; } + + /// + /// Gets or Sets SmartPostEndorsement + /// + [JsonPropertyName("smart_post_endorsement"), JsonPropertyOrder(6)] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + + /// + /// Gets or Sets SmartPostHub + /// + [JsonPropertyName("smart_post_hub"), JsonPropertyOrder(7)] + public SmartPostHub? SmartPostHub { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FedexAccountSettings {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/FedexAccountSettingsRequestBody.cs b/ShipEngineSDK/Model/FedexAccountSettingsRequestBody.cs new file mode 100644 index 00000000..47a12c62 --- /dev/null +++ b/ShipEngineSDK/Model/FedexAccountSettingsRequestBody.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Fedex account settings request body +/// +public partial class FedexAccountSettingsRequestBody +{ + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(1)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image"), JsonPropertyOrder(2)] + public string? LetterheadImage { get; set; } + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(3)] + public string? Nickname { get; set; } + + /// + /// Gets or Sets PickupType + /// + [JsonPropertyName("pickup_type"), JsonPropertyOrder(4)] + public FedexPickupType? PickupType { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image"), JsonPropertyOrder(5)] + public string? SignatureImage { get; set; } + + /// + /// Gets or Sets SmartPostEndorsement + /// + [JsonPropertyName("smart_post_endorsement"), JsonPropertyOrder(6)] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + + /// + /// Gets or Sets SmartPostHub + /// + [JsonPropertyName("smart_post_hub"), JsonPropertyOrder(7)] + public SmartPostHub? SmartPostHub { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FedexAccountSettingsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/FedexPickupType.cs b/ShipEngineSDK/Model/FedexPickupType.cs new file mode 100644 index 00000000..3e80dae0 --- /dev/null +++ b/ShipEngineSDK/Model/FedexPickupType.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Tax identifier type for customs declaration |Pickup Type |Description |- -- -- -- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`none` | Not specified |`regular_pickup` | You already have a daily pickup scheduled with FedEx |`request_courier` | You will call FedEx to request a courier |`drop_box` | You will drop-off packages in a FedEx drop box |`business_service_center` | You will drop-off packages at an authorized FedEx business service center |`station` | You will drop-off the package at a FedEx Station +/// +/// Tax identifier type for customs declaration |Pickup Type |Description |- -- -- -- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`none` | Not specified |`regular_pickup` | You already have a daily pickup scheduled with FedEx |`request_courier` | You will call FedEx to request a courier |`drop_box` | You will drop-off packages in a FedEx drop box |`business_service_center` | You will drop-off packages at an authorized FedEx business service center |`station` | You will drop-off the package at a FedEx Station +[JsonConverter(typeof(FedexPickupTypeJsonConverter))] +public class FedexPickupType +{ + private readonly string _value; + + /// + /// Create a new instance of FedexPickupType with a predefined value. + /// + internal FedexPickupType() + { + _value = "none"; + } + + /// + /// Create a new instance of FedexPickupType with a custom value. + /// + /// The value of the FedexPickupType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public FedexPickupType(string value) + { + _value = value; + } + + /// + /// Enum None for value: none + /// + public static FedexPickupType None { get; } = new("none"); + + + /// + /// Enum RegularPickup for value: regular_pickup + /// + public static FedexPickupType RegularPickup { get; } = new("regular_pickup"); + + + /// + /// Enum RequestCourier for value: request_courier + /// + public static FedexPickupType RequestCourier { get; } = new("request_courier"); + + + /// + /// Enum DropBox for value: drop_box + /// + public static FedexPickupType DropBox { get; } = new("drop_box"); + + + /// + /// Enum BusinessServiceCenter for value: business_service_center + /// + public static FedexPickupType BusinessServiceCenter { get; } = new("business_service_center"); + + + /// + /// Enum Station for value: station + /// + public static FedexPickupType Station { get; } = new("station"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is FedexPickupType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class FedexPickupTypeJsonConverter : JsonConverter +{ + public override FedexPickupType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new FedexPickupType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, FedexPickupType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(FedexPickupType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/FedexSettingsResponseBody.cs b/ShipEngineSDK/Model/FedexSettingsResponseBody.cs new file mode 100644 index 00000000..638947f1 --- /dev/null +++ b/ShipEngineSDK/Model/FedexSettingsResponseBody.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A Fedex settings response body +/// +public partial class FedexSettingsResponseBody +{ + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(1)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image"), JsonPropertyOrder(2)] + public string? LetterheadImage { get; set; } + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(3)] + public string? Nickname { get; set; } + + /// + /// Gets or Sets PickupType + /// + [JsonPropertyName("pickup_type"), JsonPropertyOrder(4)] + public FedexPickupType? PickupType { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image"), JsonPropertyOrder(5)] + public string? SignatureImage { get; set; } + + /// + /// Gets or Sets SmartPostEndorsement + /// + [JsonPropertyName("smart_post_endorsement"), JsonPropertyOrder(6)] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + + /// + /// Gets or Sets SmartPostHub + /// + [JsonPropertyName("smart_post_hub"), JsonPropertyOrder(7)] + public SmartPostHub? SmartPostHub { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FedexSettingsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetAccountSettingsImagesResponseBody.cs b/ShipEngineSDK/Model/GetAccountSettingsImagesResponseBody.cs new file mode 100644 index 00000000..1eba06d9 --- /dev/null +++ b/ShipEngineSDK/Model/GetAccountSettingsImagesResponseBody.cs @@ -0,0 +1,196 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get account images by id response body +/// +public partial class GetAccountSettingsImagesResponseBody +{ + /// + /// The image type + /// + /// The image type + [JsonConverter(typeof(ImageContentTypeEnumJsonConverter))] + public class ImageContentTypeEnum + { + private readonly string _value; + + /// + /// Create a new instance of ImageContentTypeEnum with a predefined value. + /// + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + /// + /// Create a new instance of ImageContentTypeEnum with a custom value. + /// + /// The value of the ImageContentTypeEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ImageContentTypeEnum(string value) + { + _value = value; + } + + /// + /// Enum Png for value: image/png + /// + public static ImageContentTypeEnum Png { get; } = new("image/png"); + + + /// + /// Enum Jpeg for value: image/jpeg + /// + public static ImageContentTypeEnum Jpeg { get; } = new("image/jpeg"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class ImageContentTypeEnumJsonConverter : JsonConverter + { + public override ImageContentTypeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ImageContentTypeEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ImageContentTypeEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ImageContentTypeEnum); + } + + + /// + /// The date and time that the image was created in ShipEngine. + /// + /// The date and time that the image was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The image type + /// + /// The image type + [JsonPropertyName("image_content_type"), JsonPropertyOrder(2)] + public ImageContentTypeEnum? ImageContentType { get; set; } + + /// + /// A base64 encoded string representation of the image. + /// + /// A base64 encoded string representation of the image. + /// + /// iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg== + /// + [JsonPropertyName("image_data"), JsonPropertyOrder(3)] + public string? ImageData { get; set; } + + /// + /// Indicates whether this image is set as default. + /// + /// Indicates whether this image is set as default. + /// + /// false + /// + [JsonPropertyName("is_default"), JsonPropertyOrder(4)] + public bool? IsDefault { get; set; } + + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonInclude] + public string? LabelImageId { get; set; } + + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name"), JsonPropertyOrder(7)] + public string? Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAccountSettingsImagesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetAccountSettingsResponseBody.cs b/ShipEngineSDK/Model/GetAccountSettingsResponseBody.cs new file mode 100644 index 00000000..37168562 --- /dev/null +++ b/ShipEngineSDK/Model/GetAccountSettingsResponseBody.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetAccountSettingsResponseBody +/// +public partial class GetAccountSettingsResponseBody +{ + + /// + /// Gets or Sets DefaultLabelLayout + /// + [JsonPropertyName("default_label_layout"), JsonPropertyOrder(1)] + public DefaultLabelLayout? DefaultLabelLayout { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAccountSettingsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" DefaultLabelLayout: ").Append(DefaultLabelLayout).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetBatchByExternalIdResponseBody.cs b/ShipEngineSDK/Model/GetBatchByExternalIdResponseBody.cs new file mode 100644 index 00000000..48fc8e87 --- /dev/null +++ b/ShipEngineSDK/Model/GetBatchByExternalIdResponseBody.cs @@ -0,0 +1,303 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get batch by external id response body +/// +public partial class GetBatchByExternalIdResponseBody +{ + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_errors_url"), JsonInclude] + public OptionalLink? BatchErrorsUrl { get; set; } + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url"), JsonPropertyOrder(3)] + public required OptionalLink BatchLabelsUrl { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_number"), JsonInclude] + public string? BatchNumber { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url"), JsonPropertyOrder(5)] + public required OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("completed"), JsonInclude] + public int? Completed { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("count"), JsonInclude] + public int? Count { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("errors"), JsonInclude] + public int? Errors { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public OptionalLink? FormDownload { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("forms"), JsonInclude] + public int? Forms { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_format"), JsonInclude] + public LabelFormat? LabelFormat { get; set; } + + /// + /// label layout + /// + /// label layout + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_layout"), JsonInclude] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("process_errors"), JsonInclude] + public List? ProcessErrors { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public BatchStatus? Status { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("warnings"), JsonInclude] + public int? Warnings { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes"), JsonInclude] + public string? BatchNotes { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("external_batch_id"), JsonInclude] + public string? ExternalBatchId { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at"), JsonInclude] + public DateTimeOffset? ProcessedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetBatchByExternalIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetBatchByIdResponseBody.cs b/ShipEngineSDK/Model/GetBatchByIdResponseBody.cs new file mode 100644 index 00000000..1715b459 --- /dev/null +++ b/ShipEngineSDK/Model/GetBatchByIdResponseBody.cs @@ -0,0 +1,303 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get batch by id response body +/// +public partial class GetBatchByIdResponseBody +{ + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_errors_url"), JsonInclude] + public OptionalLink? BatchErrorsUrl { get; set; } + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url"), JsonPropertyOrder(3)] + public required OptionalLink BatchLabelsUrl { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batch_number"), JsonInclude] + public string? BatchNumber { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url"), JsonPropertyOrder(5)] + public required OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("completed"), JsonInclude] + public int? Completed { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("count"), JsonInclude] + public int? Count { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2 + /// + [JsonPropertyName("errors"), JsonInclude] + public int? Errors { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public OptionalLink? FormDownload { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("forms"), JsonInclude] + public int? Forms { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_format"), JsonInclude] + public LabelFormat? LabelFormat { get; set; } + + /// + /// label layout + /// + /// label layout + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_layout"), JsonInclude] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("process_errors"), JsonInclude] + public List? ProcessErrors { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public BatchStatus? Status { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("warnings"), JsonInclude] + public int? Warnings { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes"), JsonInclude] + public string? BatchNotes { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("external_batch_id"), JsonInclude] + public string? ExternalBatchId { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at"), JsonInclude] + public DateTimeOffset? ProcessedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetBatchByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetCarrierByIdResponseBody.cs b/ShipEngineSDK/Model/GetCarrierByIdResponseBody.cs new file mode 100644 index 00000000..f8fc36b3 --- /dev/null +++ b/ShipEngineSDK/Model/GetCarrierByIdResponseBody.cs @@ -0,0 +1,239 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get carrier by id response body +/// +public partial class GetCarrierByIdResponseBody +{ + + /// + /// The account number that the carrier is connected to. + /// + /// The account number that the carrier is connected to. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// account_570827 + /// + [JsonPropertyName("account_number"), JsonInclude] + public string? AccountNumber { get; set; } + + /// + /// Current available balance + /// + /// Current available balance + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3799.52 + /// + [JsonPropertyName("balance"), JsonInclude] + public decimal? Balance { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// A string that uniquely identifies the carrier. + /// + /// A string that uniquely identifies the carrier. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The carrier is disabled by the current ShipEngine account's billing plan. + /// + /// The carrier is disabled by the current ShipEngine account's billing plan. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("disabled_by_billing_plan"), JsonInclude] + public bool? DisabledByBillingPlan { get; set; } + + /// + /// Screen readable name + /// + /// Screen readable name + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Stamps.com + /// + [JsonPropertyName("friendly_name"), JsonInclude] + public string? FriendlyName { get; set; } + + /// + /// Funding source ID for the carrier + /// + /// Funding source ID for the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("funding_source_id"), JsonInclude] + public string? FundingSourceId { get; set; } + + /// + /// Carrier supports multiple packages per shipment + /// + /// Carrier supports multiple packages per shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("has_multi_package_supporting_services"), JsonInclude] + public bool? HasMultiPackageSupportingServices { get; set; } + + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// ShipEngine Account - Stamps.com + /// + [JsonPropertyName("nickname"), JsonInclude] + public string? Nickname { get; set; } + + /// + /// A list of options that are available to that carrier + /// + /// A list of options that are available to that carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("options"), JsonInclude] + public List? Options { get; set; } + + /// + /// A list of package types that are supported by the carrier + /// + /// A list of package types that are supported by the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// Is this the primary carrier that is used by default when no carrier is specified in label/shipment creation + /// + /// Is this the primary carrier that is used by default when no carrier is specified in label/shipment creation + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("primary"), JsonInclude] + public bool? Primary { get; set; } + + /// + /// Indicates whether the carrier requires funding to use its services + /// + /// Indicates whether the carrier requires funding to use its services + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requires_funded_amount"), JsonInclude] + public bool? RequiresFundedAmount { get; set; } + + /// + /// A list of services that are offered by the carrier + /// + /// A list of services that are offered by the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("services"), JsonInclude] + public List? Services { get; set; } + + /// + /// The carrier supports adding custom label messages to an order. + /// + /// The carrier supports adding custom label messages to an order. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("supports_label_messages"), JsonInclude] + public bool? SupportsLabelMessages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetCarrierByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Balance: ").Append(Balance).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" DisabledByBillingPlan: ").Append(DisabledByBillingPlan).Append("\n"); + sb.Append(" FriendlyName: ").Append(FriendlyName).Append("\n"); + sb.Append(" FundingSourceId: ").Append(FundingSourceId).Append("\n"); + sb.Append(" HasMultiPackageSupportingServices: ").Append(HasMultiPackageSupportingServices).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Options: ").Append(Options).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" Primary: ").Append(Primary).Append("\n"); + sb.Append(" RequiresFundedAmount: ").Append(RequiresFundedAmount).Append("\n"); + sb.Append(" Services: ").Append(Services).Append("\n"); + sb.Append(" SupportsLabelMessages: ").Append(SupportsLabelMessages).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetCarrierOptionsResponseBody.cs b/ShipEngineSDK/Model/GetCarrierOptionsResponseBody.cs new file mode 100644 index 00000000..ea9536a9 --- /dev/null +++ b/ShipEngineSDK/Model/GetCarrierOptionsResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A carrier list options response body +/// +public partial class GetCarrierOptionsResponseBody +{ + + /// + /// AN array of carrier options + /// + /// AN array of carrier options + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("options"), JsonInclude] + public List? Options { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetCarrierOptionsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Options: ").Append(Options).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetCarrierSettingsResponseBody.cs b/ShipEngineSDK/Model/GetCarrierSettingsResponseBody.cs new file mode 100644 index 00000000..ed3fe212 --- /dev/null +++ b/ShipEngineSDK/Model/GetCarrierSettingsResponseBody.cs @@ -0,0 +1,295 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetCarrierSettingsResponseBody +/// +[JsonConverter(typeof(GetCarrierSettingsResponseBodyJsonConverter))] +//[DataContract(Name = "get_carrier_settings_response_body")] +public partial class GetCarrierSettingsResponseBody : AbstractOpenAPISchema +{ + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of DhlExpressSettingsResponseBody. + public GetCarrierSettingsResponseBody(DhlExpressSettingsResponseBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of FedexSettingsResponseBody. + public GetCarrierSettingsResponseBody(FedexSettingsResponseBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpsSettingsResponseBody. + public GetCarrierSettingsResponseBody(UpsSettingsResponseBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(DhlExpressSettingsResponseBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(FedexSettingsResponseBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(UpsSettingsResponseBody)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: DhlExpressSettingsResponseBody, FedexSettingsResponseBody, UpsSettingsResponseBody"); + } + } + } + + /// + /// Get the actual instance of `DhlExpressSettingsResponseBody`. If the actual instance is not `DhlExpressSettingsResponseBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of DhlExpressSettingsResponseBody + public DhlExpressSettingsResponseBody GetDhlExpressSettingsResponseBody() + { + return (DhlExpressSettingsResponseBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `FedexSettingsResponseBody`. If the actual instance is not `FedexSettingsResponseBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of FedexSettingsResponseBody + public FedexSettingsResponseBody GetFedexSettingsResponseBody() + { + return (FedexSettingsResponseBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `UpsSettingsResponseBody`. If the actual instance is not `UpsSettingsResponseBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpsSettingsResponseBody + public UpsSettingsResponseBody GetUpsSettingsResponseBody() + { + return (UpsSettingsResponseBody)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetCarrierSettingsResponseBody {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, GetCarrierSettingsResponseBody.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for GetCarrierSettingsResponseBody +/// +public class GetCarrierSettingsResponseBodyJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(DhlExpressSettingsResponseBody), typeof(FedexSettingsResponseBody), typeof(UpsSettingsResponseBody)]; + private static readonly HashSet MandatoryFields = []; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, GetCarrierSettingsResponseBody value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override GetCarrierSettingsResponseBody? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + GetCarrierSettingsResponseBody? newGetCarrierSettingsResponseBody = null; + + + int match = 0; + var matchedTypes = new List(); + + try + { + newGetCarrierSettingsResponseBody = new GetCarrierSettingsResponseBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("DhlExpressSettingsResponseBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into DhlExpressSettingsResponseBody: {1}", jsonDoc, exception); + } + + try + { + newGetCarrierSettingsResponseBody = new GetCarrierSettingsResponseBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("FedexSettingsResponseBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into FedexSettingsResponseBody: {1}", jsonDoc, exception); + } + + try + { + newGetCarrierSettingsResponseBody = new GetCarrierSettingsResponseBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("UpsSettingsResponseBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into UpsSettingsResponseBody: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newGetCarrierSettingsResponseBody; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(GetCarrierSettingsResponseBody).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetCarriersResponseBody.cs b/ShipEngineSDK/Model/GetCarriersResponseBody.cs new file mode 100644 index 00000000..04c04ab8 --- /dev/null +++ b/ShipEngineSDK/Model/GetCarriersResponseBody.cs @@ -0,0 +1,86 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetCarriersResponseBody +/// +public partial class GetCarriersResponseBody +{ + + /// + /// The carrier response body + /// + /// The carrier response body + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carriers"), JsonInclude] + public List? Carriers { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(3)] + public required Guid RequestId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetCarriersResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Carriers: ").Append(Carriers).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetInsuranceBalanceResponseBody.cs b/ShipEngineSDK/Model/GetInsuranceBalanceResponseBody.cs new file mode 100644 index 00000000..aace6a71 --- /dev/null +++ b/ShipEngineSDK/Model/GetInsuranceBalanceResponseBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get insurance balance response body +/// +public partial class GetInsuranceBalanceResponseBody +{ + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public required decimal Amount { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("currency"), JsonPropertyOrder(2)] + public required string Currency { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetInsuranceBalanceResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetLabelByExternalShipmentIdResponseBody.cs b/ShipEngineSDK/Model/GetLabelByExternalShipmentIdResponseBody.cs new file mode 100644 index 00000000..452ec019 --- /dev/null +++ b/ShipEngineSDK/Model/GetLabelByExternalShipmentIdResponseBody.cs @@ -0,0 +1,484 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get label by external shipment id response body +/// +public partial class GetLabelByExternalShipmentIdResponseBody +{ + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(5)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(7)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(12)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(14), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(15)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(17)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(18)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(19), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(25)] + public string? RmaNumber { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(28), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(32), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(37), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetLabelByExternalShipmentIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetLabelByIdResponseBody.cs b/ShipEngineSDK/Model/GetLabelByIdResponseBody.cs new file mode 100644 index 00000000..e5b14f32 --- /dev/null +++ b/ShipEngineSDK/Model/GetLabelByIdResponseBody.cs @@ -0,0 +1,484 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get label by id response body +/// +public partial class GetLabelByIdResponseBody +{ + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(5)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(7)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(12)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(14), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(15)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(17)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(18)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(19), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(25)] + public string? RmaNumber { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(28), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(32), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(37), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetLabelByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetManifestByIdResponseBody.cs b/ShipEngineSDK/Model/GetManifestByIdResponseBody.cs new file mode 100644 index 00000000..666963f9 --- /dev/null +++ b/ShipEngineSDK/Model/GetManifestByIdResponseBody.cs @@ -0,0 +1,186 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get manifest by id response body +/// +public partial class GetManifestByIdResponseBody +{ + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The date-time that the manifest was created + /// + /// The date-time that the manifest was created + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("form_id"), JsonInclude] + public string? FormId { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_ids"), JsonInclude] + public List? LabelIds { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("manifest_download"), JsonInclude] + public ManifestDownload? ManifestDownload { get; set; } + + /// + /// A string that uniquely identifies the manifest + /// + /// A string that uniquely identifies the manifest + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id"), JsonInclude] + public string? ManifestId { get; set; } + + /// + /// The date-time that the manifests shipments will be picked up + /// + /// The date-time that the manifests shipments will be picked up + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 100 + /// + [JsonPropertyName("shipments"), JsonInclude] + public int? Shipments { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id"), JsonInclude] + public string? SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetManifestByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetPackageTypeByIdResponseBody.cs b/ShipEngineSDK/Model/GetPackageTypeByIdResponseBody.cs new file mode 100644 index 00000000..ed0096d9 --- /dev/null +++ b/ShipEngineSDK/Model/GetPackageTypeByIdResponseBody.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get package type by id response body +/// +public partial class GetPackageTypeByIdResponseBody +{ + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(2)] + public required string PackageCode { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description"), JsonPropertyOrder(3)] + public string? Description { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions"), JsonPropertyOrder(4)] + public Dimensions? Dimensions { get; set; } + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id"), JsonPropertyOrder(5)] + public string? PackageId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetPackageTypeByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetPickupByIdResponseBody.cs b/ShipEngineSDK/Model/GetPickupByIdResponseBody.cs new file mode 100644 index 00000000..34ce76be --- /dev/null +++ b/ShipEngineSDK/Model/GetPickupByIdResponseBody.cs @@ -0,0 +1,210 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetPickupByIdResponseBody +/// +public partial class GetPickupByIdResponseBody +{ + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details"), JsonPropertyOrder(2)] + public required ContactDetails ContactDetails { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// Label IDs that will be included in the pickup request + /// + /// Label IDs that will be included in the pickup request + [JsonPropertyName("label_ids"), JsonPropertyOrder(5)] + public required List LabelIds { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_address"), JsonInclude] + public Address? PickupAddress { get; set; } + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id"), JsonInclude] + public string? PickupId { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window"), JsonPropertyOrder(8)] + public required PickupWindow PickupWindow { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(9)] + public required Guid RequestId { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at"), JsonInclude] + public DateTimeOffset? CancelledAt { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number"), JsonInclude] + public string? ConfirmationNumber { get; set; } + + /// + /// Used by some carriers to give special instructions for a package pickup + /// + /// Used by some carriers to give special instructions for a package pickup + [JsonPropertyName("pickup_notes"), JsonPropertyOrder(13)] + public string? PickupNotes { get; set; } + + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_windows"), JsonInclude] + public List? PickupWindows { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetPickupByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" PickupWindow: ").Append(PickupWindow).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" CancelledAt: ").Append(CancelledAt).Append("\n"); + sb.Append(" ConfirmationNumber: ").Append(ConfirmationNumber).Append("\n"); + sb.Append(" PickupNotes: ").Append(PickupNotes).Append("\n"); + sb.Append(" PickupWindows: ").Append(PickupWindows).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetPickupsResponseBody.cs b/ShipEngineSDK/Model/GetPickupsResponseBody.cs new file mode 100644 index 00000000..e4759301 --- /dev/null +++ b/ShipEngineSDK/Model/GetPickupsResponseBody.cs @@ -0,0 +1,136 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetPickupsResponseBody +/// +public partial class GetPickupsResponseBody +{ + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// Helpful links to other pages of results + /// + /// Helpful links to other pages of results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("links"), JsonInclude] + public PaginationLink? Links { get; set; } + + /// + /// Current page of the list pickups results + /// + /// Current page of the list pickups results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("page"), JsonInclude] + public int? Page { get; set; } + + /// + /// Total number of pages for list pickups results + /// + /// Total number of pages for list pickups results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 4 + /// + [JsonPropertyName("pages"), JsonInclude] + public int? Pages { get; set; } + + /// + /// An array of pickups associated with the user's account. + /// + /// An array of pickups associated with the user's account. + [JsonPropertyName("pickups"), JsonPropertyOrder(5)] + public required List Pickups { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(6)] + public required Guid RequestId { get; set; } + + /// + /// The total number of pickups returned + /// + /// The total number of pickups returned + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("total"), JsonInclude] + public long? Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetPickupsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Pickups: ").Append(Pickups).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetRateByIdResponseBody.cs b/ShipEngineSDK/Model/GetRateByIdResponseBody.cs new file mode 100644 index 00000000..396209c5 --- /dev/null +++ b/ShipEngineSDK/Model/GetRateByIdResponseBody.cs @@ -0,0 +1,366 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate response body +/// +public partial class GetRateByIdResponseBody +{ + + /// + /// carrier code + /// + /// carrier code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// carrier friendly name + /// + /// carrier friendly name + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_friendly_name"), JsonInclude] + public string? CarrierFriendlyName { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// carrier nickname + /// + /// carrier nickname + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_nickname"), JsonInclude] + public string? CarrierNickname { get; set; } + + /// + /// The confirmation amount. Should be added with shipping_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// The confirmation amount. Should be added with shipping_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("confirmation_amount"), JsonInclude] + public MonetaryValue? ConfirmationAmount { get; set; } + + /// + /// The error messages + /// + /// The error messages + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("error_messages"), JsonInclude] + public List? ErrorMessages { get; set; } + + /// + /// Indicates if the rate is guaranteed. + /// + /// Indicates if the rate is guaranteed. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("guaranteed_service"), JsonInclude] + public bool? GuaranteedService { get; set; } + + /// + /// The insurance amount. Should be added with shipping_amount, confirmation_amount and other_amount to calculate the total purchase price. + /// + /// The insurance amount. Should be added with shipping_amount, confirmation_amount and other_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_amount"), JsonInclude] + public MonetaryValue? InsuranceAmount { get; set; } + + /// + /// Indicates if the rates been negotiated + /// + /// Indicates if the rates been negotiated + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("negotiated_rate"), JsonInclude] + public bool? NegotiatedRate { get; set; } + + /// + /// Any other charges associated with this rate. Should be added with shipping_amount, insurance_amount and confirmation_amount to calculate the total purchase price. + /// + /// Any other charges associated with this rate. Should be added with shipping_amount, insurance_amount and confirmation_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("other_amount"), JsonInclude] + public MonetaryValue? OtherAmount { get; set; } + + /// + /// A string that uniquely identifies the rate + /// + /// A string that uniquely identifies the rate + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("rate_id"), JsonInclude] + public string? RateId { get; set; } + + /// + /// Gets or Sets RateType + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_type"), JsonInclude] + public RateType? RateType { get; set; } + + /// + /// service code for the rate + /// + /// service code for the rate + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// service type + /// + /// service type + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("service_type"), JsonInclude] + public string? ServiceType { get; set; } + + /// + /// The shipping amount. Should be added with confirmation_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// The shipping amount. Should be added with confirmation_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipping_amount"), JsonInclude] + public MonetaryValue? ShippingAmount { get; set; } + + /// + /// Indicates if rate is trackable + /// + /// Indicates if rate is trackable + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// Gets or Sets ValidationStatus + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("validation_status"), JsonInclude] + public ValidationStatus? ValidationStatus { get; set; } + + /// + /// The warning messages + /// + /// The warning messages + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("warning_messages"), JsonInclude] + public List? WarningMessages { get; set; } + + /// + /// The carrier delivery days + /// + /// The carrier delivery days + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_delivery_days"), JsonInclude] + public string? CarrierDeliveryDays { get; set; } + + /// + /// The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday + /// + /// The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 5 + /// + [JsonPropertyName("delivery_days"), JsonInclude] + public int? DeliveryDays { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("estimated_delivery_date"), JsonInclude] + public DateTimeOffset? EstimatedDeliveryDate { get; set; } + + /// + /// package type that this rate was estimated for + /// + /// package type that this rate was estimated for + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// package + /// + [JsonPropertyName("package_type"), JsonInclude] + public string? PackageType { get; set; } + + /// + /// A list of rate details that are associated with this rate. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with this rate. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// ship date + /// + /// ship date + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tax_amount"), JsonInclude] + public MonetaryValue? TaxAmount { get; set; } + + /// + /// Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location + /// + /// Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 6 + /// + [JsonPropertyName("zone"), JsonInclude] + public int? Zone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetRateByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierFriendlyName: ").Append(CarrierFriendlyName).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierNickname: ").Append(CarrierNickname).Append("\n"); + sb.Append(" ConfirmationAmount: ").Append(ConfirmationAmount).Append("\n"); + sb.Append(" ErrorMessages: ").Append(ErrorMessages).Append("\n"); + sb.Append(" GuaranteedService: ").Append(GuaranteedService).Append("\n"); + sb.Append(" InsuranceAmount: ").Append(InsuranceAmount).Append("\n"); + sb.Append(" NegotiatedRate: ").Append(NegotiatedRate).Append("\n"); + sb.Append(" OtherAmount: ").Append(OtherAmount).Append("\n"); + sb.Append(" RateId: ").Append(RateId).Append("\n"); + sb.Append(" RateType: ").Append(RateType).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ServiceType: ").Append(ServiceType).Append("\n"); + sb.Append(" ShippingAmount: ").Append(ShippingAmount).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" ValidationStatus: ").Append(ValidationStatus).Append("\n"); + sb.Append(" WarningMessages: ").Append(WarningMessages).Append("\n"); + sb.Append(" CarrierDeliveryDays: ").Append(CarrierDeliveryDays).Append("\n"); + sb.Append(" DeliveryDays: ").Append(DeliveryDays).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" PackageType: ").Append(PackageType).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" TaxAmount: ").Append(TaxAmount).Append("\n"); + sb.Append(" Zone: ").Append(Zone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointByIdResponseBody.cs b/ShipEngineSDK/Model/GetServicePointByIdResponseBody.cs new file mode 100644 index 00000000..91e7debf --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointByIdResponseBody.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get service point by ID response body +/// +public partial class GetServicePointByIdResponseBody +{ + + /// + /// Gets or Sets ServicePoint + /// + [JsonPropertyName("service_point"), JsonPropertyOrder(1)] + public GetServicePointByIdResponseBodyServicePoint? ServicePoint { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ServicePoint: ").Append(ServicePoint).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointByIdResponseBodyServicePoint.cs b/ShipEngineSDK/Model/GetServicePointByIdResponseBodyServicePoint.cs new file mode 100644 index 00000000..7c9abe42 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointByIdResponseBodyServicePoint.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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetServicePointByIdResponseBodyServicePoint +/// +public partial class GetServicePointByIdResponseBodyServicePoint +{ + /// + /// Defines Features + /// + [JsonConverter(typeof(FeaturesEnumJsonConverter))] + public class FeaturesEnum + { + private readonly string _value; + + /// + /// Create a new instance of FeaturesEnum with a predefined value. + /// + internal FeaturesEnum() + { + _value = "drop_off_point"; + } + + /// + /// Create a new instance of FeaturesEnum with a custom value. + /// + /// The value of the FeaturesEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public FeaturesEnum(string value) + { + _value = value; + } + + /// + /// Enum DropOffPoint for value: drop_off_point + /// + public static FeaturesEnum DropOffPoint { get; } = new("drop_off_point"); + + + /// + /// Enum PickupPoint for value: pickup_point + /// + public static FeaturesEnum PickupPoint { get; } = new("pickup_point"); + + + /// + /// Enum PrintServices for value: print_services + /// + public static FeaturesEnum PrintServices { get; } = new("print_services"); + + + /// + /// Enum AfterHoursLocker for value: after_hours_locker + /// + public static FeaturesEnum AfterHoursLocker { get; } = new("after_hours_locker"); + + + /// + /// Enum AfterHoursDropbox for value: after_hours_dropbox + /// + public static FeaturesEnum AfterHoursDropbox { get; } = new("after_hours_dropbox"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class FeaturesEnumJsonConverter : JsonConverter + { + public override FeaturesEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new FeaturesEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, FeaturesEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(FeaturesEnum); + } + + /// + /// Service point type + /// + /// Service point type + [JsonConverter(typeof(TypeEnumJsonConverter))] + public class TypeEnum + { + private readonly string _value; + + /// + /// Create a new instance of TypeEnum with a predefined value. + /// + internal TypeEnum() + { + _value = "pudo"; + } + + /// + /// Create a new instance of TypeEnum with a custom value. + /// + /// The value of the TypeEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public TypeEnum(string value) + { + _value = value; + } + + /// + /// Enum Pudo for value: pudo + /// + public static TypeEnum Pudo { get; } = new("pudo"); + + + /// + /// Enum Locker for value: locker + /// + public static TypeEnum Locker { get; } = new("locker"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class TypeEnumJsonConverter : JsonConverter + { + public override TypeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new TypeEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, TypeEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(TypeEnum); + } + + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// PLACE DU CANADA + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public string? AddressLine1 { get; set; } + + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonPropertyOrder(2)] + public string? CarrierCode { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// TRUN + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(3)] + public string? CityLocality { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// My fancy company name + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(4)] + public string? CompanyName { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(5)] + public string? CountryCode { get; set; } + + /// + /// Service features + /// + /// Service features + [JsonPropertyName("features"), JsonPropertyOrder(6)] + public List? Features { get; set; } + + /// + /// Gets or Sets HoursOfOperation + /// + [JsonPropertyName("hours_of_operation"), JsonPropertyOrder(7)] + public ListServicePointsResponseBodyServicePointsInnerHoursOfOperation? HoursOfOperation { get; set; } + + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// 48.842608 + /// + [JsonPropertyName("lat"), JsonPropertyOrder(8)] + public double? Lat { get; set; } + + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// 0.032875 + /// + [JsonPropertyName("long"), JsonPropertyOrder(9)] + public double? Long { get; set; } + + /// + /// Phone number associated + /// + /// Phone number associated + /// + /// 555-555-5555 + /// + [JsonPropertyName("phone_number"), JsonPropertyOrder(10)] + public string? PhoneNumber { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(11)] + public string? PostalCode { get; set; } + + /// + /// Gets or Sets ServiceCodes + /// + [JsonPropertyName("service_codes"), JsonPropertyOrder(12)] + public List? ServiceCodes { get; set; } + + /// + /// A unique identifier for a carrier drop off point. + /// + /// A unique identifier for a carrier drop off point. + /// + /// 614940 + /// + [JsonPropertyName("service_point_id"), JsonPropertyOrder(13)] + public string? ServicePointId { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// TRUN + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(14)] + public string? StateProvince { get; set; } + + /// + /// Service point type + /// + /// Service point type + [JsonPropertyName("type"), JsonPropertyOrder(15)] + public TypeEnum? Type { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointByIdResponseBodyServicePoint {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Features: ").Append(Features).Append("\n"); + sb.Append(" HoursOfOperation: ").Append(HoursOfOperation).Append("\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" ServiceCodes: ").Append(ServiceCodes).Append("\n"); + sb.Append(" ServicePointId: ").Append(ServicePointId).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointsRequest.cs b/ShipEngineSDK/Model/GetServicePointsRequest.cs new file mode 100644 index 00000000..8d8271a3 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequest.cs @@ -0,0 +1,219 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetServicePointsRequest +/// +[JsonConverter(typeof(GetServicePointsRequestJsonConverter))] +//[DataContract(Name = "get_service_points_request")] +public partial class GetServicePointsRequest : AbstractOpenAPISchema +{ + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of GetServicePointsRequestBody. + public GetServicePointsRequest(GetServicePointsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(GetServicePointsRequestBody)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: GetServicePointsRequestBody"); + } + } + } + + /// + /// Get the actual instance of `GetServicePointsRequestBody`. If the actual instance is not `GetServicePointsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of GetServicePointsRequestBody + public GetServicePointsRequestBody GetGetServicePointsRequestBody() + { + return (GetServicePointsRequestBody)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointsRequest {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, GetServicePointsRequest.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for GetServicePointsRequest +/// +public class GetServicePointsRequestJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(GetServicePointsRequestBody)]; + private static readonly HashSet MandatoryFields = ["Providers"]; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, GetServicePointsRequest value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override GetServicePointsRequest? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + GetServicePointsRequest? newGetServicePointsRequest = null; + + + int match = 0; + var matchedTypes = new List(); + + try + { + newGetServicePointsRequest = new GetServicePointsRequest(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("GetServicePointsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into GetServicePointsRequestBody: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newGetServicePointsRequest; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(GetServicePointsRequest).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointsRequestBody.cs b/ShipEngineSDK/Model/GetServicePointsRequestBody.cs new file mode 100644 index 00000000..df304211 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBody.cs @@ -0,0 +1,130 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get service points request body. Caller must provide exactly one of address_query, address, or lat / long pair. +/// +public partial class GetServicePointsRequestBody +{ + + /// + /// An array of shipping service providers and service codes + /// + /// An array of shipping service providers and service codes + [JsonPropertyName("providers"), JsonPropertyOrder(1)] + public required List Providers { get; set; } + + /// + /// Gets or Sets Address + /// + [JsonPropertyName("address"), JsonPropertyOrder(2)] + public GetServicePointsRequestBodyAddress? Address { get; set; } + + /// + /// Unstructured text to search for service points by. + /// + /// Unstructured text to search for service points by. + /// + /// 177A Bleecker Street New York + /// + [JsonPropertyName("address_query"), JsonPropertyOrder(3)] + public string? AddressQuery { get; set; } + + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// 48.874518928233094 + /// + [JsonPropertyName("lat"), JsonPropertyOrder(4)] + public double? Lat { get; set; } + + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// 2.3591775711639404 + /// + [JsonPropertyName("long"), JsonPropertyOrder(5)] + public double? Long { get; set; } + + /// + /// The maximum number of service points to return + /// + /// The maximum number of service points to return + /// + /// 25 + /// + [JsonPropertyName("max_results"), JsonPropertyOrder(6)] + public int? MaxResults { get; set; } + + /// + /// Search radius in kilometers + /// + /// Search radius in kilometers + /// + /// 500 + /// + [JsonPropertyName("radius"), JsonPropertyOrder(7)] + public int? Radius { get; set; } + + /// + /// Gets or Sets Shipment + /// + [JsonPropertyName("shipment"), JsonPropertyOrder(8)] + public GetServicePointsRequestBodyShipment? Shipment { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Providers: ").Append(Providers).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" AddressQuery: ").Append(AddressQuery).Append("\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" MaxResults: ").Append(MaxResults).Append("\n"); + sb.Append(" Radius: ").Append(Radius).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointsRequestBodyAddress.cs b/ShipEngineSDK/Model/GetServicePointsRequestBodyAddress.cs new file mode 100644 index 00000000..c60bc791 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBodyAddress.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Structured address to search by. +/// +public partial class GetServicePointsRequestBodyAddress +{ + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(1)] + public required string CountryCode { get; set; } + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(2)] + public string? AddressLine1 { get; set; } + + /// + /// Gets or Sets AddressLine2 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(3)] + public string? AddressLine2 { get; set; } + + /// + /// Gets or Sets AddressLine3 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(4)] + public string? AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + [JsonPropertyName("city_locality"), JsonPropertyOrder(5)] + public string? CityLocality { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(6)] + public string? PostalCode { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + [JsonPropertyName("state_province"), JsonPropertyOrder(7)] + public string? StateProvince { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBodyAddress {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointsRequestBodyProvidersInner.cs b/ShipEngineSDK/Model/GetServicePointsRequestBodyProvidersInner.cs new file mode 100644 index 00000000..3cc8e102 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBodyProvidersInner.cs @@ -0,0 +1,71 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetServicePointsRequestBodyProvidersInner +/// +public partial class GetServicePointsRequestBodyProvidersInner +{ + + /// + /// Uniquely identifies a carrier connection + /// + /// Uniquely identifies a carrier connection + /// + /// se-123456 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1)] + public string? CarrierId { get; set; } + + /// + /// Gets or Sets ServiceCode + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(2)] + public List? ServiceCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBodyProvidersInner {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointsRequestBodyShipment.cs b/ShipEngineSDK/Model/GetServicePointsRequestBodyShipment.cs new file mode 100644 index 00000000..2736c47c --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBodyShipment.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Shipment information to be used for service point selection +/// +public partial class GetServicePointsRequestBodyShipment +{ + + /// + /// An array of package dimensions + /// + /// An array of package dimensions + [JsonPropertyName("packages"), JsonPropertyOrder(1)] + public List? Packages { get; set; } + + /// + /// Shipment total weight + /// + /// Shipment total weight + [JsonPropertyName("total_weight"), JsonPropertyOrder(2)] + public Weight? TotalWeight { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBodyShipment {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetServicePointsRequestBodyShipmentPackagesInner.cs b/ShipEngineSDK/Model/GetServicePointsRequestBodyShipmentPackagesInner.cs new file mode 100644 index 00000000..f3461eca --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBodyShipmentPackagesInner.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// GetServicePointsRequestBodyShipmentPackagesInner +/// +public partial class GetServicePointsRequestBodyShipmentPackagesInner +{ + + /// + /// The package dimensions + /// + /// The package dimensions + [JsonPropertyName("dimensions"), JsonPropertyOrder(1)] + public Dimensions? Dimensions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBodyShipmentPackagesInner {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetShipmentByExternalIdResponseBody.cs b/ShipEngineSDK/Model/GetShipmentByExternalIdResponseBody.cs new file mode 100644 index 00000000..c7fc1c0e --- /dev/null +++ b/ShipEngineSDK/Model/GetShipmentByExternalIdResponseBody.cs @@ -0,0 +1,312 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get shipment by external id response body +/// +public partial class GetShipmentByExternalIdResponseBody +{ + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(1)] + public required AdvancedShipmentOptions AdvancedOptions { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(2)] + public required string CarrierId { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(3)] + public required DeliveryConfirmation Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(5)] + public required InsuranceProvider InsuranceProvider { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(7)] + public required List Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(8)] + public required ShippingAddress ReturnTo { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(9)] + public required string ServiceCode { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(10)] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(11)] + public required ShippingAddress ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(12)] + public required ShippingAddressTo ShipTo { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(17)] + public string? ComparisonRateType { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(18)] + public required InternationalShipmentOptions Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(19)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(20)] + public string? ExternalShipmentId { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(21)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(22)] + public List? Items { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(23)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(24)] + public string? ShipmentNumber { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(25)] + public string? ShippingRuleId { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(26)] + public List? TaxIdentifiers { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(27)] + public required string WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetShipmentByExternalIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetShipmentByIdResponseBody.cs b/ShipEngineSDK/Model/GetShipmentByIdResponseBody.cs new file mode 100644 index 00000000..85cdc152 --- /dev/null +++ b/ShipEngineSDK/Model/GetShipmentByIdResponseBody.cs @@ -0,0 +1,312 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get shipment by id response body +/// +public partial class GetShipmentByIdResponseBody +{ + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(1)] + public required AdvancedShipmentOptions AdvancedOptions { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(2)] + public required string CarrierId { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(3)] + public required DeliveryConfirmation Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(5)] + public required InsuranceProvider InsuranceProvider { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(7)] + public required List Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(8)] + public required ShippingAddress ReturnTo { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(9)] + public required string ServiceCode { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(10)] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(11)] + public required ShippingAddress ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(12)] + public required ShippingAddressTo ShipTo { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(17)] + public string? ComparisonRateType { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(18)] + public required InternationalShipmentOptions Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(19)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(20)] + public string? ExternalShipmentId { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(21)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(22)] + public List? Items { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(23)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(24)] + public string? ShipmentNumber { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(25)] + public string? ShippingRuleId { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(26)] + public List? TaxIdentifiers { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(27)] + public required string WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetShipmentByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs b/ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs new file mode 100644 index 00000000..9e40aff4 --- /dev/null +++ b/ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs @@ -0,0 +1,239 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get tracking log from label response body +/// +public partial class GetTrackingLogFromLabelResponseBody +{ + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code"), JsonInclude] + public string? CarrierStatusCode { get; set; } + + /// + /// The events that have occured during the lifetime of this tracking number. + /// + /// The events that have occured during the lifetime of this tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("events"), JsonInclude] + public List? Events { get; set; } + + /// + /// Gets or Sets StatusCode + /// + [JsonPropertyName("status_code"), JsonPropertyOrder(3)] + public required StatusCode StatusCode { get; set; } + + /// + /// A tracking number for a package. The format depends on the carrier. + /// + /// A tracking number for a package. The format depends on the carrier. + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number"), JsonPropertyOrder(4)] + public required string TrackingNumber { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("actual_delivery_date"), JsonPropertyOrder(5)] + public DateTimeOffset? ActualDeliveryDate { get; set; } + + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonPropertyOrder(6)] + public string? CarrierCode { get; set; } + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code"), JsonInclude] + public string? CarrierDetailCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public int? CarrierId { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description"), JsonInclude] + public string? CarrierStatusDescription { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("estimated_delivery_date"), JsonPropertyOrder(10)] + public DateTimeOffset? EstimatedDeliveryDate { get; set; } + + /// + /// Exception description + /// + /// Exception description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("exception_description"), JsonInclude] + public string? ExceptionDescription { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(12)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// Status description + /// + /// Status description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Delivered + /// + [JsonPropertyName("status_description"), JsonInclude] + public string? StatusDescription { get; set; } + + /// + /// Gets or Sets StatusDetailCode + /// + [JsonPropertyName("status_detail_code"), JsonPropertyOrder(14)] + public StatusDetailCode? StatusDetailCode { get; set; } + + /// + /// Status detail description + /// + /// Status detail description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your parcel has been successfully delivered. + /// + [JsonPropertyName("status_detail_description"), JsonInclude] + public string? StatusDetailDescription { get; set; } + + /// + /// Carrier Tracking Url, if available + /// + /// Carrier Tracking Url, if available + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetTrackingLogFromLabelResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" ActualDeliveryDate: ").Append(ActualDeliveryDate).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" ExceptionDescription: ").Append(ExceptionDescription).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" StatusDetailCode: ").Append(StatusDetailCode).Append("\n"); + sb.Append(" StatusDetailDescription: ").Append(StatusDetailDescription).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetTrackingLogResponseBody.cs b/ShipEngineSDK/Model/GetTrackingLogResponseBody.cs new file mode 100644 index 00000000..e9889d05 --- /dev/null +++ b/ShipEngineSDK/Model/GetTrackingLogResponseBody.cs @@ -0,0 +1,239 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get tracking log response body +/// +public partial class GetTrackingLogResponseBody +{ + + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonPropertyOrder(1)] + public required string CarrierCode { get; set; } + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code"), JsonInclude] + public string? CarrierDetailCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public int? CarrierId { get; set; } + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code"), JsonInclude] + public string? CarrierStatusCode { get; set; } + + /// + /// The events that have occured during the lifetime of this tracking number. + /// + /// The events that have occured during the lifetime of this tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("events"), JsonInclude] + public List? Events { get; set; } + + /// + /// Gets or Sets StatusCode + /// + [JsonPropertyName("status_code"), JsonPropertyOrder(6)] + public required StatusCode StatusCode { get; set; } + + /// + /// A tracking number for a package. The format depends on the carrier. + /// + /// A tracking number for a package. The format depends on the carrier. + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number"), JsonPropertyOrder(7)] + public required string TrackingNumber { get; set; } + + /// + /// Carrier Tracking Url, if available + /// + /// Carrier Tracking Url, if available + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("actual_delivery_date"), JsonPropertyOrder(9)] + public DateTimeOffset? ActualDeliveryDate { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description"), JsonInclude] + public string? CarrierStatusDescription { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("estimated_delivery_date"), JsonPropertyOrder(11)] + public DateTimeOffset? EstimatedDeliveryDate { get; set; } + + /// + /// Exception description + /// + /// Exception description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("exception_description"), JsonInclude] + public string? ExceptionDescription { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(13)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// Status description + /// + /// Status description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Delivered + /// + [JsonPropertyName("status_description"), JsonInclude] + public string? StatusDescription { get; set; } + + /// + /// Gets or Sets StatusDetailCode + /// + [JsonPropertyName("status_detail_code"), JsonPropertyOrder(15)] + public StatusDetailCode? StatusDetailCode { get; set; } + + /// + /// Status detail description + /// + /// Status detail description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your parcel has been successfully delivered. + /// + [JsonPropertyName("status_detail_description"), JsonInclude] + public string? StatusDetailDescription { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetTrackingLogResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ActualDeliveryDate: ").Append(ActualDeliveryDate).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" ExceptionDescription: ").Append(ExceptionDescription).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" StatusDetailCode: ").Append(StatusDetailCode).Append("\n"); + sb.Append(" StatusDetailDescription: ").Append(StatusDetailDescription).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetWarehouseByIdResponseBody.cs b/ShipEngineSDK/Model/GetWarehouseByIdResponseBody.cs new file mode 100644 index 00000000..2937125f --- /dev/null +++ b/ShipEngineSDK/Model/GetWarehouseByIdResponseBody.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get warehouse by id response body +/// +public partial class GetWarehouseByIdResponseBody +{ + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name"), JsonPropertyOrder(2)] + public required string Name { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address"), JsonPropertyOrder(3)] + public required Address OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address"), JsonPropertyOrder(4)] + public required Address ReturnAddress { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + /// + /// Designates which single warehouse is the default on the account + /// + /// Designates which single warehouse is the default on the account + [JsonPropertyName("is_default"), JsonPropertyOrder(6)] + public bool? IsDefault { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetWarehouseByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/GetWebhookByIdResponseBody.cs b/ShipEngineSDK/Model/GetWebhookByIdResponseBody.cs new file mode 100644 index 00000000..c9b1c7f7 --- /dev/null +++ b/ShipEngineSDK/Model/GetWebhookByIdResponseBody.cs @@ -0,0 +1,93 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A get webhook id response body +/// +public partial class GetWebhookByIdResponseBody +{ + + /// + /// Gets or Sets Event + /// + [JsonPropertyName("event"), JsonPropertyOrder(1)] + public required WebhookEvent Event { get; set; } + + /// + /// The url that the webhook sends the request to + /// + /// The url that the webhook sends the request to + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("url"), JsonPropertyOrder(2)] + public required string Url { get; set; } + + /// + /// A string that uniquely identifies the webhook + /// + /// A string that uniquely identifies the webhook + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("webhook_id"), JsonInclude] + public string? WebhookId { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers"), JsonPropertyOrder(4)] + public List? Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetWebhookByIdResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/IdentifierType.cs b/ShipEngineSDK/Model/IdentifierType.cs new file mode 100644 index 00000000..936f95c6 --- /dev/null +++ b/ShipEngineSDK/Model/IdentifierType.cs @@ -0,0 +1,158 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Tax identifier type for customs declaration |Pickup Type | Description |- -- -- -- -- -- -- --|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`vat` | The tax identifier is a Value Added Tax. |`eori` | The tax identifier is an Economic Operators Registration and Identification Number (EORI). |`ssn` | The tax identifier is a Social Security Number. |`ein` | The tax identifier is an Employer Identification Number (EIN). |`tin` | The tax identifier is a Tax Identification Number (TIN). |`ioss` | The tax identifier is an Import One-Stop Shop (IOSS). |`pan` | The tax identifier is a Permanent Account Number (PAN). |`voec` | The tax identifier is a Norwegian VAT On E-Commerce(VOEC). |`pccc` | The tax identifier is a Personal Customs Clearance Code (PCCC). |`oss` | The tax identifier is an One-Stop Shop (OSS). |`passport` | The tax identifier is a Passport Number. |`abn` | The tax identifier is an Australian Business Number. |`ukims` | The tax identifier is an UK Internal Market Scheme number. +/// +/// Tax identifier type for customs declaration |Pickup Type | Description |- -- -- -- -- -- -- --|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`vat` | The tax identifier is a Value Added Tax. |`eori` | The tax identifier is an Economic Operators Registration and Identification Number (EORI). |`ssn` | The tax identifier is a Social Security Number. |`ein` | The tax identifier is an Employer Identification Number (EIN). |`tin` | The tax identifier is a Tax Identification Number (TIN). |`ioss` | The tax identifier is an Import One-Stop Shop (IOSS). |`pan` | The tax identifier is a Permanent Account Number (PAN). |`voec` | The tax identifier is a Norwegian VAT On E-Commerce(VOEC). |`pccc` | The tax identifier is a Personal Customs Clearance Code (PCCC). |`oss` | The tax identifier is an One-Stop Shop (OSS). |`passport` | The tax identifier is a Passport Number. |`abn` | The tax identifier is an Australian Business Number. |`ukims` | The tax identifier is an UK Internal Market Scheme number. +[JsonConverter(typeof(IdentifierTypeJsonConverter))] +public class IdentifierType +{ + private readonly string _value; + + /// + /// Create a new instance of IdentifierType with a predefined value. + /// + internal IdentifierType() + { + _value = "vat"; + } + + /// + /// Create a new instance of IdentifierType with a custom value. + /// + /// The value of the IdentifierType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public IdentifierType(string value) + { + _value = value; + } + + /// + /// Enum Vat for value: vat + /// + public static IdentifierType Vat { get; } = new("vat"); + + + /// + /// Enum Eori for value: eori + /// + public static IdentifierType Eori { get; } = new("eori"); + + + /// + /// Enum Ssn for value: ssn + /// + public static IdentifierType Ssn { get; } = new("ssn"); + + + /// + /// Enum Ein for value: ein + /// + public static IdentifierType Ein { get; } = new("ein"); + + + /// + /// Enum Tin for value: tin + /// + public static IdentifierType Tin { get; } = new("tin"); + + + /// + /// Enum Ioss for value: ioss + /// + public static IdentifierType Ioss { get; } = new("ioss"); + + + /// + /// Enum Pan for value: pan + /// + public static IdentifierType Pan { get; } = new("pan"); + + + /// + /// Enum Voec for value: voec + /// + public static IdentifierType Voec { get; } = new("voec"); + + + /// + /// Enum Pccc for value: pccc + /// + public static IdentifierType Pccc { get; } = new("pccc"); + + + /// + /// Enum Oss for value: oss + /// + public static IdentifierType Oss { get; } = new("oss"); + + + /// + /// Enum Passport for value: passport + /// + public static IdentifierType Passport { get; } = new("passport"); + + + /// + /// Enum Abn for value: abn + /// + public static IdentifierType Abn { get; } = new("abn"); + + + /// + /// Enum Ukims for value: ukims + /// + public static IdentifierType Ukims { get; } = new("ukims"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is IdentifierType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class IdentifierTypeJsonConverter : JsonConverter +{ + public override IdentifierType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new IdentifierType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, IdentifierType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(IdentifierType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ImporterOfRecords.cs b/ShipEngineSDK/Model/ImporterOfRecords.cs new file mode 100644 index 00000000..4bbca919 --- /dev/null +++ b/ShipEngineSDK/Model/ImporterOfRecords.cs @@ -0,0 +1,174 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// importer of records address, anywhere in the world. +/// +public partial class ImporterOfRecords +{ + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public required string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(2)] + public required string CityLocality { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(3)] + public required string CountryCode { get; set; } + + /// + /// The name of a contact person at this address. Either `name` or the `company_name` field should always be set. + /// + /// The name of a contact person at this address. Either `name` or the `company_name` field should always be set. + /// + /// John Doe + /// + [JsonPropertyName("name"), JsonPropertyOrder(4)] + public required string Name { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(5)] + public required string PostalCode { get; set; } + + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// Unit 408 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(6)] + public string? AddressLine2 { get; set; } + + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// Building #7 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(7)] + public string? AddressLine3 { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. Either `name` or the `company_name` field should always be set. + /// + /// If this is a business address, then the company name should be specified here. Either `name` or the `company_name` field should always be set. + /// + /// The Home Depot + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(8)] + public string? CompanyName { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(9)] + public string? Email { get; set; } + + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// +1 204-253-9411 ext. 123 + /// + [JsonPropertyName("phone"), JsonPropertyOrder(10)] + public string? Phone { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// Manitoba + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(11)] + public string? StateProvince { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ImporterOfRecords {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/InsuranceProvider.cs b/ShipEngineSDK/Model/InsuranceProvider.cs new file mode 100644 index 00000000..1b55180b --- /dev/null +++ b/ShipEngineSDK/Model/InsuranceProvider.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible insurance provider values +/// +/// The possible insurance provider values +[JsonConverter(typeof(InsuranceProviderJsonConverter))] +public class InsuranceProvider +{ + private readonly string _value; + + /// + /// Create a new instance of InsuranceProvider with a predefined value. + /// + internal InsuranceProvider() + { + _value = "none"; + } + + /// + /// Create a new instance of InsuranceProvider with a custom value. + /// + /// The value of the InsuranceProvider + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public InsuranceProvider(string value) + { + _value = value; + } + + /// + /// Enum None for value: none + /// + public static InsuranceProvider None { get; } = new("none"); + + + /// + /// Enum Shipsurance for value: shipsurance + /// + public static InsuranceProvider Shipsurance { get; } = new("shipsurance"); + + + /// + /// Enum Carrier for value: carrier + /// + public static InsuranceProvider Carrier { get; } = new("carrier"); + + + /// + /// Enum ThirdParty for value: third_party + /// + public static InsuranceProvider ThirdParty { get; } = new("third_party"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is InsuranceProvider other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class InsuranceProviderJsonConverter : JsonConverter +{ + public override InsuranceProvider? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new InsuranceProvider(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, InsuranceProvider value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(InsuranceProvider); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/InternationalShipmentOptions.cs b/ShipEngineSDK/Model/InternationalShipmentOptions.cs new file mode 100644 index 00000000..a468bf7f --- /dev/null +++ b/ShipEngineSDK/Model/InternationalShipmentOptions.cs @@ -0,0 +1,115 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Options for international shipments, such as customs declarations. +/// +public partial class InternationalShipmentOptions +{ + + /// + /// The type of contents in this shipment. This may impact import duties or customs treatment. + /// + /// The type of contents in this shipment. This may impact import duties or customs treatment. + [JsonPropertyName("contents"), JsonPropertyOrder(1)] + public required PackageContents Contents { get; set; } + + /// + /// Indicates what to do if a package is unable to be delivered. + /// + /// Indicates what to do if a package is unable to be delivered. + [JsonPropertyName("non_delivery"), JsonPropertyOrder(2)] + public required NonDelivery NonDelivery { get; set; } + + /// + /// Explanation for contents (required if the `contents` is provided as `other`) + /// + /// Explanation for contents (required if the `contents` is provided as `other`) + [JsonPropertyName("contents_explanation"), JsonPropertyOrder(3)] + public string? ContentsExplanation { get; set; } + + /// + /// Customs declarations for each item in the shipment. (Please provide this information under `products` inside `packages`) + /// + /// Customs declarations for each item in the shipment. (Please provide this information under `products` inside `packages`) + [JsonPropertyName("customs_items"), JsonPropertyOrder(4), Obsolete] + public List? CustomsItems { get; set; } + + /// + /// Declaration statement to be placed on the commercial invoice + /// + /// Declaration statement to be placed on the commercial invoice + [JsonPropertyName("declaration"), JsonPropertyOrder(5)] + public string? Declaration { get; set; } + + /// + /// Gets or Sets ImporterOfRecord + /// + [JsonPropertyName("importer_of_record"), JsonPropertyOrder(6)] + public ImporterOfRecords? ImporterOfRecord { get; set; } + + /// + /// Gets or Sets InvoiceAdditionalDetails + /// + [JsonPropertyName("invoice_additional_details"), JsonPropertyOrder(7)] + public InvoiceAdditionalDetails? InvoiceAdditionalDetails { get; set; } + + /// + /// Specifies the supported terms of trade code (incoterms) + /// + /// Specifies the supported terms of trade code (incoterms) + [JsonPropertyName("terms_of_trade_code"), JsonPropertyOrder(8)] + public AllowedIncoterms? TermsOfTradeCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InternationalShipmentOptions {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Contents: ").Append(Contents).Append("\n"); + sb.Append(" NonDelivery: ").Append(NonDelivery).Append("\n"); + sb.Append(" ContentsExplanation: ").Append(ContentsExplanation).Append("\n"); + sb.Append(" CustomsItems: ").Append(CustomsItems).Append("\n"); + sb.Append(" Declaration: ").Append(Declaration).Append("\n"); + sb.Append(" ImporterOfRecord: ").Append(ImporterOfRecord).Append("\n"); + sb.Append(" InvoiceAdditionalDetails: ").Append(InvoiceAdditionalDetails).Append("\n"); + sb.Append(" TermsOfTradeCode: ").Append(TermsOfTradeCode).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/InvoiceAdditionalDetails.cs b/ShipEngineSDK/Model/InvoiceAdditionalDetails.cs new file mode 100644 index 00000000..30c94227 --- /dev/null +++ b/ShipEngineSDK/Model/InvoiceAdditionalDetails.cs @@ -0,0 +1,93 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The additional information to put on commercial invoice +/// +public partial class InvoiceAdditionalDetails +{ + + /// + /// Discount for shipment. + /// + /// Discount for shipment. + [JsonPropertyName("discount"), JsonPropertyOrder(1)] + public MonetaryValue? Discount { get; set; } + + /// + /// Freight Charge for shipment. + /// + /// Freight Charge for shipment. + [JsonPropertyName("freight_charge"), JsonPropertyOrder(2)] + public MonetaryValue? FreightCharge { get; set; } + + /// + /// Insurance Charge for shipment. + /// + /// Insurance Charge for shipment. + [JsonPropertyName("insurance_charge"), JsonPropertyOrder(3)] + public MonetaryValue? InsuranceCharge { get; set; } + + /// + /// Other charge for shipment. + /// + /// Other charge for shipment. + [JsonPropertyName("other_charge"), JsonPropertyOrder(4)] + public MonetaryValue? OtherCharge { get; set; } + + /// + /// Description for the other charge (if provided). + /// + /// Description for the other charge (if provided). + [JsonPropertyName("other_charge_description"), JsonPropertyOrder(5)] + public string? OtherChargeDescription { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InvoiceAdditionalDetails {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Discount: ").Append(Discount).Append("\n"); + sb.Append(" FreightCharge: ").Append(FreightCharge).Append("\n"); + sb.Append(" InsuranceCharge: ").Append(InsuranceCharge).Append("\n"); + sb.Append(" OtherCharge: ").Append(OtherCharge).Append("\n"); + sb.Append(" OtherChargeDescription: ").Append(OtherChargeDescription).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Label.cs b/ShipEngineSDK/Model/Label.cs new file mode 100644 index 00000000..5e37ea93 --- /dev/null +++ b/ShipEngineSDK/Model/Label.cs @@ -0,0 +1,484 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A label represents the physical sticker that you affix to a package to ship it. ShipEngine makes it easy for you to [create labels](https://www.shipengine.com/docs/labels/create-a-label/) and then download them in PDF, PNG, or ZPL format so you can print them. +/// +public partial class Label +{ + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(5)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(7)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(12)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(14), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(15)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(17)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(18)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(19), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(25)] + public string? RmaNumber { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(28), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(32), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(37), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Label {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelChargeEvent.cs b/ShipEngineSDK/Model/LabelChargeEvent.cs new file mode 100644 index 00000000..8068bf7f --- /dev/null +++ b/ShipEngineSDK/Model/LabelChargeEvent.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Determines when the user's account will be charged for the label. +/// +/// Determines when the user's account will be charged for the label. +[JsonConverter(typeof(LabelChargeEventJsonConverter))] +public class LabelChargeEvent +{ + private readonly string _value; + + /// + /// Create a new instance of LabelChargeEvent with a predefined value. + /// + internal LabelChargeEvent() + { + _value = "carrier_default"; + } + + /// + /// Create a new instance of LabelChargeEvent with a custom value. + /// + /// The value of the LabelChargeEvent + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public LabelChargeEvent(string value) + { + _value = value; + } + + /// + /// Enum CarrierDefault for value: carrier_default + /// + public static LabelChargeEvent CarrierDefault { get; } = new("carrier_default"); + + + /// + /// Enum OnCreation for value: on_creation + /// + public static LabelChargeEvent OnCreation { get; } = new("on_creation"); + + + /// + /// Enum OnCarrierAcceptance for value: on_carrier_acceptance + /// + public static LabelChargeEvent OnCarrierAcceptance { get; } = new("on_carrier_acceptance"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is LabelChargeEvent other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class LabelChargeEventJsonConverter : JsonConverter +{ + public override LabelChargeEvent? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new LabelChargeEvent(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, LabelChargeEvent value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(LabelChargeEvent); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelDownload.cs b/ShipEngineSDK/Model/LabelDownload.cs new file mode 100644 index 00000000..2f50ab4f --- /dev/null +++ b/ShipEngineSDK/Model/LabelDownload.cs @@ -0,0 +1,97 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Reference to the various downloadable file formats for the generated label +/// +public partial class LabelDownload +{ + + /// + /// The URL of the linked resource, if any + /// + /// The URL of the linked resource, if any + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("href"), JsonPropertyOrder(1)] + public string? Href { get; set; } + + /// + /// The URL for the pdf generated label + /// + /// The URL for the pdf generated label + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("pdf"), JsonPropertyOrder(2)] + public string? Pdf { get; set; } + + /// + /// The URL for the png generated label + /// + /// The URL for the png generated label + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("png"), JsonPropertyOrder(3)] + public string? Png { get; set; } + + /// + /// The URL for the zpl generated label + /// + /// The URL for the zpl generated label + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("zpl"), JsonPropertyOrder(4)] + public string? Zpl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LabelDownload {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Pdf: ").Append(Pdf).Append("\n"); + sb.Append(" Png: ").Append(Png).Append("\n"); + sb.Append(" Zpl: ").Append(Zpl).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelDownloadType.cs b/ShipEngineSDK/Model/LabelDownloadType.cs new file mode 100644 index 00000000..9a641f54 --- /dev/null +++ b/ShipEngineSDK/Model/LabelDownloadType.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// There are two different ways to [download a label](https://www.shipengine.com/docs/labels/downloading/): |Label Download Type | Description |- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - |`url` |You will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.<br><br>This is the default if `label_download_type` is unspecified. |`inline` |You will receive the Base64-encoded label as part of the response. No need for a second request to download the label. +/// +/// There are two different ways to [download a label](https://www.shipengine.com/docs/labels/downloading/): |Label Download Type | Description |- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - |`url` |You will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.<br><br>This is the default if `label_download_type` is unspecified. |`inline` |You will receive the Base64-encoded label as part of the response. No need for a second request to download the label. +[JsonConverter(typeof(LabelDownloadTypeJsonConverter))] +public class LabelDownloadType +{ + private readonly string _value; + + /// + /// Create a new instance of LabelDownloadType with a predefined value. + /// + internal LabelDownloadType() + { + _value = "url"; + } + + /// + /// Create a new instance of LabelDownloadType with a custom value. + /// + /// The value of the LabelDownloadType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public LabelDownloadType(string value) + { + _value = value; + } + + /// + /// Enum Url for value: url + /// + public static LabelDownloadType Url { get; } = new("url"); + + + /// + /// Enum Inline for value: inline + /// + public static LabelDownloadType Inline { get; } = new("inline"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is LabelDownloadType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class LabelDownloadTypeJsonConverter : JsonConverter +{ + public override LabelDownloadType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new LabelDownloadType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, LabelDownloadType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(LabelDownloadType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelFormat.cs b/ShipEngineSDK/Model/LabelFormat.cs new file mode 100644 index 00000000..19674a78 --- /dev/null +++ b/ShipEngineSDK/Model/LabelFormat.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible file formats in which shipping labels can be downloaded. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. |Label Format | Supported Carriers |- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`pdf` | All carriers |`png` | `fedex` <br> `stamps_com` <br> `ups` <br> `usps` |`zpl` | `access_worldwide` <br> `apc` <br> `asendia` <br> `dhl_global_mail` <br> `dhl_express` <br> `dhl_express_australia` <br> `dhl_express_canada` <br> `dhl_express_worldwide` <br> `dhl_express_uk` <br> `dpd` <br> `endicia` <br> `fedex` <br> `fedex_uk` <br> `firstmile` <br> `imex` <br> `newgistics` <br> `ontrac` <br> `rr_donnelley` <br> `stamps_com` <br> `ups` <br> `usps` +/// +/// The possible file formats in which shipping labels can be downloaded. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. |Label Format | Supported Carriers |- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`pdf` | All carriers |`png` | `fedex` <br> `stamps_com` <br> `ups` <br> `usps` |`zpl` | `access_worldwide` <br> `apc` <br> `asendia` <br> `dhl_global_mail` <br> `dhl_express` <br> `dhl_express_australia` <br> `dhl_express_canada` <br> `dhl_express_worldwide` <br> `dhl_express_uk` <br> `dpd` <br> `endicia` <br> `fedex` <br> `fedex_uk` <br> `firstmile` <br> `imex` <br> `newgistics` <br> `ontrac` <br> `rr_donnelley` <br> `stamps_com` <br> `ups` <br> `usps` +[JsonConverter(typeof(LabelFormatJsonConverter))] +public class LabelFormat +{ + private readonly string _value; + + /// + /// Create a new instance of LabelFormat with a predefined value. + /// + internal LabelFormat() + { + _value = "pdf"; + } + + /// + /// Create a new instance of LabelFormat with a custom value. + /// + /// The value of the LabelFormat + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public LabelFormat(string value) + { + _value = value; + } + + /// + /// Enum Pdf for value: pdf + /// + public static LabelFormat Pdf { get; } = new("pdf"); + + + /// + /// Enum Png for value: png + /// + public static LabelFormat Png { get; } = new("png"); + + + /// + /// Enum Zpl for value: zpl + /// + public static LabelFormat Zpl { get; } = new("zpl"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is LabelFormat other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class LabelFormatJsonConverter : JsonConverter +{ + public override LabelFormat? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new LabelFormat(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, LabelFormat value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(LabelFormat); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelLayout.cs b/ShipEngineSDK/Model/LabelLayout.cs new file mode 100644 index 00000000..88d00229 --- /dev/null +++ b/ShipEngineSDK/Model/LabelLayout.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. +/// +/// The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. +[JsonConverter(typeof(LabelLayoutJsonConverter))] +public class LabelLayout +{ + private readonly string _value; + + /// + /// Create a new instance of LabelLayout with a predefined value. + /// + internal LabelLayout() + { + _value = "4x6"; + } + + /// + /// Create a new instance of LabelLayout with a custom value. + /// + /// The value of the LabelLayout + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public LabelLayout(string value) + { + _value = value; + } + + /// + /// Enum _4x6 for value: 4x6 + /// + public static LabelLayout _4x6 { get; } = new("4x6"); + + + /// + /// Enum Letter for value: letter + /// + public static LabelLayout Letter { get; } = new("letter"); + + + /// + /// Enum A4 for value: A4 + /// + public static LabelLayout A4 { get; } = new("A4"); + + + /// + /// Enum A6 for value: A6 + /// + public static LabelLayout A6 { get; } = new("A6"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is LabelLayout other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class LabelLayoutJsonConverter : JsonConverter +{ + public override LabelLayout? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new LabelLayout(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, LabelLayout value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(LabelLayout); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelMessages.cs b/ShipEngineSDK/Model/LabelMessages.cs new file mode 100644 index 00000000..029226c7 --- /dev/null +++ b/ShipEngineSDK/Model/LabelMessages.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Custom messages to print on the shipping label for the package. These are typically used to print invoice numbers, product numbers, or other internal reference numbers. Not all carriers support label messages. The number of lines and the maximum length of each line also varies by carrier. |Carrier |Max lines |Max line length |- -- -- -- -- -- -- -- -- --|- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- - |USPS (Stamps.com) |3 |60 |FedEx |3 |35 for the first line. 30 for additional lines. |UPS |2 |35 |OnTrac |2 |25 +/// +public partial class LabelMessages +{ + + /// + /// The first line of the custom label message. Some carriers may prefix this line with something like \"REF\", \"Reference\", \"Trx Ref No.\", etc. + /// + /// The first line of the custom label message. Some carriers may prefix this line with something like \"REF\", \"Reference\", \"Trx Ref No.\", etc. + [JsonPropertyName("reference1"), JsonPropertyOrder(1)] + public required string Reference1 { get; set; } + + /// + /// The second line of the custom label message. Some carriers may prefix this line with something like \"INV\", \"Reference 2\", \"Trx Ref No.\", etc. + /// + /// The second line of the custom label message. Some carriers may prefix this line with something like \"INV\", \"Reference 2\", \"Trx Ref No.\", etc. + [JsonPropertyName("reference2"), JsonPropertyOrder(2)] + public required string Reference2 { get; set; } + + /// + /// The third line of the custom label message. Some carriers may prefix this line with something like \"PO\", \"Reference 3\", etc. + /// + /// The third line of the custom label message. Some carriers may prefix this line with something like \"PO\", \"Reference 3\", etc. + [JsonPropertyName("reference3"), JsonPropertyOrder(3)] + public required string Reference3 { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LabelMessages {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Reference1: ").Append(Reference1).Append("\n"); + sb.Append(" Reference2: ").Append(Reference2).Append("\n"); + sb.Append(" Reference3: ").Append(Reference3).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelPackage.cs b/ShipEngineSDK/Model/LabelPackage.cs new file mode 100644 index 00000000..1b73723b --- /dev/null +++ b/ShipEngineSDK/Model/LabelPackage.cs @@ -0,0 +1,226 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A package returned in the response from creating a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/) +/// +public partial class LabelPackage +{ + + /// + /// The package weight + /// + /// The package weight + [JsonPropertyName("weight"), JsonPropertyOrder(1)] + public required Weight Weight { get; set; } + + /// + /// A short description of the package content. Required for shipments moving to, from, and through Mexico. + /// + /// A short description of the package content. Required for shipments moving to, from, and through Mexico. + /// + /// Hand knitted wool socks + /// + [JsonPropertyName("content_description"), JsonPropertyOrder(2)] + public string? ContentDescription { get; set; } + + /// + /// The package dimensions + /// + /// The package dimensions + [JsonPropertyName("dimensions"), JsonPropertyOrder(3)] + public Dimensions? Dimensions { get; set; } + + /// + /// An external package id. + /// + /// An external package id. + [JsonPropertyName("external_package_id"), JsonPropertyOrder(4)] + public string? ExternalPackageId { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public OptionalLink? FormDownload { get; set; } + + /// + /// Whether the package has form documents available for download + /// + /// Whether the package has form documents available for download + [JsonPropertyName("has_form_documents"), JsonPropertyOrder(6)] + public bool? HasFormDocuments { get; set; } + + /// + /// Whether the package has label documents available for download + /// + /// Whether the package has label documents available for download + [JsonPropertyName("has_label_documents"), JsonPropertyOrder(7)] + public bool? HasLabelDocuments { get; set; } + + /// + /// Whether the package has paperless documents available for download + /// + /// Whether the package has paperless documents available for download + [JsonPropertyName("has_paperless_label_documents"), JsonPropertyOrder(8)] + public bool? HasPaperlessLabelDocuments { get; set; } + + /// + /// Whether the package has QR code documents available for download + /// + /// Whether the package has QR code documents available for download + [JsonPropertyName("has_qr_code_documents"), JsonPropertyOrder(9)] + public bool? HasQrCodeDocuments { get; set; } + + /// + /// The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. + /// + /// The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. + [JsonPropertyName("insured_value"), JsonPropertyOrder(10)] + public MonetaryValue? InsuredValue { get; set; } + + /// + /// The label download for the package + /// + /// The label download for the package + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelMessages + /// + [JsonPropertyName("label_messages"), JsonPropertyOrder(12)] + public LabelMessages? LabelMessages { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(13)] + public string? PackageCode { get; set; } + + /// + /// The shipment package id + /// + /// The shipment package id + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("package_id"), JsonInclude] + public int? PackageId { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// The QR code download for the package + /// + /// The QR code download for the package + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("qr_code_download"), JsonInclude] + public OptionalLink? QrCodeDownload { get; set; } + + /// + /// Package sequence + /// + /// Package sequence + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("sequence"), JsonInclude] + public int? Sequence { get; set; } + + /// + /// The tracking number for the package. The format depends on the carrier. + /// + /// The tracking number for the package. The format depends on the carrier. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LabelPackage {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" ContentDescription: ").Append(ContentDescription).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" ExternalPackageId: ").Append(ExternalPackageId).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" HasFormDocuments: ").Append(HasFormDocuments).Append("\n"); + sb.Append(" HasLabelDocuments: ").Append(HasLabelDocuments).Append("\n"); + sb.Append(" HasPaperlessLabelDocuments: ").Append(HasPaperlessLabelDocuments).Append("\n"); + sb.Append(" HasQrCodeDocuments: ").Append(HasQrCodeDocuments).Append("\n"); + sb.Append(" InsuredValue: ").Append(InsuredValue).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelMessages: ").Append(LabelMessages).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" QrCodeDownload: ").Append(QrCodeDownload).Append("\n"); + sb.Append(" Sequence: ").Append(Sequence).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelPackagesInner.cs b/ShipEngineSDK/Model/LabelPackagesInner.cs new file mode 100644 index 00000000..b10b7129 --- /dev/null +++ b/ShipEngineSDK/Model/LabelPackagesInner.cs @@ -0,0 +1,237 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// LabelPackagesInner +/// +public partial class LabelPackagesInner +{ + + /// + /// The package weight + /// + /// The package weight + [JsonPropertyName("weight"), JsonPropertyOrder(1)] + public required Weight Weight { get; set; } + + /// + /// Alternative identifiers associated with this package. + /// + /// Alternative identifiers associated with this package. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// A short description of the package content. Required for shipments moving to, from, and through Mexico. + /// + /// A short description of the package content. Required for shipments moving to, from, and through Mexico. + /// + /// Hand knitted wool socks + /// + [JsonPropertyName("content_description"), JsonPropertyOrder(3)] + public string? ContentDescription { get; set; } + + /// + /// The package dimensions + /// + /// The package dimensions + [JsonPropertyName("dimensions"), JsonPropertyOrder(4)] + public Dimensions? Dimensions { get; set; } + + /// + /// An external package id. + /// + /// An external package id. + [JsonPropertyName("external_package_id"), JsonPropertyOrder(5)] + public string? ExternalPackageId { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("form_download"), JsonInclude] + public OptionalLink? FormDownload { get; set; } + + /// + /// Whether the package has form documents available for download + /// + /// Whether the package has form documents available for download + [JsonPropertyName("has_form_documents"), JsonPropertyOrder(7)] + public bool? HasFormDocuments { get; set; } + + /// + /// Whether the package has label documents available for download + /// + /// Whether the package has label documents available for download + [JsonPropertyName("has_label_documents"), JsonPropertyOrder(8)] + public bool? HasLabelDocuments { get; set; } + + /// + /// Whether the package has paperless documents available for download + /// + /// Whether the package has paperless documents available for download + [JsonPropertyName("has_paperless_label_documents"), JsonPropertyOrder(9)] + public bool? HasPaperlessLabelDocuments { get; set; } + + /// + /// Whether the package has QR code documents available for download + /// + /// Whether the package has QR code documents available for download + [JsonPropertyName("has_qr_code_documents"), JsonPropertyOrder(10)] + public bool? HasQrCodeDocuments { get; set; } + + /// + /// The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. + /// + /// The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. + [JsonPropertyName("insured_value"), JsonPropertyOrder(11)] + public MonetaryValue? InsuredValue { get; set; } + + /// + /// The label download for the package + /// + /// The label download for the package + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// Gets or Sets LabelMessages + /// + [JsonPropertyName("label_messages"), JsonPropertyOrder(13)] + public LabelMessages? LabelMessages { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(14)] + public string? PackageCode { get; set; } + + /// + /// The shipment package id + /// + /// The shipment package id + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("package_id"), JsonInclude] + public int? PackageId { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// The QR code download for the package + /// + /// The QR code download for the package + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("qr_code_download"), JsonInclude] + public OptionalLink? QrCodeDownload { get; set; } + + /// + /// Package sequence + /// + /// Package sequence + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("sequence"), JsonInclude] + public int? Sequence { get; set; } + + /// + /// The tracking number for the package. The format depends on the carrier. + /// + /// The tracking number for the package. The format depends on the carrier. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LabelPackagesInner {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" ContentDescription: ").Append(ContentDescription).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" ExternalPackageId: ").Append(ExternalPackageId).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" HasFormDocuments: ").Append(HasFormDocuments).Append("\n"); + sb.Append(" HasLabelDocuments: ").Append(HasLabelDocuments).Append("\n"); + sb.Append(" HasPaperlessLabelDocuments: ").Append(HasPaperlessLabelDocuments).Append("\n"); + sb.Append(" HasQrCodeDocuments: ").Append(HasQrCodeDocuments).Append("\n"); + sb.Append(" InsuredValue: ").Append(InsuredValue).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" LabelMessages: ").Append(LabelMessages).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" QrCodeDownload: ").Append(QrCodeDownload).Append("\n"); + sb.Append(" Sequence: ").Append(Sequence).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelRequest.cs b/ShipEngineSDK/Model/LabelRequest.cs new file mode 100644 index 00000000..85c5eed5 --- /dev/null +++ b/ShipEngineSDK/Model/LabelRequest.cs @@ -0,0 +1,153 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A label represents the physical sticker that you affix to a package to ship it. ShipEngine makes it easy for you to [create labels](https://www.shipengine.com/docs/labels/create-a-label/) and then download them in PDF, PNG, or ZPL format so you can print them. +/// +public partial class LabelRequest +{ + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(1)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(2)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(3)] + public bool? IsReturnLabel { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(4), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(5)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(6)] + public string? LabelImageId { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(7)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(8), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(9)] + public string? RmaNumber { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(10)] + public ShipmentRequest? Shipment { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(11), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(12), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LabelRequest {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/LabelStatus.cs b/ShipEngineSDK/Model/LabelStatus.cs new file mode 100644 index 00000000..9a345304 --- /dev/null +++ b/ShipEngineSDK/Model/LabelStatus.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible statuses that a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/) can be in. |Status |Description |:- -- -- -- -- -- -|:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`processing` |When labels are created in a [batch](https://www.shipengine.com/docs/labels/bulk/), it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in `processing` status. |`completed` |The label was successfully created |`error` |The label could not be created due to an error, such as an invalid delivery address |`voided` |The label has been [voided](https://www.shipengine.com/docs/labels/voiding/) +/// +/// The possible statuses that a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/) can be in. |Status |Description |:- -- -- -- -- -- -|:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`processing` |When labels are created in a [batch](https://www.shipengine.com/docs/labels/bulk/), it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in `processing` status. |`completed` |The label was successfully created |`error` |The label could not be created due to an error, such as an invalid delivery address |`voided` |The label has been [voided](https://www.shipengine.com/docs/labels/voiding/) +[JsonConverter(typeof(LabelStatusJsonConverter))] +public class LabelStatus +{ + private readonly string _value; + + /// + /// Create a new instance of LabelStatus with a predefined value. + /// + internal LabelStatus() + { + _value = "processing"; + } + + /// + /// Create a new instance of LabelStatus with a custom value. + /// + /// The value of the LabelStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public LabelStatus(string value) + { + _value = value; + } + + /// + /// Enum Processing for value: processing + /// + public static LabelStatus Processing { get; } = new("processing"); + + + /// + /// Enum Completed for value: completed + /// + public static LabelStatus Completed { get; } = new("completed"); + + + /// + /// Enum Error for value: error + /// + public static LabelStatus Error { get; } = new("error"); + + + /// + /// Enum Voided for value: voided + /// + public static LabelStatus Voided { get; } = new("voided"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is LabelStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class LabelStatusJsonConverter : JsonConverter +{ + public override LabelStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new LabelStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, LabelStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(LabelStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Link.cs b/ShipEngineSDK/Model/Link.cs new file mode 100644 index 00000000..5725f8a1 --- /dev/null +++ b/ShipEngineSDK/Model/Link.cs @@ -0,0 +1,72 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A link to a related resource +/// +public partial class Link +{ + + /// + /// The URL of the linked resource, if any + /// + /// The URL of the linked resource, if any + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("href"), JsonPropertyOrder(1)] + public required string Href { get; set; } + + /// + /// The type of resource, or the type of relationship to the parent resource + /// + /// The type of resource, or the type of relationship to the parent resource + [JsonPropertyName("type"), JsonPropertyOrder(2)] + public string? Type { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Link {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListAccountImagesResponseBody.cs b/ShipEngineSDK/Model/ListAccountImagesResponseBody.cs new file mode 100644 index 00000000..7eb2312d --- /dev/null +++ b/ShipEngineSDK/Model/ListAccountImagesResponseBody.cs @@ -0,0 +1,177 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list account images response body +/// +public partial class ListAccountImagesResponseBody +{ + + /// + /// Type of data of the elements in the list + /// + public class ListAccountImagesResponseBodyItem + { + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonInclude] + public string? LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name"), JsonPropertyOrder(2)] + public string? Name { get; set; } + + /// + /// Indicates whether this image is set as default. + /// + /// Indicates whether this image is set as default. + /// + /// false + /// + [JsonPropertyName("is_default"), JsonPropertyOrder(3)] + public bool? IsDefault { get; set; } + + /// + /// The file type of the image. + /// + /// The file type of the image. + [JsonPropertyName("image_content_type"), JsonPropertyOrder(4)] + public string? ImageContentType { get; set; } + + /// + /// A base64 encoded string representation of the image. + /// + /// A base64 encoded string representation of the image. + /// + /// iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg== + /// + [JsonPropertyName("image_data"), JsonPropertyOrder(5)] + public string? ImageData { get; set; } + + /// + /// The date and time that the image was created in ShipEngine. + /// + /// The date and time that the image was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + } + /// + /// Image List + /// + /// Image List + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("images"), JsonInclude] + public List? Images { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links"), JsonPropertyOrder(2)] + public required PaginationLink Links { get; set; } + + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// 1 + /// + [JsonPropertyName("page"), JsonPropertyOrder(3)] + public required int Page { get; set; } + + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// 4 + /// + [JsonPropertyName("pages"), JsonPropertyOrder(4)] + public required int Pages { get; set; } + + /// + /// The total number of items across all pages of results + /// + /// The total number of items across all pages of results + /// + /// 2750 + /// + [JsonPropertyName("total"), JsonPropertyOrder(5)] + public required int Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListAccountImagesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Images: ").Append(Images).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListAccountSettingsBody.cs b/ShipEngineSDK/Model/ListAccountSettingsBody.cs new file mode 100644 index 00000000..1138a3e5 --- /dev/null +++ b/ShipEngineSDK/Model/ListAccountSettingsBody.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An account settings list response body +/// +public partial class ListAccountSettingsBody +{ + + /// + /// Gets or Sets DefaultLabelLayout + /// + [JsonPropertyName("default_label_layout"), JsonPropertyOrder(1)] + public DefaultLabelLayout? DefaultLabelLayout { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListAccountSettingsBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" DefaultLabelLayout: ").Append(DefaultLabelLayout).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListAccountSettingsImagesResponseBody.cs b/ShipEngineSDK/Model/ListAccountSettingsImagesResponseBody.cs new file mode 100644 index 00000000..f65d70c2 --- /dev/null +++ b/ShipEngineSDK/Model/ListAccountSettingsImagesResponseBody.cs @@ -0,0 +1,177 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ListAccountSettingsImagesResponseBody +/// +public partial class ListAccountSettingsImagesResponseBody +{ + + /// + /// Type of data of the elements in the list + /// + public class ListAccountSettingsImagesResponseBodyItem + { + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonInclude] + public string? LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name"), JsonPropertyOrder(2)] + public string? Name { get; set; } + + /// + /// Indicates whether this image is set as default. + /// + /// Indicates whether this image is set as default. + /// + /// false + /// + [JsonPropertyName("is_default"), JsonPropertyOrder(3)] + public bool? IsDefault { get; set; } + + /// + /// The file type of the image. + /// + /// The file type of the image. + [JsonPropertyName("image_content_type"), JsonPropertyOrder(4)] + public string? ImageContentType { get; set; } + + /// + /// A base64 encoded string representation of the image. + /// + /// A base64 encoded string representation of the image. + /// + /// iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg== + /// + [JsonPropertyName("image_data"), JsonPropertyOrder(5)] + public string? ImageData { get; set; } + + /// + /// The date and time that the image was created in ShipEngine. + /// + /// The date and time that the image was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + } + /// + /// Image List + /// + /// Image List + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("images"), JsonInclude] + public List? Images { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links"), JsonPropertyOrder(2)] + public required PaginationLink Links { get; set; } + + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// 1 + /// + [JsonPropertyName("page"), JsonPropertyOrder(3)] + public required int Page { get; set; } + + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// 4 + /// + [JsonPropertyName("pages"), JsonPropertyOrder(4)] + public required int Pages { get; set; } + + /// + /// The total number of items across all pages of results + /// + /// The total number of items across all pages of results + /// + /// 2750 + /// + [JsonPropertyName("total"), JsonPropertyOrder(5)] + public required int Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListAccountSettingsImagesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Images: ").Append(Images).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListBatchErrorsResponseBody.cs b/ShipEngineSDK/Model/ListBatchErrorsResponseBody.cs new file mode 100644 index 00000000..239fb0ef --- /dev/null +++ b/ShipEngineSDK/Model/ListBatchErrorsResponseBody.cs @@ -0,0 +1,74 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A batch errors response body +/// +public partial class ListBatchErrorsResponseBody +{ + + /// + /// The errors currently associated with the batch + /// + /// The errors currently associated with the batch + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// Gets or Sets Links + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("links"), JsonInclude] + public PaginationLink? Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBatchErrorsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListBatchesResponseBody.cs b/ShipEngineSDK/Model/ListBatchesResponseBody.cs new file mode 100644 index 00000000..2b915dee --- /dev/null +++ b/ShipEngineSDK/Model/ListBatchesResponseBody.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list batch response body +/// +public partial class ListBatchesResponseBody +{ + + /// + /// Batch List + /// + /// Batch List + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("batches"), JsonInclude] + public List? Batches { get; set; } + + /// + /// Gets or Sets Links + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("links"), JsonInclude] + public PaginationLink? Links { get; set; } + + /// + /// The page that is currently being read + /// + /// The page that is currently being read + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("page"), JsonInclude] + public int? Page { get; set; } + + /// + /// The total number of batch pages the API call returned + /// + /// The total number of batch pages the API call returned + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 10 + /// + [JsonPropertyName("pages"), JsonInclude] + public int? Pages { get; set; } + + /// + /// The total number of batches the API call returned + /// + /// The total number of batches the API call returned + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 10 + /// + [JsonPropertyName("total"), JsonInclude] + public long? Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBatchesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Batches: ").Append(Batches).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListCarrierPackageTypesResponseBody.cs b/ShipEngineSDK/Model/ListCarrierPackageTypesResponseBody.cs new file mode 100644 index 00000000..a00f6daa --- /dev/null +++ b/ShipEngineSDK/Model/ListCarrierPackageTypesResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list carrier package types response body +/// +public partial class ListCarrierPackageTypesResponseBody +{ + + /// + /// An array of custom package types + /// + /// An array of custom package types + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListCarrierPackageTypesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Packages: ").Append(Packages).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListCarrierServicesResponseBody.cs b/ShipEngineSDK/Model/ListCarrierServicesResponseBody.cs new file mode 100644 index 00000000..10f82859 --- /dev/null +++ b/ShipEngineSDK/Model/ListCarrierServicesResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A carrier list services response body +/// +public partial class ListCarrierServicesResponseBody +{ + + /// + /// An array of services associated with the carrier + /// + /// An array of services associated with the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("services"), JsonInclude] + public List? Services { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListCarrierServicesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Services: ").Append(Services).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListCarriersResponseBody.cs b/ShipEngineSDK/Model/ListCarriersResponseBody.cs new file mode 100644 index 00000000..e8f276bc --- /dev/null +++ b/ShipEngineSDK/Model/ListCarriersResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A carrier list response body +/// +public partial class ListCarriersResponseBody +{ + + /// + /// The carrier response body + /// + /// The carrier response body + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carriers"), JsonInclude] + public List? Carriers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListCarriersResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Carriers: ").Append(Carriers).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListLabelsResponseBody.cs b/ShipEngineSDK/Model/ListLabelsResponseBody.cs new file mode 100644 index 00000000..b9c28854 --- /dev/null +++ b/ShipEngineSDK/Model/ListLabelsResponseBody.cs @@ -0,0 +1,418 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list label response body +/// +public partial class ListLabelsResponseBody +{ + + /// + /// Type of data of the elements in the list + /// + public class ListLabelsResponseBodyItem + { + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id"), JsonInclude] + public string? LabelId { get; set; } + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("status"), JsonInclude] + public LabelStatus? Status { get; set; } + + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment"), JsonPropertyOrder(4), JsonWriteOnly] + public Shipment? Shipment { get; set; } + + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The date and time that the label was created in ShipEngine. + /// + /// The date and time that the label was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + /// + /// The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. + [JsonPropertyName("shipment_cost"), JsonInclude] + public MonetaryValue? ShipmentCost { get; set; } + + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + /// + /// The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. + [JsonPropertyName("insurance_cost"), JsonInclude] + public MonetaryValue? InsuranceCost { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// The tracking number for the package. Tracking number formats vary across carriers. + /// + /// 782758401696 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + /// + /// Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. + [JsonPropertyName("is_return_label"), JsonPropertyOrder(12)] + public bool? IsReturnLabel { get; set; } + + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + /// + /// An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. + [JsonPropertyName("rma_number"), JsonPropertyOrder(13)] + public string? RmaNumber { get; set; } + + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + /// + /// Indicates whether this is an international shipment. That is, the originating country and destination country are different. + [JsonPropertyName("is_international"), JsonInclude] + public bool? IsInternational { get; set; } + + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id"), JsonInclude] + public string? BatchId { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event"), JsonPropertyOrder(17)] + public LabelChargeEvent? ChargeEvent { get; set; } + + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. + /// + /// se-28529731 + /// + [JsonPropertyName("outbound_label_id"), JsonPropertyOrder(18), JsonWriteOnly] + public string? OutboundLabelId { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + /// + /// Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. + [JsonPropertyName("test_label"), JsonPropertyOrder(20), JsonWriteOnly, Obsolete] + public bool? TestLabel { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonInclude] + public string? PackageCode { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(22), JsonWriteOnly] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + /// + /// Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + [JsonPropertyName("voided"), JsonInclude] + public bool? Voided { get; set; } + + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("voided_at"), JsonInclude] + public DateTimeOffset? VoidedAt { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(25), JsonWriteOnly] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + /// + /// The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. + [JsonPropertyName("label_format"), JsonPropertyOrder(26)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(27)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + /// + /// The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + [JsonPropertyName("label_layout"), JsonPropertyOrder(28)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + /// + /// Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// The label image resource that was used to create a custom label image. + /// + /// The label image resource that was used to create a custom label image. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonPropertyOrder(30)] + public string? LabelImageId { get; set; } + + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// The current status of the package, such as `in_transit` or `delivered` + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status"), JsonInclude] + public TrackingStatus? TrackingStatus { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download"), JsonInclude] + public LabelDownload? LabelDownload { get; set; } + + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + /// + /// The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. + [JsonPropertyName("form_download"), JsonInclude] + public Link? FormDownload { get; set; } + + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + /// + /// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + [JsonPropertyName("paperless_download"), JsonInclude] + public PaperlessDownload? PaperlessDownload { get; set; } + + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + /// + /// The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. + [JsonPropertyName("insurance_claim"), JsonInclude] + public Link? InsuranceClaim { get; set; } + + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + /// + /// The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + /// + /// Additional information some carriers may provide by which to identify a given label in their system. + [JsonPropertyName("alternative_identifiers"), JsonInclude] + public List? AlternativeIdentifiers { get; set; } + + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + } + /// + /// The labels that matched the query criteria. If no matching labels were found, then this array is empty; otherwise, it contains one page of results. The last page of results may have fewer labels than the `page_size`. + /// + /// The labels that matched the query criteria. If no matching labels were found, then this array is empty; otherwise, it contains one page of results. The last page of results may have fewer labels than the `page_size`. + [JsonPropertyName("labels"), JsonPropertyOrder(1)] + public required List Labels { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links"), JsonPropertyOrder(2)] + public required PaginationLink Links { get; set; } + + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// 1 + /// + [JsonPropertyName("page"), JsonPropertyOrder(3)] + public required int Page { get; set; } + + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// 4 + /// + [JsonPropertyName("pages"), JsonPropertyOrder(4)] + public required int Pages { get; set; } + + /// + /// The total number of items across all pages of results + /// + /// The total number of items across all pages of results + /// + /// 2750 + /// + [JsonPropertyName("total"), JsonPropertyOrder(5)] + public required int Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListLabelsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Labels: ").Append(Labels).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListManifestsResponseBody.cs b/ShipEngineSDK/Model/ListManifestsResponseBody.cs new file mode 100644 index 00000000..5166dcc8 --- /dev/null +++ b/ShipEngineSDK/Model/ListManifestsResponseBody.cs @@ -0,0 +1,117 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list manifests response body +/// +public partial class ListManifestsResponseBody +{ + + /// + /// Helpful links to other pages of results + /// + /// Helpful links to other pages of results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("links"), JsonInclude] + public PaginationLink? Links { get; set; } + + /// + /// The list of available manifests + /// + /// The list of available manifests + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("manifests"), JsonInclude] + public List? Manifests { get; set; } + + /// + /// Current page of the list manifests results + /// + /// Current page of the list manifests results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("page"), JsonInclude] + public int? Page { get; set; } + + /// + /// Total number of pages for list manifests results + /// + /// Total number of pages for list manifests results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 4 + /// + [JsonPropertyName("pages"), JsonInclude] + public int? Pages { get; set; } + + /// + /// The total number of manifests returned + /// + /// The total number of manifests returned + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("total"), JsonInclude] + public long? Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListManifestsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Manifests: ").Append(Manifests).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListPackageTypesResponseBody.cs b/ShipEngineSDK/Model/ListPackageTypesResponseBody.cs new file mode 100644 index 00000000..6498238b --- /dev/null +++ b/ShipEngineSDK/Model/ListPackageTypesResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list package types response body +/// +public partial class ListPackageTypesResponseBody +{ + + /// + /// An array of custom package types + /// + /// An array of custom package types + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("packages"), JsonInclude] + public List? Packages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListPackageTypesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Packages: ").Append(Packages).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListPickupResponseBody.cs b/ShipEngineSDK/Model/ListPickupResponseBody.cs new file mode 100644 index 00000000..433d6229 --- /dev/null +++ b/ShipEngineSDK/Model/ListPickupResponseBody.cs @@ -0,0 +1,114 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list pickup response body +/// +public partial class ListPickupResponseBody +{ + + /// + /// Helpful links to other pages of results + /// + /// Helpful links to other pages of results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("links"), JsonInclude] + public PaginationLink? Links { get; set; } + + /// + /// Current page of the list pickups results + /// + /// Current page of the list pickups results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("page"), JsonInclude] + public int? Page { get; set; } + + /// + /// Total number of pages for list pickups results + /// + /// Total number of pages for list pickups results + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 4 + /// + [JsonPropertyName("pages"), JsonInclude] + public int? Pages { get; set; } + + /// + /// An array of pickups associated with the user's account. + /// + /// An array of pickups associated with the user's account. + [JsonPropertyName("pickups"), JsonPropertyOrder(4)] + public required List Pickups { get; set; } + + /// + /// The total number of pickups returned + /// + /// The total number of pickups returned + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 3 + /// + [JsonPropertyName("total"), JsonInclude] + public long? Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListPickupResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Pickups: ").Append(Pickups).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListServicePointsResponseBody.cs b/ShipEngineSDK/Model/ListServicePointsResponseBody.cs new file mode 100644 index 00000000..2b293515 --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBody.cs @@ -0,0 +1,93 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list service points response body +/// +public partial class ListServicePointsResponseBody +{ + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// 48.842608 + /// + [JsonPropertyName("lat"), JsonPropertyOrder(2)] + public double? Lat { get; set; } + + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// 0.032875 + /// + [JsonPropertyName("long"), JsonPropertyOrder(3)] + public double? Long { get; set; } + + /// + /// Gets or Sets ServicePoints + /// + [JsonPropertyName("service_points"), JsonPropertyOrder(4)] + public List? ServicePoints { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" ServicePoints: ").Append(ServicePoints).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInner.cs b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInner.cs new file mode 100644 index 00000000..88a3e33e --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInner.cs @@ -0,0 +1,352 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ListServicePointsResponseBodyServicePointsInner +/// +public partial class ListServicePointsResponseBodyServicePointsInner +{ + /// + /// Defines Features + /// + [JsonConverter(typeof(FeaturesEnumJsonConverter))] + public class FeaturesEnum + { + private readonly string _value; + + /// + /// Create a new instance of FeaturesEnum with a predefined value. + /// + internal FeaturesEnum() + { + _value = "drop_off_point"; + } + + /// + /// Create a new instance of FeaturesEnum with a custom value. + /// + /// The value of the FeaturesEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public FeaturesEnum(string value) + { + _value = value; + } + + /// + /// Enum DropOffPoint for value: drop_off_point + /// + public static FeaturesEnum DropOffPoint { get; } = new("drop_off_point"); + + + /// + /// Enum PickupPoint for value: pickup_point + /// + public static FeaturesEnum PickupPoint { get; } = new("pickup_point"); + + + /// + /// Enum PrintServices for value: print_services + /// + public static FeaturesEnum PrintServices { get; } = new("print_services"); + + + /// + /// Enum AfterHoursLocker for value: after_hours_locker + /// + public static FeaturesEnum AfterHoursLocker { get; } = new("after_hours_locker"); + + + /// + /// Enum AfterHoursDropbox for value: after_hours_dropbox + /// + public static FeaturesEnum AfterHoursDropbox { get; } = new("after_hours_dropbox"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class FeaturesEnumJsonConverter : JsonConverter + { + public override FeaturesEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new FeaturesEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, FeaturesEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(FeaturesEnum); + } + + /// + /// Service point type + /// + /// Service point type + [JsonConverter(typeof(TypeEnumJsonConverter))] + public class TypeEnum + { + private readonly string _value; + + /// + /// Create a new instance of TypeEnum with a predefined value. + /// + internal TypeEnum() + { + _value = "pudo"; + } + + /// + /// Create a new instance of TypeEnum with a custom value. + /// + /// The value of the TypeEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public TypeEnum(string value) + { + _value = value; + } + + /// + /// Enum Pudo for value: pudo + /// + public static TypeEnum Pudo { get; } = new("pudo"); + + + /// + /// Enum Locker for value: locker + /// + public static TypeEnum Locker { get; } = new("locker"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class TypeEnumJsonConverter : JsonConverter + { + public override TypeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new TypeEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, TypeEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(TypeEnum); + } + + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// PLACE DU CANADA + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public string? AddressLine1 { get; set; } + + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonPropertyOrder(2)] + public string? CarrierCode { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// TRUN + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(3)] + public string? CityLocality { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// My fancy company name + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(4)] + public string? CompanyName { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(5)] + public string? CountryCode { get; set; } + + /// + /// Distance in meters + /// + /// Distance in meters + /// + /// 728.9959308847579 + /// + [JsonPropertyName("distance_in_meters"), JsonPropertyOrder(6)] + public double? DistanceInMeters { get; set; } + + /// + /// Service features + /// + /// Service features + [JsonPropertyName("features"), JsonPropertyOrder(7)] + public List? Features { get; set; } + + /// + /// Gets or Sets HoursOfOperation + /// + [JsonPropertyName("hours_of_operation"), JsonPropertyOrder(8)] + public ListServicePointsResponseBodyServicePointsInnerHoursOfOperation? HoursOfOperation { get; set; } + + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html + /// + /// 48.842608 + /// + [JsonPropertyName("lat"), JsonPropertyOrder(9)] + public double? Lat { get; set; } + + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html + /// + /// 0.032875 + /// + [JsonPropertyName("long"), JsonPropertyOrder(10)] + public double? Long { get; set; } + + /// + /// Phone number associated + /// + /// Phone number associated + /// + /// 555-555-5555 + /// + [JsonPropertyName("phone_number"), JsonPropertyOrder(11)] + public string? PhoneNumber { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(12)] + public string? PostalCode { get; set; } + + /// + /// Gets or Sets ServiceCodes + /// + [JsonPropertyName("service_codes"), JsonPropertyOrder(13)] + public List? ServiceCodes { get; set; } + + /// + /// A unique identifier for a carrier drop off point. + /// + /// A unique identifier for a carrier drop off point. + /// + /// 614940 + /// + [JsonPropertyName("service_point_id"), JsonPropertyOrder(14)] + public string? ServicePointId { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// TRUN + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(15)] + public string? StateProvince { get; set; } + + /// + /// Service point type + /// + /// Service point type + [JsonPropertyName("type"), JsonPropertyOrder(16)] + public TypeEnum? Type { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBodyServicePointsInner {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" DistanceInMeters: ").Append(DistanceInMeters).Append("\n"); + sb.Append(" Features: ").Append(Features).Append("\n"); + sb.Append(" HoursOfOperation: ").Append(HoursOfOperation).Append("\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" ServiceCodes: ").Append(ServiceCodes).Append("\n"); + sb.Append(" ServicePointId: ").Append(ServicePointId).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.cs b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.cs new file mode 100644 index 00000000..2940d7d9 --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.cs @@ -0,0 +1,102 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Hours of operation +/// +public partial class ListServicePointsResponseBodyServicePointsInnerHoursOfOperation +{ + + /// + /// Gets or Sets Friday + /// + [JsonPropertyName("friday"), JsonPropertyOrder(1)] + public List? Friday { get; set; } + + /// + /// Gets or Sets Monday + /// + [JsonPropertyName("monday"), JsonPropertyOrder(2)] + public List? Monday { get; set; } + + /// + /// Gets or Sets Saturday + /// + [JsonPropertyName("saturday"), JsonPropertyOrder(3)] + public List? Saturday { get; set; } + + /// + /// Gets or Sets Sunday + /// + [JsonPropertyName("sunday"), JsonPropertyOrder(4)] + public List? Sunday { get; set; } + + /// + /// Gets or Sets Thursday + /// + [JsonPropertyName("thursday"), JsonPropertyOrder(5)] + public List? Thursday { get; set; } + + /// + /// Gets or Sets Tuesday + /// + [JsonPropertyName("tuesday"), JsonPropertyOrder(6)] + public List? Tuesday { get; set; } + + /// + /// Gets or Sets Wednesday + /// + [JsonPropertyName("wednesday"), JsonPropertyOrder(7)] + public List? Wednesday { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBodyServicePointsInnerHoursOfOperation {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Friday: ").Append(Friday).Append("\n"); + sb.Append(" Monday: ").Append(Monday).Append("\n"); + sb.Append(" Saturday: ").Append(Saturday).Append("\n"); + sb.Append(" Sunday: ").Append(Sunday).Append("\n"); + sb.Append(" Thursday: ").Append(Thursday).Append("\n"); + sb.Append(" Tuesday: ").Append(Tuesday).Append("\n"); + sb.Append(" Wednesday: ").Append(Wednesday).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.cs b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.cs new file mode 100644 index 00000000..0cd97c9a --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.cs @@ -0,0 +1,75 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner +/// +public partial class ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner +{ + + /// + /// Closing time + /// + /// Closing time + /// + /// 12:00 + /// + [JsonPropertyName("close"), JsonPropertyOrder(1)] + public string? Close { get; set; } + + /// + /// Opening time + /// + /// Opening time + /// + /// 09:15 + /// + [JsonPropertyName("open"), JsonPropertyOrder(2)] + public string? Open { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Close: ").Append(Close).Append("\n"); + sb.Append(" Open: ").Append(Open).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListShipmentRatesResponseBody.cs b/ShipEngineSDK/Model/ListShipmentRatesResponseBody.cs new file mode 100644 index 00000000..4a9f4bd1 --- /dev/null +++ b/ShipEngineSDK/Model/ListShipmentRatesResponseBody.cs @@ -0,0 +1,131 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list shipment rates response body +/// +public partial class ListShipmentRatesResponseBody +{ + + /// + /// When the rate was created + /// + /// When the rate was created + /// + /// se-28529731 + /// + [JsonPropertyName("created_at"), JsonPropertyOrder(1)] + public required string CreatedAt { get; set; } + + /// + /// Gets or Sets Errors + /// + [JsonPropertyName("errors"), JsonPropertyOrder(2)] + public required List Errors { get; set; } + + /// + /// An array of invalid shipment rates + /// + /// An array of invalid shipment rates + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("invalid_rates"), JsonInclude] + public List? InvalidRates { get; set; } + + /// + /// A string that uniquely identifies the rate request + /// + /// A string that uniquely identifies the rate request + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("rate_request_id"), JsonInclude] + public string? RateRequestId { get; set; } + + /// + /// An array of shipment rates + /// + /// An array of shipment rates + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rates"), JsonInclude] + public List? Rates { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public RateResponseStatus? Status { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListShipmentRatesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" InvalidRates: ").Append(InvalidRates).Append("\n"); + sb.Append(" RateRequestId: ").Append(RateRequestId).Append("\n"); + sb.Append(" Rates: ").Append(Rates).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListShipmentsResponseBody.cs b/ShipEngineSDK/Model/ListShipmentsResponseBody.cs new file mode 100644 index 00000000..05620e56 --- /dev/null +++ b/ShipEngineSDK/Model/ListShipmentsResponseBody.cs @@ -0,0 +1,108 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A list shipment response body +/// +public partial class ListShipmentsResponseBody +{ + + /// + /// Gets or Sets Links + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("links"), JsonInclude] + public PaginationLink? Links { get; set; } + + /// + /// Gets or Sets Page + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("page"), JsonInclude] + public int? Page { get; set; } + + /// + /// Gets or Sets Pages + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pages"), JsonInclude] + public int? Pages { get; set; } + + /// + /// The list of shipments returned by the api call + /// + /// The list of shipments returned by the api call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipments"), JsonInclude] + public List? Shipments { get; set; } + + /// + /// Total number of shipments returned by the api call + /// + /// Total number of shipments returned by the api call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1990 + /// + [JsonPropertyName("total"), JsonInclude] + public long? Total { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListShipmentsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListTagsResponseBody.cs b/ShipEngineSDK/Model/ListTagsResponseBody.cs new file mode 100644 index 00000000..9faa6626 --- /dev/null +++ b/ShipEngineSDK/Model/ListTagsResponseBody.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Response body from a successful GET /tags API call +/// +public partial class ListTagsResponseBody +{ + + /// + /// The array of tags returned by the API call + /// + /// The array of tags returned by the API call + [JsonPropertyName("tags"), JsonPropertyOrder(1)] + public List? Tags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListTagsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Tags: ").Append(Tags).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ListWarehousesResponseBody.cs b/ShipEngineSDK/Model/ListWarehousesResponseBody.cs new file mode 100644 index 00000000..f8e8e3ec --- /dev/null +++ b/ShipEngineSDK/Model/ListWarehousesResponseBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A warehouse list response body +/// +public partial class ListWarehousesResponseBody +{ + + /// + /// The array of warehouses returned by the API call + /// + /// The array of warehouses returned by the API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("warehouses"), JsonInclude] + public List? Warehouses { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListWarehousesResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Warehouses: ").Append(Warehouses).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Manifest.cs b/ShipEngineSDK/Model/Manifest.cs new file mode 100644 index 00000000..45d26d95 --- /dev/null +++ b/ShipEngineSDK/Model/Manifest.cs @@ -0,0 +1,186 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Used for combining packages into one scannable form that a carrier can use when picking up a large number of shipments +/// +public partial class Manifest +{ + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The date-time that the manifest was created + /// + /// The date-time that the manifest was created + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("form_id"), JsonInclude] + public string? FormId { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("label_ids"), JsonInclude] + public List? LabelIds { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("manifest_download"), JsonInclude] + public ManifestDownload? ManifestDownload { get; set; } + + /// + /// A string that uniquely identifies the manifest + /// + /// A string that uniquely identifies the manifest + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id"), JsonInclude] + public string? ManifestId { get; set; } + + /// + /// The date-time that the manifests shipments will be picked up + /// + /// The date-time that the manifests shipments will be picked up + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-07-12T13:37:39.050Z + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 100 + /// + [JsonPropertyName("shipments"), JsonInclude] + public int? Shipments { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id"), JsonInclude] + public string? SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Manifest {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ManifestDownload.cs b/ShipEngineSDK/Model/ManifestDownload.cs new file mode 100644 index 00000000..028aaa2f --- /dev/null +++ b/ShipEngineSDK/Model/ManifestDownload.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Object containing the href link to download the manifest file +/// +public partial class ManifestDownload +{ + + /// + /// The URL of the linked resource, if any + /// + /// The URL of the linked resource, if any + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("href"), JsonPropertyOrder(1)] + public string? Href { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ManifestDownload {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Href: ").Append(Href).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ManifestRequest.cs b/ShipEngineSDK/Model/ManifestRequest.cs new file mode 100644 index 00000000..47e10d1e --- /dev/null +++ b/ShipEngineSDK/Model/ManifestRequest.cs @@ -0,0 +1,74 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A reference to the manifest request +/// +public partial class ManifestRequest +{ + + /// + /// A string that uniquely identifies a manifest request + /// + /// A string that uniquely identifies a manifest request + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_request_id"), JsonInclude] + public string? ManifestRequestId { get; set; } + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("status"), JsonPropertyOrder(2)] + public ManifestRequestStatus? Status { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ManifestRequest {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ManifestRequestId: ").Append(ManifestRequestId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ManifestRequestStatus.cs b/ShipEngineSDK/Model/ManifestRequestStatus.cs new file mode 100644 index 00000000..5f323de7 --- /dev/null +++ b/ShipEngineSDK/Model/ManifestRequestStatus.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible statuses of a manifest request +/// +/// The possible statuses of a manifest request +[JsonConverter(typeof(ManifestRequestStatusJsonConverter))] +public class ManifestRequestStatus +{ + private readonly string _value; + + /// + /// Create a new instance of ManifestRequestStatus with a predefined value. + /// + internal ManifestRequestStatus() + { + _value = "in_progress"; + } + + /// + /// Create a new instance of ManifestRequestStatus with a custom value. + /// + /// The value of the ManifestRequestStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ManifestRequestStatus(string value) + { + _value = value; + } + + /// + /// Enum InProgress for value: in_progress + /// + public static ManifestRequestStatus InProgress { get; } = new("in_progress"); + + + /// + /// Enum Completed for value: completed + /// + public static ManifestRequestStatus Completed { get; } = new("completed"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ManifestRequestStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ManifestRequestStatusJsonConverter : JsonConverter +{ + public override ManifestRequestStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ManifestRequestStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ManifestRequestStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ManifestRequestStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Manifests.cs b/ShipEngineSDK/Model/Manifests.cs new file mode 100644 index 00000000..04edad39 --- /dev/null +++ b/ShipEngineSDK/Model/Manifests.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An array of manifest resources +/// +public partial class Manifests +{ + + /// + /// Resulting Manifests + /// + /// Resulting Manifests + [JsonPropertyName("manifests"), JsonPropertyOrder(1)] + public List? VarManifests { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Manifests {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" VarManifests: ").Append(VarManifests).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ManifestsRequests.cs b/ShipEngineSDK/Model/ManifestsRequests.cs new file mode 100644 index 00000000..e1b49477 --- /dev/null +++ b/ShipEngineSDK/Model/ManifestsRequests.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An array of manifest requests +/// +public partial class ManifestsRequests +{ + + /// + /// Resulting manifest requests with statuses + /// + /// Resulting manifest requests with statuses + [JsonPropertyName("manifest_requests"), JsonPropertyOrder(1)] + public List? ManifestRequests { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ManifestsRequests {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ManifestRequests: ").Append(ManifestRequests).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ModifyBatch.cs b/ShipEngineSDK/Model/ModifyBatch.cs new file mode 100644 index 00000000..f5d61c87 --- /dev/null +++ b/ShipEngineSDK/Model/ModifyBatch.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A modify batch object +/// +public partial class ModifyBatch +{ + + /// + /// Array of Rate IDs to be modifed on the batch + /// + /// Array of Rate IDs to be modifed on the batch + [JsonPropertyName("rate_ids"), JsonPropertyOrder(1)] + public List? RateIds { get; set; } + + /// + /// The Shipment Ids to be modified on the batch + /// + /// The Shipment Ids to be modified on the batch + [JsonPropertyName("shipment_ids"), JsonPropertyOrder(2)] + public List? ShipmentIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ModifyBatch {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/MonetaryValue.cs b/ShipEngineSDK/Model/MonetaryValue.cs new file mode 100644 index 00000000..13ecf290 --- /dev/null +++ b/ShipEngineSDK/Model/MonetaryValue.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A monetary value, such as the price of a shipping label, the insured value of a package, or an account balance. +/// +public partial class MonetaryValue +{ + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public required decimal Amount { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("currency"), JsonPropertyOrder(2)] + public required string Currency { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MonetaryValue {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/NonDelivery.cs b/ShipEngineSDK/Model/NonDelivery.cs new file mode 100644 index 00000000..5ff5e880 --- /dev/null +++ b/ShipEngineSDK/Model/NonDelivery.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible non delivery values +/// +/// The possible non delivery values +[JsonConverter(typeof(NonDeliveryJsonConverter))] +public class NonDelivery +{ + private readonly string _value; + + /// + /// Create a new instance of NonDelivery with a predefined value. + /// + internal NonDelivery() + { + _value = "return_to_sender"; + } + + /// + /// Create a new instance of NonDelivery with a custom value. + /// + /// The value of the NonDelivery + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public NonDelivery(string value) + { + _value = value; + } + + /// + /// Enum ReturnToSender for value: return_to_sender + /// + public static NonDelivery ReturnToSender { get; } = new("return_to_sender"); + + + /// + /// Enum TreatAsAbandoned for value: treat_as_abandoned + /// + public static NonDelivery TreatAsAbandoned { get; } = new("treat_as_abandoned"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is NonDelivery other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class NonDeliveryJsonConverter : JsonConverter +{ + public override NonDelivery? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new NonDelivery(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, NonDelivery value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(NonDelivery); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/OptionalLink.cs b/ShipEngineSDK/Model/OptionalLink.cs new file mode 100644 index 00000000..62f451ff --- /dev/null +++ b/ShipEngineSDK/Model/OptionalLink.cs @@ -0,0 +1,72 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A link to a related resource, or an empty object if there is no resource to link to +/// +public partial class OptionalLink +{ + + /// + /// The URL of the linked resource, if any + /// + /// The URL of the linked resource, if any + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("href"), JsonPropertyOrder(1)] + public string? Href { get; set; } + + /// + /// The type of resource, or the type of relationship to the parent resource + /// + /// The type of resource, or the type of relationship to the parent resource + [JsonPropertyName("type"), JsonPropertyOrder(2)] + public string? Type { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OptionalLink {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/OrderSourceName.cs b/ShipEngineSDK/Model/OrderSourceName.cs new file mode 100644 index 00000000..f32697fd --- /dev/null +++ b/ShipEngineSDK/Model/OrderSourceName.cs @@ -0,0 +1,200 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The order sources that are supported by ShipEngine +/// +/// The order sources that are supported by ShipEngine +[JsonConverter(typeof(OrderSourceNameJsonConverter))] +public class OrderSourceName +{ + private readonly string _value; + + /// + /// Create a new instance of OrderSourceName with a predefined value. + /// + internal OrderSourceName() + { + _value = "amazon_ca"; + } + + /// + /// Create a new instance of OrderSourceName with a custom value. + /// + /// The value of the OrderSourceName + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public OrderSourceName(string value) + { + _value = value; + } + + /// + /// Enum AmazonCa for value: amazon_ca + /// + public static OrderSourceName AmazonCa { get; } = new("amazon_ca"); + + + /// + /// Enum AmazonUs for value: amazon_us + /// + public static OrderSourceName AmazonUs { get; } = new("amazon_us"); + + + /// + /// Enum Brightpearl for value: brightpearl + /// + public static OrderSourceName Brightpearl { get; } = new("brightpearl"); + + + /// + /// Enum ChannelAdvisor for value: channel_advisor + /// + public static OrderSourceName ChannelAdvisor { get; } = new("channel_advisor"); + + + /// + /// Enum Cratejoy for value: cratejoy + /// + public static OrderSourceName Cratejoy { get; } = new("cratejoy"); + + + /// + /// Enum Ebay for value: ebay + /// + public static OrderSourceName Ebay { get; } = new("ebay"); + + + /// + /// Enum Etsy for value: etsy + /// + public static OrderSourceName Etsy { get; } = new("etsy"); + + + /// + /// Enum Jane for value: jane + /// + public static OrderSourceName Jane { get; } = new("jane"); + + + /// + /// Enum GrouponGoods for value: groupon_goods + /// + public static OrderSourceName GrouponGoods { get; } = new("groupon_goods"); + + + /// + /// Enum Magento for value: magento + /// + public static OrderSourceName Magento { get; } = new("magento"); + + + /// + /// Enum Paypal for value: paypal + /// + public static OrderSourceName Paypal { get; } = new("paypal"); + + + /// + /// Enum SellerActive for value: seller_active + /// + public static OrderSourceName SellerActive { get; } = new("seller_active"); + + + /// + /// Enum Shopify for value: shopify + /// + public static OrderSourceName Shopify { get; } = new("shopify"); + + + /// + /// Enum StitchLabs for value: stitch_labs + /// + public static OrderSourceName StitchLabs { get; } = new("stitch_labs"); + + + /// + /// Enum Squarespace for value: squarespace + /// + public static OrderSourceName Squarespace { get; } = new("squarespace"); + + + /// + /// Enum ThreeDcart for value: three_dcart + /// + public static OrderSourceName ThreeDcart { get; } = new("three_dcart"); + + + /// + /// Enum Tophatter for value: tophatter + /// + public static OrderSourceName Tophatter { get; } = new("tophatter"); + + + /// + /// Enum Walmart for value: walmart + /// + public static OrderSourceName Walmart { get; } = new("walmart"); + + + /// + /// Enum WooCommerce for value: woo_commerce + /// + public static OrderSourceName WooCommerce { get; } = new("woo_commerce"); + + + /// + /// Enum Volusion for value: volusion + /// + public static OrderSourceName Volusion { get; } = new("volusion"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is OrderSourceName other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class OrderSourceNameJsonConverter : JsonConverter +{ + public override OrderSourceName? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new OrderSourceName(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, OrderSourceName value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(OrderSourceName); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/OriginType.cs b/ShipEngineSDK/Model/OriginType.cs new file mode 100644 index 00000000..8d2e25f7 --- /dev/null +++ b/ShipEngineSDK/Model/OriginType.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Indicates if the package will be picked up or dropped off by the carrier +/// +/// Indicates if the package will be picked up or dropped off by the carrier +[JsonConverter(typeof(OriginTypeJsonConverter))] +public class OriginType +{ + private readonly string _value; + + /// + /// Create a new instance of OriginType with a predefined value. + /// + internal OriginType() + { + _value = "pickup"; + } + + /// + /// Create a new instance of OriginType with a custom value. + /// + /// The value of the OriginType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public OriginType(string value) + { + _value = value; + } + + /// + /// Enum Pickup for value: pickup + /// + public static OriginType Pickup { get; } = new("pickup"); + + + /// + /// Enum DropOff for value: drop_off + /// + public static OriginType DropOff { get; } = new("drop_off"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is OriginType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class OriginTypeJsonConverter : JsonConverter +{ + public override OriginType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new OriginType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, OriginType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(OriginType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Package.cs b/ShipEngineSDK/Model/Package.cs new file mode 100644 index 00000000..855b7a10 --- /dev/null +++ b/ShipEngineSDK/Model/Package.cs @@ -0,0 +1,169 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A package associated with a shipment +/// +public partial class Package +{ + + /// + /// The package weight + /// + /// The package weight + [JsonPropertyName("weight"), JsonPropertyOrder(1)] + public required Weight Weight { get; set; } + + /// + /// A short description of the package content. Required for shipments moving to, from, and through Mexico. + /// + /// A short description of the package content. Required for shipments moving to, from, and through Mexico. + /// + /// Hand knitted wool socks + /// + [JsonPropertyName("content_description"), JsonPropertyOrder(2)] + public string? ContentDescription { get; set; } + + /// + /// The package dimensions + /// + /// The package dimensions + [JsonPropertyName("dimensions"), JsonPropertyOrder(3)] + public Dimensions? Dimensions { get; set; } + + /// + /// An external package id. + /// + /// An external package id. + [JsonPropertyName("external_package_id"), JsonPropertyOrder(4)] + public string? ExternalPackageId { get; set; } + + /// + /// The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. + /// + /// The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. + [JsonPropertyName("insured_value"), JsonPropertyOrder(5)] + public MonetaryValue? InsuredValue { get; set; } + + /// + /// Gets or Sets LabelMessages + /// + [JsonPropertyName("label_messages"), JsonPropertyOrder(6)] + public LabelMessages? LabelMessages { get; set; } + + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(7)] + public string? PackageCode { get; set; } + + /// + /// A string that uniquely identifies this [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/) + /// + /// A string that uniquely identifies this [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/) + /// + /// se-28529731 + /// + [JsonPropertyName("package_id"), JsonPropertyOrder(8)] + public string? PackageId { get; set; } + + /// + /// The name of the of the [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/) + /// + /// The name of the of the [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/) + [JsonPropertyName("package_name"), JsonPropertyOrder(9)] + public string? PackageName { get; set; } + + /// + /// Details about products inside packages (Information provided would be used on custom documentation) + /// + /// Details about products inside packages (Information provided would be used on custom documentation) + [JsonPropertyName("products"), JsonPropertyOrder(10)] + public List? Products { get; set; } + + /// + /// A string that uniquely identifies this shipment package + /// + /// A string that uniquely identifies this shipment package + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_package_id"), JsonInclude] + public string? ShipmentPackageId { get; set; } + + /// + /// The tracking number for the package. The format depends on the carrier. + /// + /// The tracking number for the package. The format depends on the carrier. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number"), JsonInclude] + public string? TrackingNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Package {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" ContentDescription: ").Append(ContentDescription).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" ExternalPackageId: ").Append(ExternalPackageId).Append("\n"); + sb.Append(" InsuredValue: ").Append(InsuredValue).Append("\n"); + sb.Append(" LabelMessages: ").Append(LabelMessages).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageName: ").Append(PackageName).Append("\n"); + sb.Append(" Products: ").Append(Products).Append("\n"); + sb.Append(" ShipmentPackageId: ").Append(ShipmentPackageId).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PackageContents.cs b/ShipEngineSDK/Model/PackageContents.cs new file mode 100644 index 00000000..99ced021 --- /dev/null +++ b/ShipEngineSDK/Model/PackageContents.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible package contents values +/// +/// The possible package contents values +[JsonConverter(typeof(PackageContentsJsonConverter))] +public class PackageContents +{ + private readonly string _value; + + /// + /// Create a new instance of PackageContents with a predefined value. + /// + internal PackageContents() + { + _value = "merchandise"; + } + + /// + /// Create a new instance of PackageContents with a custom value. + /// + /// The value of the PackageContents + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public PackageContents(string value) + { + _value = value; + } + + /// + /// Enum Merchandise for value: merchandise + /// + public static PackageContents Merchandise { get; } = new("merchandise"); + + + /// + /// Enum Documents for value: documents + /// + public static PackageContents Documents { get; } = new("documents"); + + + /// + /// Enum Gift for value: gift + /// + public static PackageContents Gift { get; } = new("gift"); + + + /// + /// Enum ReturnedGoods for value: returned_goods + /// + public static PackageContents ReturnedGoods { get; } = new("returned_goods"); + + + /// + /// Enum Sample for value: sample + /// + public static PackageContents Sample { get; } = new("sample"); + + + /// + /// Enum Other for value: other + /// + public static PackageContents Other { get; } = new("other"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is PackageContents other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class PackageContentsJsonConverter : JsonConverter +{ + public override PackageContents? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new PackageContents(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, PackageContents value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(PackageContents); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PackageType.cs b/ShipEngineSDK/Model/PackageType.cs new file mode 100644 index 00000000..89c34c8f --- /dev/null +++ b/ShipEngineSDK/Model/PackageType.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A package type that a carrier supports for shipment. +/// +public partial class PackageType +{ + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(2)] + public required string PackageCode { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description"), JsonPropertyOrder(3)] + public string? Description { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions"), JsonPropertyOrder(4)] + public Dimensions? Dimensions { get; set; } + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id"), JsonPropertyOrder(5)] + public string? PackageId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PackageType {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PackagingGroup.cs b/ShipEngineSDK/Model/PackagingGroup.cs new file mode 100644 index 00000000..fa541c04 --- /dev/null +++ b/ShipEngineSDK/Model/PackagingGroup.cs @@ -0,0 +1,97 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Defines packaging_group +/// +[JsonConverter(typeof(PackagingGroupJsonConverter))] +public class PackagingGroup +{ + private readonly string _value; + + /// + /// Create a new instance of PackagingGroup with a predefined value. + /// + internal PackagingGroup() + { + _value = "i"; + } + + /// + /// Create a new instance of PackagingGroup with a custom value. + /// + /// The value of the PackagingGroup + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public PackagingGroup(string value) + { + _value = value; + } + + /// + /// Enum I for value: i + /// + public static PackagingGroup I { get; } = new("i"); + + + /// + /// Enum Ii for value: ii + /// + public static PackagingGroup Ii { get; } = new("ii"); + + + /// + /// Enum Iii for value: iii + /// + public static PackagingGroup Iii { get; } = new("iii"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is PackagingGroup other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class PackagingGroupJsonConverter : JsonConverter +{ + public override PackagingGroup? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new PackagingGroup(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, PackagingGroup value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(PackagingGroup); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PackagingInstructionSection.cs b/ShipEngineSDK/Model/PackagingInstructionSection.cs new file mode 100644 index 00000000..ca6157f4 --- /dev/null +++ b/ShipEngineSDK/Model/PackagingInstructionSection.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Defines packaging_instruction_section +/// +[JsonConverter(typeof(PackagingInstructionSectionJsonConverter))] +public class PackagingInstructionSection +{ + private readonly string _value; + + /// + /// Create a new instance of PackagingInstructionSection with a predefined value. + /// + internal PackagingInstructionSection() + { + _value = "section_1"; + } + + /// + /// Create a new instance of PackagingInstructionSection with a custom value. + /// + /// The value of the PackagingInstructionSection + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public PackagingInstructionSection(string value) + { + _value = value; + } + + /// + /// Enum _1 for value: section_1 + /// + public static PackagingInstructionSection _1 { get; } = new("section_1"); + + + /// + /// Enum _2 for value: section_2 + /// + public static PackagingInstructionSection _2 { get; } = new("section_2"); + + + /// + /// Enum _1a for value: section_1a + /// + public static PackagingInstructionSection _1a { get; } = new("section_1a"); + + + /// + /// Enum _1b for value: section_1b + /// + public static PackagingInstructionSection _1b { get; } = new("section_1b"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is PackagingInstructionSection other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class PackagingInstructionSectionJsonConverter : JsonConverter +{ + public override PackagingInstructionSection? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new PackagingInstructionSection(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, PackagingInstructionSection value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(PackagingInstructionSection); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PagedListResponseBody.cs b/ShipEngineSDK/Model/PagedListResponseBody.cs new file mode 100644 index 00000000..a35cc1fa --- /dev/null +++ b/ShipEngineSDK/Model/PagedListResponseBody.cs @@ -0,0 +1,100 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Many ShipEngine endpoints return a paged list of items. In addition to the returned items, these responses also include information about the total number of items, the number of pages of results, and URLs of other pages of results. +/// +public partial class PagedListResponseBody +{ + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links"), JsonPropertyOrder(1)] + public required PaginationLink Links { get; set; } + + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. + /// + /// 1 + /// + [JsonPropertyName("page"), JsonPropertyOrder(2)] + public required int Page { get; set; } + + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. + /// + /// 4 + /// + [JsonPropertyName("pages"), JsonPropertyOrder(3)] + public required int Pages { get; set; } + + /// + /// The total number of items across all pages of results + /// + /// The total number of items across all pages of results + /// + /// 2750 + /// + [JsonPropertyName("total"), JsonPropertyOrder(4)] + public required int Total { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } = new Dictionary(); + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PagedListResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PaginationLink.cs b/ShipEngineSDK/Model/PaginationLink.cs new file mode 100644 index 00000000..287327a9 --- /dev/null +++ b/ShipEngineSDK/Model/PaginationLink.cs @@ -0,0 +1,85 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Helpful links to other pages of results +/// +public partial class PaginationLink +{ + + /// + /// The link to the first page of results. This object will _always_ have an `href` field. If there are no results, then the first page will contain an empty array of items. + /// + /// The link to the first page of results. This object will _always_ have an `href` field. If there are no results, then the first page will contain an empty array of items. + [JsonPropertyName("first"), JsonPropertyOrder(1)] + public required Link First { get; set; } + + /// + /// The link to the final page of results. This object will _always_ have an `href` field. If there are no results, then the final page will contain an empty array of items. + /// + /// The link to the final page of results. This object will _always_ have an `href` field. If there are no results, then the final page will contain an empty array of items. + [JsonPropertyName("last"), JsonPropertyOrder(2)] + public required Link Last { get; set; } + + /// + /// The link to the next page of results. The `href` field will only be set when the `page` is less than `pages`. + /// + /// The link to the next page of results. The `href` field will only be set when the `page` is less than `pages`. + [JsonPropertyName("next"), JsonPropertyOrder(3)] + public required OptionalLink Next { get; set; } + + /// + /// The link to the previous page of results. The `href` field will only be set when the `page` is 2 or greater. + /// + /// The link to the previous page of results. The `href` field will only be set when the `page` is 2 or greater. + [JsonPropertyName("prev"), JsonPropertyOrder(4)] + public required OptionalLink Prev { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PaginationLink {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" Next: ").Append(Next).Append("\n"); + sb.Append(" Prev: ").Append(Prev).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PaperlessDownload.cs b/ShipEngineSDK/Model/PaperlessDownload.cs new file mode 100644 index 00000000..083b95ba --- /dev/null +++ b/ShipEngineSDK/Model/PaperlessDownload.cs @@ -0,0 +1,80 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. +/// +public partial class PaperlessDownload +{ + + /// + /// The handoff code for the paperless download. + /// + /// The handoff code for the paperless download. + [JsonPropertyName("handoff_code"), JsonPropertyOrder(1)] + public string? HandoffCode { get; set; } + + /// + /// The URL of the linked resource, if any + /// + /// The URL of the linked resource, if any + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("href"), JsonPropertyOrder(2)] + public string? Href { get; set; } + + /// + /// The instructions for the paperless download. + /// + /// The instructions for the paperless download. + [JsonPropertyName("instructions"), JsonPropertyOrder(3)] + public string? Instructions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PaperlessDownload {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" HandoffCode: ").Append(HandoffCode).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ParseAddressRequestBody.cs b/ShipEngineSDK/Model/ParseAddressRequestBody.cs new file mode 100644 index 00000000..ebfb01cc --- /dev/null +++ b/ShipEngineSDK/Model/ParseAddressRequestBody.cs @@ -0,0 +1,72 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// 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. +/// +public partial class ParseAddressRequestBody +{ + + /// + /// The unstructured text that contains address-related entities + /// + /// The unstructured text that contains address-related entities + /// + /// Margie McMiller at 3800 North Lamar suite 200 in austin, tx. The zip code there is 78652. + /// + [JsonPropertyName("text"), JsonPropertyOrder(1)] + public required string Text { get; set; } + + /// + /// You can optionally provide any already-known address 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. + /// + /// You can optionally provide any already-known address 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. + [JsonPropertyName("address"), JsonPropertyOrder(2)] + public PartialAddress? Address { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParseAddressRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ParseAddressResponseBody.cs b/ShipEngineSDK/Model/ParseAddressResponseBody.cs new file mode 100644 index 00000000..8143977f --- /dev/null +++ b/ShipEngineSDK/Model/ParseAddressResponseBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The parsed address, as well as a confidence score and a list of all the entities that were recognized in the text. +/// +public partial class ParseAddressResponseBody +{ + + /// + /// The parsed address. This address may not be complete, depending on how much information was included in the text and how confident the API is about each recognized entity. > **Note:** The address-recognition API does not currently perform any validation of the parsed address, so we recommend that you use the [address-validation API](https://www.shipengine.com/docs/addresses/validation/) to ensure that the address is correct. + /// + /// The parsed address. This address may not be complete, depending on how much information was included in the text and how confident the API is about each recognized entity. > **Note:** The address-recognition API does not currently perform any validation of the parsed address, so we recommend that you use the [address-validation API](https://www.shipengine.com/docs/addresses/validation/) to ensure that the address is correct. + [JsonPropertyName("address"), JsonPropertyOrder(1)] + public required PartialAddress Address { get; set; } + + /// + /// All of the entities that were recognized in the text. An \"entity\" is a single piece of data, such as a city, a postal code, or an address line. Each entity includes the original text and the parsed value. + /// + /// All of the entities that were recognized in the text. An \"entity\" is a single piece of data, such as a city, a postal code, or an address line. Each entity includes the original text and the parsed value. + [JsonPropertyName("entities"), JsonPropertyOrder(2)] + public required List Entities { get; set; } + + /// + /// A confidence score between zero and one that indicates how certain the API is that it understood the text. + /// + /// A confidence score between zero and one that indicates how certain the API is that it understood the text. + [JsonPropertyName("score"), JsonPropertyOrder(3)] + public required double Score { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParseAddressResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" Entities: ").Append(Entities).Append("\n"); + sb.Append(" Score: ").Append(Score).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ParseShipmentRequestBody.cs b/ShipEngineSDK/Model/ParseShipmentRequestBody.cs new file mode 100644 index 00000000..14cae779 --- /dev/null +++ b/ShipEngineSDK/Model/ParseShipmentRequestBody.cs @@ -0,0 +1,73 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The only required field is `text`, which is the text to be parsed. You can optionally also provide a `shipment` containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. +/// +public partial class ParseShipmentRequestBody +{ + + /// + /// The unstructured text that contains shipping-related entities + /// + /// The unstructured text that contains shipping-related entities + /// + /// I have a 4oz package that's 5x10x14in, and I need to ship it to Margie McMiller at 3800 North Lamar suite 200 in austin, tx 78652. Please send it via USPS first class and require an adult signature. It also needs to be insured for $400. + + /// + [JsonPropertyName("text"), JsonPropertyOrder(1)] + public required string Text { get; set; } + + /// + /// You can optionally provide a `shipment` object containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. + /// + /// You can optionally provide a `shipment` object containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. + [JsonPropertyName("shipment"), JsonPropertyOrder(2)] + public PartialShipment? Shipment { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParseShipmentRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ParseShipmentResponseBody.cs b/ShipEngineSDK/Model/ParseShipmentResponseBody.cs new file mode 100644 index 00000000..f9917420 --- /dev/null +++ b/ShipEngineSDK/Model/ParseShipmentResponseBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The parsed shipment, as well as a confidence score and a list of all the shipping entities that were recognized in the text. +/// +public partial class ParseShipmentResponseBody +{ + + /// + /// All of the entities that were recognized in the text. An \"entity\" is a single piece of data, such as a city, a postal code, a carrier name, or a package weight. Each entity includes the original text and the parsed value. + /// + /// All of the entities that were recognized in the text. An \"entity\" is a single piece of data, such as a city, a postal code, a carrier name, or a package weight. Each entity includes the original text and the parsed value. + [JsonPropertyName("entities"), JsonPropertyOrder(1)] + public required List Entities { get; set; } + + /// + /// A confidence score between zero and one that indicates how certain the API is that it understood the text. + /// + /// A confidence score between zero and one that indicates how certain the API is that it understood the text. + [JsonPropertyName("score"), JsonPropertyOrder(2)] + public required double Score { get; set; } + + /// + /// The parsed shipment. This shipment may not be complete, depending on how much information was included in the text and how confident the API is about each recognized entity. > **Note:** The shipment-recognition API does not currently perform any validation of the parsed addresses, so we recommend that you use the [address-validation API](https://www.shipengine.com/docs/addresses/validation/) to ensure that the addresses are correct. + /// + /// The parsed shipment. This shipment may not be complete, depending on how much information was included in the text and how confident the API is about each recognized entity. > **Note:** The shipment-recognition API does not currently perform any validation of the parsed addresses, so we recommend that you use the [address-validation API](https://www.shipengine.com/docs/addresses/validation/) to ensure that the addresses are correct. + [JsonPropertyName("shipment"), JsonPropertyOrder(3)] + public required PartialShipment Shipment { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParseShipmentResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Entities: ").Append(Entities).Append("\n"); + sb.Append(" Score: ").Append(Score).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PartialAddress.cs b/ShipEngineSDK/Model/PartialAddress.cs new file mode 100644 index 00000000..8de15927 --- /dev/null +++ b/ShipEngineSDK/Model/PartialAddress.cs @@ -0,0 +1,182 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A complete or partial mailing address. +/// +public partial class PartialAddress +{ + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public string? AddressLine1 { get; set; } + + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// Unit 408 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(2)] + public string? AddressLine2 { get; set; } + + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// Building #7 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(3)] + public string? AddressLine3 { get; set; } + + /// + /// Indicates whether this is a residential address. + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(4)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(5)] + public string? CityLocality { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// The Home Depot + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(6)] + public string? CompanyName { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(7)] + public string? CountryCode { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(8)] + public string? Email { get; set; } + + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// John Doe + /// + [JsonPropertyName("name"), JsonPropertyOrder(9)] + public string? Name { get; set; } + + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// +1 204-253-9411 ext. 123 + /// + [JsonPropertyName("phone"), JsonPropertyOrder(10)] + public string? Phone { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(11)] + public string? PostalCode { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// Manitoba + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(12)] + public string? StateProvince { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PartialAddress {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PartialShipment.cs b/ShipEngineSDK/Model/PartialShipment.cs new file mode 100644 index 00000000..94c00b57 --- /dev/null +++ b/ShipEngineSDK/Model/PartialShipment.cs @@ -0,0 +1,312 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight. +/// +public partial class PartialShipment +{ + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(1)] + public AdvancedShipmentOptions? AdvancedOptions { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(2)] + public string? CarrierId { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(3)] + public string? ComparisonRateType { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(4)] + public DeliveryConfirmation? Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(6)] + public InternationalShipmentOptions? Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(7)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(8)] + public string? ExternalShipmentId { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(9)] + public InsuranceProvider? InsuranceProvider { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(10)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(11)] + public List? Items { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(13)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(14)] + public List? Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(15)] + public ShippingAddress? ReturnTo { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(16)] + public string? ServiceCode { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(17)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(18)] + public ShippingAddress? ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(19)] + public ShippingAddressTo? ShipTo { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(21)] + public string? ShipmentNumber { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(23)] + public string? ShippingRuleId { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(25)] + public List? TaxIdentifiers { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(27)] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PartialShipment {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PartialShippingAddress.cs b/ShipEngineSDK/Model/PartialShippingAddress.cs new file mode 100644 index 00000000..6b055968 --- /dev/null +++ b/ShipEngineSDK/Model/PartialShippingAddress.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A complete or partial mailing address. +/// +public partial class PartialShippingAddress +{ + + /// + /// Additional text about how to handle the shipment at this address. + /// + /// Additional text about how to handle the shipment at this address. + [JsonPropertyName("instructions"), JsonPropertyOrder(1)] + public string? Instructions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PartialShippingAddress {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PartialShippingAddressTo.cs b/ShipEngineSDK/Model/PartialShippingAddressTo.cs new file mode 100644 index 00000000..cd10119e --- /dev/null +++ b/ShipEngineSDK/Model/PartialShippingAddressTo.cs @@ -0,0 +1,68 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A complete or partial mailing address. +/// +public partial class PartialShippingAddressTo +{ + + /// + /// Gets or Sets Geolocation + /// + [JsonPropertyName("geolocation"), JsonPropertyOrder(1)] + public List? Geolocation { get; set; } + + /// + /// Additional text about how to handle the shipment at this address. + /// + /// Additional text about how to handle the shipment at this address. + [JsonPropertyName("instructions"), JsonPropertyOrder(2)] + public string? Instructions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PartialShippingAddressTo {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Geolocation: ").Append(Geolocation).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PartialShippingAddressToGeolocationInner.cs b/ShipEngineSDK/Model/PartialShippingAddressToGeolocationInner.cs new file mode 100644 index 00000000..d0586207 --- /dev/null +++ b/ShipEngineSDK/Model/PartialShippingAddressToGeolocationInner.cs @@ -0,0 +1,129 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// PartialShippingAddressToGeolocationInner +/// +public partial class PartialShippingAddressToGeolocationInner +{ + /// + /// Enum of available type of geolocation items: - 'what3words' functionality allows to specify a location by providing 3 words that have been assign to the specific location see [link](https://what3words.com/business) for more details. + /// + /// Enum of available type of geolocation items: - 'what3words' functionality allows to specify a location by providing 3 words that have been assign to the specific location see [link](https://what3words.com/business) for more details. + [JsonConverter(typeof(TypeEnumJsonConverter))] + public class TypeEnum + { + private readonly string _value; + + /// + /// Create a new instance of TypeEnum with a predefined value. + /// + internal TypeEnum() + { + _value = "what3words"; + } + + /// + /// Create a new instance of TypeEnum with a custom value. + /// + /// The value of the TypeEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public TypeEnum(string value) + { + _value = value; + } + + /// + /// Enum What3words for value: what3words + /// + public static TypeEnum What3words { get; } = new("what3words"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class TypeEnumJsonConverter : JsonConverter + { + public override TypeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new TypeEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, TypeEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(TypeEnum); + } + + + /// + /// Enum of available type of geolocation items: - 'what3words' functionality allows to specify a location by providing 3 words that have been assign to the specific location see [link](https://what3words.com/business) for more details. + /// + /// Enum of available type of geolocation items: - 'what3words' functionality allows to specify a location by providing 3 words that have been assign to the specific location see [link](https://what3words.com/business) for more details. + /// + /// what3words + /// + [JsonPropertyName("type"), JsonPropertyOrder(1)] + public TypeEnum? Type { get; set; } + + /// + /// value of the geolocation item + /// + /// value of the geolocation item + /// + /// cats.with.thumbs + /// + [JsonPropertyName("value"), JsonPropertyOrder(2)] + public string? Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PartialShippingAddressToGeolocationInner {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PaymentAmount.cs b/ShipEngineSDK/Model/PaymentAmount.cs new file mode 100644 index 00000000..02142a14 --- /dev/null +++ b/ShipEngineSDK/Model/PaymentAmount.cs @@ -0,0 +1,68 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// PaymentAmount +/// +public partial class PaymentAmount +{ + + /// + /// Gets or Sets Amount + /// + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public decimal? Amount { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("currency"), JsonPropertyOrder(2)] + public string? Currency { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PaymentAmount {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Pickup.cs b/ShipEngineSDK/Model/Pickup.cs new file mode 100644 index 00000000..2b330507 --- /dev/null +++ b/ShipEngineSDK/Model/Pickup.cs @@ -0,0 +1,188 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The information necessary to schedule a package pickup +/// +public partial class Pickup +{ + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at"), JsonInclude] + public DateTimeOffset? CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number"), JsonInclude] + public string? ConfirmationNumber { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details"), JsonPropertyOrder(4)] + public ContactDetails? ContactDetails { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Label IDs that will be included in the pickup request + /// + /// Label IDs that will be included in the pickup request + [JsonPropertyName("label_ids"), JsonPropertyOrder(6)] + public List? LabelIds { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_address"), JsonInclude] + public Address? PickupAddress { get; set; } + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id"), JsonInclude] + public string? PickupId { get; set; } + + /// + /// Used by some carriers to give special instructions for a package pickup + /// + /// Used by some carriers to give special instructions for a package pickup + [JsonPropertyName("pickup_notes"), JsonPropertyOrder(9)] + public string? PickupNotes { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window"), JsonPropertyOrder(10)] + public PickupWindow? PickupWindow { get; set; } + + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_windows"), JsonInclude] + public List? PickupWindows { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Pickup {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CancelledAt: ").Append(CancelledAt).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ConfirmationNumber: ").Append(ConfirmationNumber).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" PickupNotes: ").Append(PickupNotes).Append("\n"); + sb.Append(" PickupWindow: ").Append(PickupWindow).Append("\n"); + sb.Append(" PickupWindows: ").Append(PickupWindows).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PickupResponseBody.cs b/ShipEngineSDK/Model/PickupResponseBody.cs new file mode 100644 index 00000000..f8107c03 --- /dev/null +++ b/ShipEngineSDK/Model/PickupResponseBody.cs @@ -0,0 +1,188 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A pickup response body +/// +public partial class PickupResponseBody +{ + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details"), JsonPropertyOrder(2)] + public required ContactDetails ContactDetails { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Label IDs that will be included in the pickup request + /// + /// Label IDs that will be included in the pickup request + [JsonPropertyName("label_ids"), JsonPropertyOrder(4)] + public required List LabelIds { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_address"), JsonInclude] + public Address? PickupAddress { get; set; } + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id"), JsonInclude] + public string? PickupId { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window"), JsonPropertyOrder(7)] + public required PickupWindow PickupWindow { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at"), JsonInclude] + public DateTimeOffset? CancelledAt { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number"), JsonInclude] + public string? ConfirmationNumber { get; set; } + + /// + /// Used by some carriers to give special instructions for a package pickup + /// + /// Used by some carriers to give special instructions for a package pickup + [JsonPropertyName("pickup_notes"), JsonPropertyOrder(11)] + public string? PickupNotes { get; set; } + + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_windows"), JsonInclude] + public List? PickupWindows { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PickupResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" PickupWindow: ").Append(PickupWindow).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" CancelledAt: ").Append(CancelledAt).Append("\n"); + sb.Append(" ConfirmationNumber: ").Append(ConfirmationNumber).Append("\n"); + sb.Append(" PickupNotes: ").Append(PickupNotes).Append("\n"); + sb.Append(" PickupWindows: ").Append(PickupWindows).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PickupWindow.cs b/ShipEngineSDK/Model/PickupWindow.cs new file mode 100644 index 00000000..9917270c --- /dev/null +++ b/ShipEngineSDK/Model/PickupWindow.cs @@ -0,0 +1,75 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The desired time range for the package pickup. +/// +public partial class PickupWindow +{ + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("end_at"), JsonPropertyOrder(1)] + public required DateTimeOffset EndAt { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("start_at"), JsonPropertyOrder(2)] + public required DateTimeOffset StartAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PickupWindow {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" EndAt: ").Append(EndAt).Append("\n"); + sb.Append(" StartAt: ").Append(StartAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PickupWindows.cs b/ShipEngineSDK/Model/PickupWindows.cs new file mode 100644 index 00000000..e5599976 --- /dev/null +++ b/ShipEngineSDK/Model/PickupWindows.cs @@ -0,0 +1,75 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// PickupWindows +/// +public partial class PickupWindows +{ + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("end_at"), JsonPropertyOrder(1)] + public DateTimeOffset? EndAt { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("start_at"), JsonPropertyOrder(2)] + public DateTimeOffset? StartAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PickupWindows {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" EndAt: ").Append(EndAt).Append("\n"); + sb.Append(" StartAt: ").Append(StartAt).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ProcessBatchRequestBody.cs b/ShipEngineSDK/Model/ProcessBatchRequestBody.cs new file mode 100644 index 00000000..7d11ce1a --- /dev/null +++ b/ShipEngineSDK/Model/ProcessBatchRequestBody.cs @@ -0,0 +1,86 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A process batch request body +/// +public partial class ProcessBatchRequestBody +{ + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(1)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + [JsonPropertyName("label_format"), JsonPropertyOrder(2)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// Gets or Sets LabelLayout + /// + [JsonPropertyName("label_layout"), JsonPropertyOrder(3)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// The Ship date the batch is being processed for + /// + /// The Ship date the batch is being processed for + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(4)] + public DateTimeOffset? ShipDate { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ProcessBatchRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Products.cs b/ShipEngineSDK/Model/Products.cs new file mode 100644 index 00000000..ea2780a6 --- /dev/null +++ b/ShipEngineSDK/Model/Products.cs @@ -0,0 +1,173 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The customs declaration for a single item in the shipment. +/// +public partial class Products +{ + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated + /// + /// CA + /// + [JsonPropertyName("country_of_origin"), JsonPropertyOrder(1)] + public string? CountryOfOrigin { get; set; } + + /// + /// Details about dangerous goods inside products + /// + /// Details about dangerous goods inside products + [JsonPropertyName("dangerous_goods"), JsonPropertyOrder(2)] + public List? DangerousGoods { get; set; } + + /// + /// A description of the item + /// + /// A description of the item + [JsonPropertyName("description"), JsonPropertyOrder(3)] + public string? Description { get; set; } + + /// + /// Additional details about products + /// + /// Additional details about products + [JsonPropertyName("extended_details"), JsonPropertyOrder(4)] + public Dictionary? ExtendedDetails { get; set; } + + /// + /// The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item. + /// + /// The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item. + /// + /// 3926.1 + /// + [JsonPropertyName("harmonized_tariff_code"), JsonPropertyOrder(5)] + public string? HarmonizedTariffCode { get; set; } + + /// + /// Manufacturers Identification code + /// + /// Manufacturers Identification code + [JsonPropertyName("mid_code"), JsonPropertyOrder(6)] + public string? MidCode { get; set; } + + /// + /// link to the item on the seller website + /// + /// link to the item on the seller website + [JsonPropertyName("product_url"), JsonPropertyOrder(7)] + public string? ProductUrl { get; set; } + + /// + /// The quantity of this item in the shipment. + /// + /// The quantity of this item in the shipment. + [JsonPropertyName("quantity"), JsonPropertyOrder(8)] + public int? Quantity { get; set; } + + /// + /// The SKU (Stock Keeping Unit) of the item + /// + /// The SKU (Stock Keeping Unit) of the item + [JsonPropertyName("sku"), JsonPropertyOrder(9)] + public string? Sku { get; set; } + + /// + /// Description of the Custom Item's SKU + /// + /// Description of the Custom Item's SKU + [JsonPropertyName("sku_description"), JsonPropertyOrder(10)] + public string? SkuDescription { get; set; } + + /// + /// Gets or Sets UnitOfMeasure + /// + [JsonPropertyName("unit_of_measure"), JsonPropertyOrder(11)] + public string? UnitOfMeasure { get; set; } + + /// + /// The declared value of each item + /// + /// The declared value of each item + [JsonPropertyName("value"), JsonPropertyOrder(12)] + public MonetaryValue? Value { get; set; } + + /// + /// VAT rate applicable to the item + /// + /// VAT rate applicable to the item + /// + /// 0.2 + /// + [JsonPropertyName("vat_rate"), JsonPropertyOrder(13)] + public decimal? VatRate { get; set; } + + /// + /// The item weight + /// + /// The item weight + [JsonPropertyName("weight"), JsonPropertyOrder(14)] + public Weight? Weight { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Products {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n"); + sb.Append(" DangerousGoods: ").Append(DangerousGoods).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" ExtendedDetails: ").Append(ExtendedDetails).Append("\n"); + sb.Append(" HarmonizedTariffCode: ").Append(HarmonizedTariffCode).Append("\n"); + sb.Append(" MidCode: ").Append(MidCode).Append("\n"); + sb.Append(" ProductUrl: ").Append(ProductUrl).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" Sku: ").Append(Sku).Append("\n"); + sb.Append(" SkuDescription: ").Append(SkuDescription).Append("\n"); + sb.Append(" UnitOfMeasure: ").Append(UnitOfMeasure).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" VatRate: ").Append(VatRate).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/PurchaseLabelWithoutShipment.cs b/ShipEngineSDK/Model/PurchaseLabelWithoutShipment.cs new file mode 100644 index 00000000..db9d2516 --- /dev/null +++ b/ShipEngineSDK/Model/PurchaseLabelWithoutShipment.cs @@ -0,0 +1,89 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A purchase label without shipment resource +/// +public partial class PurchaseLabelWithoutShipment +{ + + /// + /// The display format that the label should be shown in. + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme"), JsonPropertyOrder(1)] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type"), JsonPropertyOrder(2)] + public LabelDownloadType? LabelDownloadType { get; set; } + + /// + /// Gets or Sets LabelFormat + /// + [JsonPropertyName("label_format"), JsonPropertyOrder(3)] + public LabelFormat? LabelFormat { get; set; } + + /// + /// Gets or Sets LabelLayout + /// + [JsonPropertyName("label_layout"), JsonPropertyOrder(4)] + public LabelLayout? LabelLayout { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(5)] + public ValidateAddress? ValidateAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PurchaseLabelWithoutShipment {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Rate.cs b/ShipEngineSDK/Model/Rate.cs new file mode 100644 index 00000000..08804abb --- /dev/null +++ b/ShipEngineSDK/Model/Rate.cs @@ -0,0 +1,366 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate +/// +public partial class Rate +{ + + /// + /// carrier code + /// + /// carrier code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// carrier friendly name + /// + /// carrier friendly name + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_friendly_name"), JsonInclude] + public string? CarrierFriendlyName { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// carrier nickname + /// + /// carrier nickname + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_nickname"), JsonInclude] + public string? CarrierNickname { get; set; } + + /// + /// The confirmation amount. Should be added with shipping_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// The confirmation amount. Should be added with shipping_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("confirmation_amount"), JsonInclude] + public MonetaryValue? ConfirmationAmount { get; set; } + + /// + /// The error messages + /// + /// The error messages + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("error_messages"), JsonInclude] + public List? ErrorMessages { get; set; } + + /// + /// Indicates if the rate is guaranteed. + /// + /// Indicates if the rate is guaranteed. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("guaranteed_service"), JsonInclude] + public bool? GuaranteedService { get; set; } + + /// + /// The insurance amount. Should be added with shipping_amount, confirmation_amount and other_amount to calculate the total purchase price. + /// + /// The insurance amount. Should be added with shipping_amount, confirmation_amount and other_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_amount"), JsonInclude] + public MonetaryValue? InsuranceAmount { get; set; } + + /// + /// Indicates if the rates been negotiated + /// + /// Indicates if the rates been negotiated + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("negotiated_rate"), JsonInclude] + public bool? NegotiatedRate { get; set; } + + /// + /// Any other charges associated with this rate. Should be added with shipping_amount, insurance_amount and confirmation_amount to calculate the total purchase price. + /// + /// Any other charges associated with this rate. Should be added with shipping_amount, insurance_amount and confirmation_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("other_amount"), JsonInclude] + public MonetaryValue? OtherAmount { get; set; } + + /// + /// A string that uniquely identifies the rate + /// + /// A string that uniquely identifies the rate + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("rate_id"), JsonInclude] + public string? RateId { get; set; } + + /// + /// Gets or Sets RateType + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_type"), JsonInclude] + public RateType? RateType { get; set; } + + /// + /// service code for the rate + /// + /// service code for the rate + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// service type + /// + /// service type + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("service_type"), JsonInclude] + public string? ServiceType { get; set; } + + /// + /// The shipping amount. Should be added with confirmation_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// The shipping amount. Should be added with confirmation_amount, insurance_amount and other_amount to calculate the total purchase price. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipping_amount"), JsonInclude] + public MonetaryValue? ShippingAmount { get; set; } + + /// + /// Indicates if rate is trackable + /// + /// Indicates if rate is trackable + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// Gets or Sets ValidationStatus + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("validation_status"), JsonInclude] + public ValidationStatus? ValidationStatus { get; set; } + + /// + /// The warning messages + /// + /// The warning messages + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("warning_messages"), JsonInclude] + public List? WarningMessages { get; set; } + + /// + /// The carrier delivery days + /// + /// The carrier delivery days + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_delivery_days"), JsonInclude] + public string? CarrierDeliveryDays { get; set; } + + /// + /// The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday + /// + /// The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 5 + /// + [JsonPropertyName("delivery_days"), JsonInclude] + public int? DeliveryDays { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("estimated_delivery_date"), JsonInclude] + public DateTimeOffset? EstimatedDeliveryDate { get; set; } + + /// + /// package type that this rate was estimated for + /// + /// package type that this rate was estimated for + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// package + /// + [JsonPropertyName("package_type"), JsonInclude] + public string? PackageType { get; set; } + + /// + /// A list of rate details that are associated with this rate. This is useful for displaying a breakdown of the rate to the user. + /// + /// A list of rate details that are associated with this rate. This is useful for displaying a breakdown of the rate to the user. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_details"), JsonInclude] + public List? RateDetails { get; set; } + + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// The total shipping cost for the specified comparison_rate_type. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("requested_comparison_amount"), JsonInclude] + public MonetaryValue? RequestedComparisonAmount { get; set; } + + /// + /// ship date + /// + /// ship date + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tax_amount"), JsonInclude] + public MonetaryValue? TaxAmount { get; set; } + + /// + /// Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location + /// + /// Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 6 + /// + [JsonPropertyName("zone"), JsonInclude] + public int? Zone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Rate {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierFriendlyName: ").Append(CarrierFriendlyName).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierNickname: ").Append(CarrierNickname).Append("\n"); + sb.Append(" ConfirmationAmount: ").Append(ConfirmationAmount).Append("\n"); + sb.Append(" ErrorMessages: ").Append(ErrorMessages).Append("\n"); + sb.Append(" GuaranteedService: ").Append(GuaranteedService).Append("\n"); + sb.Append(" InsuranceAmount: ").Append(InsuranceAmount).Append("\n"); + sb.Append(" NegotiatedRate: ").Append(NegotiatedRate).Append("\n"); + sb.Append(" OtherAmount: ").Append(OtherAmount).Append("\n"); + sb.Append(" RateId: ").Append(RateId).Append("\n"); + sb.Append(" RateType: ").Append(RateType).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ServiceType: ").Append(ServiceType).Append("\n"); + sb.Append(" ShippingAmount: ").Append(ShippingAmount).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" ValidationStatus: ").Append(ValidationStatus).Append("\n"); + sb.Append(" WarningMessages: ").Append(WarningMessages).Append("\n"); + sb.Append(" CarrierDeliveryDays: ").Append(CarrierDeliveryDays).Append("\n"); + sb.Append(" DeliveryDays: ").Append(DeliveryDays).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" PackageType: ").Append(PackageType).Append("\n"); + sb.Append(" RateDetails: ").Append(RateDetails).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" TaxAmount: ").Append(TaxAmount).Append("\n"); + sb.Append(" Zone: ").Append(Zone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateDetail.cs b/ShipEngineSDK/Model/RateDetail.cs new file mode 100644 index 00000000..7872a782 --- /dev/null +++ b/ShipEngineSDK/Model/RateDetail.cs @@ -0,0 +1,107 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Represents detailed information about a shipping cost +/// +public partial class RateDetail +{ + + /// + /// Gets or Sets Amount + /// + [JsonPropertyName("amount"), JsonPropertyOrder(1)] + public MonetaryValue? Amount { get; set; } + + /// + /// The source of the billing information. This is typically the carrier, but could be a third party, e.g insurance + /// + /// The source of the billing information. This is typically the carrier, but could be a third party, e.g insurance + [JsonPropertyName("billing_source"), JsonPropertyOrder(2)] + public string? BillingSource { get; set; } + + /// + /// A rate detail code defined by a carrier + /// + /// A rate detail code defined by a carrier + [JsonPropertyName("carrier_billing_code"), JsonPropertyOrder(3)] + public string? CarrierBillingCode { get; set; } + + /// + /// A rate detail description defined by a carrier + /// + /// A rate detail description defined by a carrier + [JsonPropertyName("carrier_description"), JsonPropertyOrder(4)] + public string? CarrierDescription { get; set; } + + /// + /// Contains any additional information + /// + /// Contains any additional information + [JsonPropertyName("carrier_memo"), JsonPropertyOrder(5)] + public string? CarrierMemo { get; set; } + + /// + /// If applicable, contains additional data about a rate detail of a specific type, e.g. VAT + /// + /// If applicable, contains additional data about a rate detail of a specific type, e.g. VAT + [JsonPropertyName("rate_detail_attributes"), JsonPropertyOrder(6)] + public RateDetailAttributes? RateDetailAttributes { get; set; } + + /// + /// Gets or Sets RateDetailType + /// + [JsonPropertyName("rate_detail_type"), JsonPropertyOrder(7)] + public RateDetailType? RateDetailType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateDetail {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" BillingSource: ").Append(BillingSource).Append("\n"); + sb.Append(" CarrierBillingCode: ").Append(CarrierBillingCode).Append("\n"); + sb.Append(" CarrierDescription: ").Append(CarrierDescription).Append("\n"); + sb.Append(" CarrierMemo: ").Append(CarrierMemo).Append("\n"); + sb.Append(" RateDetailAttributes: ").Append(RateDetailAttributes).Append("\n"); + sb.Append(" RateDetailType: ").Append(RateDetailType).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateDetailAttributes.cs b/ShipEngineSDK/Model/RateDetailAttributes.cs new file mode 100644 index 00000000..c5e860c6 --- /dev/null +++ b/ShipEngineSDK/Model/RateDetailAttributes.cs @@ -0,0 +1,76 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Represents detailed information about a tax (e.g. VAT) contained in a shipping cost. +/// +public partial class RateDetailAttributes +{ + + /// + /// Code for a specific tax type + /// + /// Code for a specific tax type + [JsonPropertyName("tax_code"), JsonPropertyOrder(1)] + public string? TaxCode { get; set; } + + /// + /// Tax percentage, e.g. 20 for 20%, added to the shipping cost + /// + /// Tax percentage, e.g. 20 for 20%, added to the shipping cost + [JsonPropertyName("tax_percentage"), JsonPropertyOrder(2)] + public decimal? TaxPercentage { get; set; } + + /// + /// Gets or Sets TaxType + /// + [JsonPropertyName("tax_type"), JsonPropertyOrder(3)] + public TaxType? TaxType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateDetailAttributes {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" TaxCode: ").Append(TaxCode).Append("\n"); + sb.Append(" TaxPercentage: ").Append(TaxPercentage).Append("\n"); + sb.Append(" TaxType: ").Append(TaxType).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateDetailType.cs b/ShipEngineSDK/Model/RateDetailType.cs new file mode 100644 index 00000000..28231ba7 --- /dev/null +++ b/ShipEngineSDK/Model/RateDetailType.cs @@ -0,0 +1,212 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible rate detail type values +/// +/// The possible rate detail type values +[JsonConverter(typeof(RateDetailTypeJsonConverter))] +public class RateDetailType +{ + private readonly string _value; + + /// + /// Create a new instance of RateDetailType with a predefined value. + /// + internal RateDetailType() + { + _value = "uncategorized"; + } + + /// + /// Create a new instance of RateDetailType with a custom value. + /// + /// The value of the RateDetailType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public RateDetailType(string value) + { + _value = value; + } + + /// + /// Enum Uncategorized for value: uncategorized + /// + public static RateDetailType Uncategorized { get; } = new("uncategorized"); + + + /// + /// Enum Shipping for value: shipping + /// + public static RateDetailType Shipping { get; } = new("shipping"); + + + /// + /// Enum Insurance for value: insurance + /// + public static RateDetailType Insurance { get; } = new("insurance"); + + + /// + /// Enum Confirmation for value: confirmation + /// + public static RateDetailType Confirmation { get; } = new("confirmation"); + + + /// + /// Enum Discount for value: discount + /// + public static RateDetailType Discount { get; } = new("discount"); + + + /// + /// Enum FuelCharge for value: fuel_charge + /// + public static RateDetailType FuelCharge { get; } = new("fuel_charge"); + + + /// + /// Enum AdditionalFees for value: additional_fees + /// + public static RateDetailType AdditionalFees { get; } = new("additional_fees"); + + + /// + /// Enum Tariff for value: tariff + /// + public static RateDetailType Tariff { get; } = new("tariff"); + + + /// + /// Enum Tax for value: tax + /// + public static RateDetailType Tax { get; } = new("tax"); + + + /// + /// Enum Delivery for value: delivery + /// + public static RateDetailType Delivery { get; } = new("delivery"); + + + /// + /// Enum Handling for value: handling + /// + public static RateDetailType Handling { get; } = new("handling"); + + + /// + /// Enum SpecialGoods for value: special_goods + /// + public static RateDetailType SpecialGoods { get; } = new("special_goods"); + + + /// + /// Enum Pickup for value: pickup + /// + public static RateDetailType Pickup { get; } = new("pickup"); + + + /// + /// Enum LocationFee for value: location_fee + /// + public static RateDetailType LocationFee { get; } = new("location_fee"); + + + /// + /// Enum Oversize for value: oversize + /// + public static RateDetailType Oversize { get; } = new("oversize"); + + + /// + /// Enum Returns for value: returns + /// + public static RateDetailType Returns { get; } = new("returns"); + + + /// + /// Enum Notifications for value: notifications + /// + public static RateDetailType Notifications { get; } = new("notifications"); + + + /// + /// Enum Tip for value: tip + /// + public static RateDetailType Tip { get; } = new("tip"); + + + /// + /// Enum DutiesAndTaxes for value: duties_and_taxes + /// + public static RateDetailType DutiesAndTaxes { get; } = new("duties_and_taxes"); + + + /// + /// Enum BrokerageFee for value: brokerage_fee + /// + public static RateDetailType BrokerageFee { get; } = new("brokerage_fee"); + + + /// + /// Enum AdminFee for value: admin_fee + /// + public static RateDetailType AdminFee { get; } = new("admin_fee"); + + + /// + /// Enum Adjustment for value: adjustment + /// + public static RateDetailType Adjustment { get; } = new("adjustment"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is RateDetailType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class RateDetailTypeJsonConverter : JsonConverter +{ + public override RateDetailType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new RateDetailType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, RateDetailType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(RateDetailType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateEstimate.cs b/ShipEngineSDK/Model/RateEstimate.cs new file mode 100644 index 00000000..8b87ef1f --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimate.cs @@ -0,0 +1,330 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate estimate +/// +public partial class RateEstimate +{ + + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_code"), JsonInclude] + public string? CarrierCode { get; set; } + + /// + /// carrier friendly name + /// + /// carrier friendly name + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_friendly_name"), JsonInclude] + public string? CarrierFriendlyName { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// carrier nickname + /// + /// carrier nickname + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_nickname"), JsonInclude] + public string? CarrierNickname { get; set; } + + /// + /// The confirmation amount + /// + /// The confirmation amount + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("confirmation_amount"), JsonInclude] + public MonetaryValue? ConfirmationAmount { get; set; } + + /// + /// The error messages + /// + /// The error messages + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("error_messages"), JsonInclude] + public List? ErrorMessages { get; set; } + + /// + /// Indicates if the rate is guaranteed. + /// + /// Indicates if the rate is guaranteed. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("guaranteed_service"), JsonInclude] + public bool? GuaranteedService { get; set; } + + /// + /// The insurance amount + /// + /// The insurance amount + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("insurance_amount"), JsonInclude] + public MonetaryValue? InsuranceAmount { get; set; } + + /// + /// Indicates if the rates been negotiated + /// + /// Indicates if the rates been negotiated + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("negotiated_rate"), JsonInclude] + public bool? NegotiatedRate { get; set; } + + /// + /// Any other charges associated with this rate + /// + /// Any other charges associated with this rate + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("other_amount"), JsonInclude] + public MonetaryValue? OtherAmount { get; set; } + + /// + /// Gets or Sets RateType + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rate_type"), JsonInclude] + public RateType? RateType { get; set; } + + /// + /// service code for the rate + /// + /// service code for the rate + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + /// + /// service type + /// + /// service type + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("service_type"), JsonInclude] + public string? ServiceType { get; set; } + + /// + /// The shipping amount + /// + /// The shipping amount + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipping_amount"), JsonInclude] + public MonetaryValue? ShippingAmount { get; set; } + + /// + /// Indicates if rate is trackable + /// + /// Indicates if rate is trackable + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("trackable"), JsonInclude] + public bool? Trackable { get; set; } + + /// + /// Gets or Sets ValidationStatus + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("validation_status"), JsonInclude] + public ValidationStatus? ValidationStatus { get; set; } + + /// + /// The warning messages + /// + /// The warning messages + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("warning_messages"), JsonInclude] + public List? WarningMessages { get; set; } + + /// + /// The carrier delivery days + /// + /// The carrier delivery days + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_delivery_days"), JsonInclude] + public string? CarrierDeliveryDays { get; set; } + + /// + /// The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday + /// + /// The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 5 + /// + [JsonPropertyName("delivery_days"), JsonInclude] + public int? DeliveryDays { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("estimated_delivery_date"), JsonInclude] + public DateTimeOffset? EstimatedDeliveryDate { get; set; } + + /// + /// package type that this rate was estimated for + /// + /// package type that this rate was estimated for + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// package + /// + [JsonPropertyName("package_type"), JsonInclude] + public string? PackageType { get; set; } + + /// + /// ship date + /// + /// ship date + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("ship_date"), JsonInclude] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tax_amount"), JsonInclude] + public MonetaryValue? TaxAmount { get; set; } + + /// + /// Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location + /// + /// Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 6 + /// + [JsonPropertyName("zone"), JsonInclude] + public int? Zone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateEstimate {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierFriendlyName: ").Append(CarrierFriendlyName).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierNickname: ").Append(CarrierNickname).Append("\n"); + sb.Append(" ConfirmationAmount: ").Append(ConfirmationAmount).Append("\n"); + sb.Append(" ErrorMessages: ").Append(ErrorMessages).Append("\n"); + sb.Append(" GuaranteedService: ").Append(GuaranteedService).Append("\n"); + sb.Append(" InsuranceAmount: ").Append(InsuranceAmount).Append("\n"); + sb.Append(" NegotiatedRate: ").Append(NegotiatedRate).Append("\n"); + sb.Append(" OtherAmount: ").Append(OtherAmount).Append("\n"); + sb.Append(" RateType: ").Append(RateType).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ServiceType: ").Append(ServiceType).Append("\n"); + sb.Append(" ShippingAmount: ").Append(ShippingAmount).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" ValidationStatus: ").Append(ValidationStatus).Append("\n"); + sb.Append(" WarningMessages: ").Append(WarningMessages).Append("\n"); + sb.Append(" CarrierDeliveryDays: ").Append(CarrierDeliveryDays).Append("\n"); + sb.Append(" DeliveryDays: ").Append(DeliveryDays).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" PackageType: ").Append(PackageType).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" TaxAmount: ").Append(TaxAmount).Append("\n"); + sb.Append(" Zone: ").Append(Zone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateEstimateByCarrierId.cs b/ShipEngineSDK/Model/RateEstimateByCarrierId.cs new file mode 100644 index 00000000..fbcceffa --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimateByCarrierId.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateEstimateByCarrierId +/// +public partial class RateEstimateByCarrierId +{ + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1), Obsolete] + public string? CarrierId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateEstimateByCarrierId {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateEstimateByCarrierIds.cs b/ShipEngineSDK/Model/RateEstimateByCarrierIds.cs new file mode 100644 index 00000000..f6da607c --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimateByCarrierIds.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateEstimateByCarrierIds +/// +public partial class RateEstimateByCarrierIds +{ + + /// + /// Array of Carrier Ids + /// + /// Array of Carrier Ids + [JsonPropertyName("carrier_ids"), JsonPropertyOrder(1)] + public List? CarrierIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateEstimateByCarrierIds {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierIds: ").Append(CarrierIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateEstimateOptions.cs b/ShipEngineSDK/Model/RateEstimateOptions.cs new file mode 100644 index 00000000..e3c6676c --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimateOptions.cs @@ -0,0 +1,182 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateEstimateOptions +/// +public partial class RateEstimateOptions +{ + + /// + /// Gets or Sets AddressResidentialIndicator + /// + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(1)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } + + /// + /// Gets or Sets Confirmation + /// + [JsonPropertyName("confirmation"), JsonPropertyOrder(2)] + public DeliveryConfirmation? Confirmation { get; set; } + + /// + /// The dimensions of the package + /// + /// The dimensions of the package + [JsonPropertyName("dimensions"), JsonPropertyOrder(3)] + public Dimensions? Dimensions { get; set; } + + /// + /// from postal code + /// + /// from postal code + /// + /// Austin + /// + [JsonPropertyName("from_city_locality"), JsonPropertyOrder(4)] + public string? FromCityLocality { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("from_country_code"), JsonPropertyOrder(5)] + public string? FromCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("from_postal_code"), JsonPropertyOrder(6)] + public string? FromPostalCode { get; set; } + + /// + /// From state province + /// + /// From state province + /// + /// Austin + /// + [JsonPropertyName("from_state_province"), JsonPropertyOrder(7)] + public string? FromStateProvince { get; set; } + + /// + /// ship date + /// + /// ship date + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(8)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The city locality the package is being shipped to + /// + /// The city locality the package is being shipped to + /// + /// Austin + /// + [JsonPropertyName("to_city_locality"), JsonPropertyOrder(9)] + public string? ToCityLocality { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("to_country_code"), JsonPropertyOrder(10)] + public string? ToCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("to_postal_code"), JsonPropertyOrder(11)] + public string? ToPostalCode { get; set; } + + /// + /// To state province + /// + /// To state province + /// + /// Houston + /// + [JsonPropertyName("to_state_province"), JsonPropertyOrder(12)] + public string? ToStateProvince { get; set; } + + /// + /// The weight of the package + /// + /// The weight of the package + [JsonPropertyName("weight"), JsonPropertyOrder(13)] + public Weight? Weight { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateEstimateOptions {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" FromCityLocality: ").Append(FromCityLocality).Append("\n"); + sb.Append(" FromCountryCode: ").Append(FromCountryCode).Append("\n"); + sb.Append(" FromPostalCode: ").Append(FromPostalCode).Append("\n"); + sb.Append(" FromStateProvince: ").Append(FromStateProvince).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ToCityLocality: ").Append(ToCityLocality).Append("\n"); + sb.Append(" ToCountryCode: ").Append(ToCountryCode).Append("\n"); + sb.Append(" ToPostalCode: ").Append(ToPostalCode).Append("\n"); + sb.Append(" ToStateProvince: ").Append(ToStateProvince).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateRequestBody.cs b/ShipEngineSDK/Model/RateRequestBody.cs new file mode 100644 index 00000000..64142bed --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestBody.cs @@ -0,0 +1,99 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rate request body +/// +public partial class RateRequestBody +{ + + /// + /// Array of carrier ids to get rates for + /// + /// Array of carrier ids to get rates for + [JsonPropertyName("carrier_ids"), JsonPropertyOrder(1)] + public required List CarrierIds { get; set; } + + /// + /// Calculate the duties and tariffs for cross border shipments. + /// + /// Calculate the duties and tariffs for cross border shipments. + [JsonPropertyName("calculate_tax_amount"), JsonPropertyOrder(2)] + public bool? CalculateTaxAmount { get; set; } + + /// + /// Indicate if it's a return shipment + /// + /// Indicate if it's a return shipment + [JsonPropertyName("is_return"), JsonPropertyOrder(3)] + public bool? IsReturn { get; set; } + + /// + /// Gets or Sets PackageTypes + /// + [JsonPropertyName("package_types"), JsonPropertyOrder(4)] + public List? PackageTypes { get; set; } + + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + /// + /// The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html + [JsonPropertyName("preferred_currency"), JsonPropertyOrder(5)] + public string? PreferredCurrency { get; set; } + + /// + /// Gets or Sets ServiceCodes + /// + [JsonPropertyName("service_codes"), JsonPropertyOrder(6)] + public List? ServiceCodes { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierIds: ").Append(CarrierIds).Append("\n"); + sb.Append(" CalculateTaxAmount: ").Append(CalculateTaxAmount).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" PackageTypes: ").Append(PackageTypes).Append("\n"); + sb.Append(" PreferredCurrency: ").Append(PreferredCurrency).Append("\n"); + sb.Append(" ServiceCodes: ").Append(ServiceCodes).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateRequestByShipmentIds.cs b/ShipEngineSDK/Model/RateRequestByShipmentIds.cs new file mode 100644 index 00000000..ed06ccd8 --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestByShipmentIds.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateRequestByShipmentIds +/// +public partial class RateRequestByShipmentIds +{ + + /// + /// The array of shipment IDs + /// + /// The array of shipment IDs + [JsonPropertyName("shipment_ids"), JsonPropertyOrder(1)] + public required List ShipmentIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateRequestByShipmentIds {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateRequestByShipments.cs b/ShipEngineSDK/Model/RateRequestByShipments.cs new file mode 100644 index 00000000..6855fa4f --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestByShipments.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateRequestByShipments +/// +public partial class RateRequestByShipments +{ + + /// + /// The array of shipments to get bulk rate estimates for + /// + /// The array of shipments to get bulk rate estimates for + [JsonPropertyName("shipments"), JsonPropertyOrder(1)] + public required List Shipments { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateRequestByShipments {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateRequestOptions.cs b/ShipEngineSDK/Model/RateRequestOptions.cs new file mode 100644 index 00000000..0f090d71 --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestOptions.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateRequestOptions +/// +public partial class RateRequestOptions +{ + + /// + /// The rate options + /// + /// The rate options + [JsonPropertyName("rate_options"), JsonPropertyOrder(1)] + public RateRequestBody? RateOptions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateRequestOptions {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" RateOptions: ").Append(RateOptions).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateRequestRateOptions.cs b/ShipEngineSDK/Model/RateRequestRateOptions.cs new file mode 100644 index 00000000..d45f66d3 --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestRateOptions.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateRequestRateOptions +/// +public partial class RateRequestRateOptions +{ + + /// + /// The rate options + /// + /// The rate options + [JsonPropertyName("rate_options"), JsonPropertyOrder(1)] + public RateRequestBody? RateOptions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateRequestRateOptions {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" RateOptions: ").Append(RateOptions).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateResponse.cs b/ShipEngineSDK/Model/RateResponse.cs new file mode 100644 index 00000000..8049a324 --- /dev/null +++ b/ShipEngineSDK/Model/RateResponse.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateResponse +/// +public partial class RateResponse +{ + + /// + /// The rates response + /// + /// The rates response + [JsonPropertyName("rate_response"), JsonPropertyOrder(1)] + public RatesInformation? VarRateResponse { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateResponse {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" VarRateResponse: ").Append(VarRateResponse).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateResponseStatus.cs b/ShipEngineSDK/Model/RateResponseStatus.cs new file mode 100644 index 00000000..45803811 --- /dev/null +++ b/ShipEngineSDK/Model/RateResponseStatus.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible rate response status values +/// +/// The possible rate response status values +[JsonConverter(typeof(RateResponseStatusJsonConverter))] +public class RateResponseStatus +{ + private readonly string _value; + + /// + /// Create a new instance of RateResponseStatus with a predefined value. + /// + internal RateResponseStatus() + { + _value = "working"; + } + + /// + /// Create a new instance of RateResponseStatus with a custom value. + /// + /// The value of the RateResponseStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public RateResponseStatus(string value) + { + _value = value; + } + + /// + /// Enum Working for value: working + /// + public static RateResponseStatus Working { get; } = new("working"); + + + /// + /// Enum Completed for value: completed + /// + public static RateResponseStatus Completed { get; } = new("completed"); + + + /// + /// Enum Partial for value: partial + /// + public static RateResponseStatus Partial { get; } = new("partial"); + + + /// + /// Enum Error for value: error + /// + public static RateResponseStatus Error { get; } = new("error"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is RateResponseStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class RateResponseStatusJsonConverter : JsonConverter +{ + public override RateResponseStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new RateResponseStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, RateResponseStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(RateResponseStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateShipmentRequest.cs b/ShipEngineSDK/Model/RateShipmentRequest.cs new file mode 100644 index 00000000..44a78444 --- /dev/null +++ b/ShipEngineSDK/Model/RateShipmentRequest.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// RateShipmentRequest +/// +public partial class RateShipmentRequest +{ + + /// + /// The shipment object + /// + /// The shipment object + [JsonPropertyName("shipment"), JsonPropertyOrder(1)] + public AddressValidatingShipment? Shipment { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RateShipmentRequest {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RateType.cs b/ShipEngineSDK/Model/RateType.cs new file mode 100644 index 00000000..344bf940 --- /dev/null +++ b/ShipEngineSDK/Model/RateType.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible rate type values +/// +/// The possible rate type values +[JsonConverter(typeof(RateTypeJsonConverter))] +public class RateType +{ + private readonly string _value; + + /// + /// Create a new instance of RateType with a predefined value. + /// + internal RateType() + { + _value = "check"; + } + + /// + /// Create a new instance of RateType with a custom value. + /// + /// The value of the RateType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public RateType(string value) + { + _value = value; + } + + /// + /// Enum Check for value: check + /// + public static RateType Check { get; } = new("check"); + + + /// + /// Enum Shipment for value: shipment + /// + public static RateType Shipment { get; } = new("shipment"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is RateType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class RateTypeJsonConverter : JsonConverter +{ + public override RateType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new RateType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, RateType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(RateType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RatesInformation.cs b/ShipEngineSDK/Model/RatesInformation.cs new file mode 100644 index 00000000..b805e02c --- /dev/null +++ b/ShipEngineSDK/Model/RatesInformation.cs @@ -0,0 +1,131 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A rates information resource +/// +public partial class RatesInformation +{ + + /// + /// When the rate was created + /// + /// When the rate was created + /// + /// se-28529731 + /// + [JsonPropertyName("created_at"), JsonPropertyOrder(1)] + public string? CreatedAt { get; set; } + + /// + /// Gets or Sets Errors + /// + [JsonPropertyName("errors"), JsonPropertyOrder(2)] + public List? Errors { get; set; } + + /// + /// An array of invalid shipment rates + /// + /// An array of invalid shipment rates + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("invalid_rates"), JsonInclude] + public List? InvalidRates { get; set; } + + /// + /// A string that uniquely identifies the rate request + /// + /// A string that uniquely identifies the rate request + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("rate_request_id"), JsonInclude] + public string? RateRequestId { get; set; } + + /// + /// An array of shipment rates + /// + /// An array of shipment rates + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("rates"), JsonInclude] + public List? Rates { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Status + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("status"), JsonInclude] + public RateResponseStatus? Status { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RatesInformation {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" InvalidRates: ").Append(InvalidRates).Append("\n"); + sb.Append(" RateRequestId: ").Append(RateRequestId).Append("\n"); + sb.Append(" Rates: ").Append(Rates).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ReasonCode.cs b/ShipEngineSDK/Model/ReasonCode.cs new file mode 100644 index 00000000..0eaeace2 --- /dev/null +++ b/ShipEngineSDK/Model/ReasonCode.cs @@ -0,0 +1,122 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible normalized reasons a label void request may not have been approved +/// +/// The possible normalized reasons a label void request may not have been approved +[JsonConverter(typeof(ReasonCodeJsonConverter))] +public class ReasonCode +{ + private readonly string _value; + + /// + /// Create a new instance of ReasonCode with a predefined value. + /// + internal ReasonCode() + { + _value = "unknown"; + } + + /// + /// Create a new instance of ReasonCode with a custom value. + /// + /// The value of the ReasonCode + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ReasonCode(string value) + { + _value = value; + } + + /// + /// Enum Unknown for value: unknown + /// + public static ReasonCode Unknown { get; } = new("unknown"); + + + /// + /// Enum Unspecified for value: unspecified + /// + public static ReasonCode Unspecified { get; } = new("unspecified"); + + + /// + /// Enum ValidationFailed for value: validation_failed + /// + public static ReasonCode ValidationFailed { get; } = new("validation_failed"); + + + /// + /// Enum LabelNotFoundWithinVoidPeriod for value: label_not_found_within_void_period + /// + public static ReasonCode LabelNotFoundWithinVoidPeriod { get; } = new("label_not_found_within_void_period"); + + + /// + /// Enum LabelAlreadyUsed for value: label_already_used + /// + public static ReasonCode LabelAlreadyUsed { get; } = new("label_already_used"); + + + /// + /// Enum LabelAlreadyVoided for value: label_already_voided + /// + public static ReasonCode LabelAlreadyVoided { get; } = new("label_already_voided"); + + + /// + /// Enum ContactCarrier for value: contact_carrier + /// + public static ReasonCode ContactCarrier { get; } = new("contact_carrier"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ReasonCode other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ReasonCodeJsonConverter : JsonConverter +{ + public override ReasonCode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ReasonCode(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ReasonCode value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ReasonCode); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RecognizedEntity.cs b/ShipEngineSDK/Model/RecognizedEntity.cs new file mode 100644 index 00000000..bf25169e --- /dev/null +++ b/ShipEngineSDK/Model/RecognizedEntity.cs @@ -0,0 +1,101 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An entity is a single piece of data that was recognized in unstructured text. For example, a city, a postal code, package dimensions, insured value, etc. Each entity includes the original text and the parsed value. +/// +public partial class RecognizedEntity +{ + + /// + /// The index of the last character of this entity within the original text + /// + /// The index of the last character of this entity within the original text + [JsonPropertyName("end_index"), JsonPropertyOrder(1)] + public required int EndIndex { get; set; } + + /// + /// A confidence score between zero and one that indicates how certain the API is that it correctly recognized this entity + /// + /// A confidence score between zero and one that indicates how certain the API is that it correctly recognized this entity + [JsonPropertyName("score"), JsonPropertyOrder(2)] + public required double Score { get; set; } + + /// + /// The index of the first character of this entity within the original text + /// + /// The index of the first character of this entity within the original text + [JsonPropertyName("start_index"), JsonPropertyOrder(3)] + public required int StartIndex { get; set; } + + /// + /// The substring from the original text that was recognized as this entity + /// + /// The substring from the original text that was recognized as this entity + [JsonPropertyName("text"), JsonPropertyOrder(4)] + public required string Text { get; set; } + + /// + /// The Entity type (e.g. \"weight\", \"person\", \"address_line1\", etc.) + /// + /// The Entity type (e.g. \"weight\", \"person\", \"address_line1\", etc.) + [JsonPropertyName("type"), JsonPropertyOrder(5)] + public required string Type { get; set; } + + /// + /// The normalized value of the entity. Most entity results have a `value` field, which is the normalized value of the entity. For example, if the substring \"john doe\" was recognized as a \"person\" entity, then the value might be normalized to have proper capitalization (e.g. \"John Doe\"). Or if the substring \"ft worth\" was recognized as a \"city\" entity, then the value might be normalized to \"Fort Worth\". Some entities have other information in addition to, or instead of a `value`. For example, a \"dimensions\" entity will have separate fields for `length`, `width`, `height`, and `unit`. + /// + /// The normalized value of the entity. Most entity results have a `value` field, which is the normalized value of the entity. For example, if the substring \"john doe\" was recognized as a \"person\" entity, then the value might be normalized to have proper capitalization (e.g. \"John Doe\"). Or if the substring \"ft worth\" was recognized as a \"city\" entity, then the value might be normalized to \"Fort Worth\". Some entities have other information in addition to, or instead of a `value`. For example, a \"dimensions\" entity will have separate fields for `length`, `width`, `height`, and `unit`. + [JsonPropertyName("result"), JsonPropertyOrder(6)] + public Dictionary? Result { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RecognizedEntity {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" EndIndex: ").Append(EndIndex).Append("\n"); + sb.Append(" Score: ").Append(Score).Append("\n"); + sb.Append(" StartIndex: ").Append(StartIndex).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Result: ").Append(Result).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Redirect.cs b/ShipEngineSDK/Model/Redirect.cs new file mode 100644 index 00000000..f2ec2a26 --- /dev/null +++ b/ShipEngineSDK/Model/Redirect.cs @@ -0,0 +1,86 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The resource to return a redirect URL to. +/// +/// The resource to return a redirect URL to. +[JsonConverter(typeof(RedirectJsonConverter))] +public class Redirect +{ + private readonly string _value; + + /// + /// Create a new instance of Redirect with a predefined value. + /// + internal Redirect() + { + _value = "shipengine-dashboard"; + } + + /// + /// Create a new instance of Redirect with a custom value. + /// + /// The value of the Redirect + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public Redirect(string value) + { + _value = value; + } + + /// + /// Enum ShipengineDashboard for value: shipengine-dashboard + /// + public static Redirect ShipengineDashboard { get; } = new("shipengine-dashboard"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is Redirect other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class RedirectJsonConverter : JsonConverter +{ + public override Redirect? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new Redirect(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, Redirect value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(Redirect); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RegulationLevel.cs b/ShipEngineSDK/Model/RegulationLevel.cs new file mode 100644 index 00000000..77681088 --- /dev/null +++ b/ShipEngineSDK/Model/RegulationLevel.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Defines regulation_level +/// +[JsonConverter(typeof(RegulationLevelJsonConverter))] +public class RegulationLevel +{ + private readonly string _value; + + /// + /// Create a new instance of RegulationLevel with a predefined value. + /// + internal RegulationLevel() + { + _value = "lightly_regulated"; + } + + /// + /// Create a new instance of RegulationLevel with a custom value. + /// + /// The value of the RegulationLevel + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public RegulationLevel(string value) + { + _value = value; + } + + /// + /// Enum LightlyRegulated for value: lightly_regulated + /// + public static RegulationLevel LightlyRegulated { get; } = new("lightly_regulated"); + + + /// + /// Enum FullyRegulated for value: fully_regulated + /// + public static RegulationLevel FullyRegulated { get; } = new("fully_regulated"); + + + /// + /// Enum LimitedQuantities for value: limited_quantities + /// + public static RegulationLevel LimitedQuantities { get; } = new("limited_quantities"); + + + /// + /// Enum ExceptedQuantity for value: excepted_quantity + /// + public static RegulationLevel ExceptedQuantity { get; } = new("excepted_quantity"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is RegulationLevel other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class RegulationLevelJsonConverter : JsonConverter +{ + public override RegulationLevel? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new RegulationLevel(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, RegulationLevel value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(RegulationLevel); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/RemoveFromBatchRequestBody.cs b/ShipEngineSDK/Model/RemoveFromBatchRequestBody.cs new file mode 100644 index 00000000..430592da --- /dev/null +++ b/ShipEngineSDK/Model/RemoveFromBatchRequestBody.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A modify batch request body +/// +public partial class RemoveFromBatchRequestBody +{ + + /// + /// Array of Rate IDs to be modifed on the batch + /// + /// Array of Rate IDs to be modifed on the batch + [JsonPropertyName("rate_ids"), JsonPropertyOrder(1)] + public List? RateIds { get; set; } + + /// + /// The Shipment Ids to be modified on the batch + /// + /// The Shipment Ids to be modified on the batch + [JsonPropertyName("shipment_ids"), JsonPropertyOrder(2)] + public List? ShipmentIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RemoveFromBatchRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ResponseMessage.cs b/ShipEngineSDK/Model/ResponseMessage.cs new file mode 100644 index 00000000..f559fa85 --- /dev/null +++ b/ShipEngineSDK/Model/ResponseMessage.cs @@ -0,0 +1,94 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A response message that displays when additional info is needed for an address validation request. +/// +public partial class ResponseMessage +{ + + /// + /// Gets or Sets Code + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("code"), JsonInclude] + public AddressValidationCode? Code { get; set; } + + /// + /// Message explaining the address validation error + /// + /// Message explaining the address validation error + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Invalid Postal Code + /// + [JsonPropertyName("message"), JsonInclude] + public string? Message { get; set; } + + /// + /// Gets or Sets Type + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("type"), JsonInclude] + public AddressValidationMessageType? Type { get; set; } + + /// + /// Gets or Sets DetailCode + /// + [JsonPropertyName("detail_code"), JsonPropertyOrder(4)] + public required AddressValidationDetailCode DetailCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResponseMessage {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" DetailCode: ").Append(DetailCode).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/SchedulePickupRequestBody.cs b/ShipEngineSDK/Model/SchedulePickupRequestBody.cs new file mode 100644 index 00000000..09b450ca --- /dev/null +++ b/ShipEngineSDK/Model/SchedulePickupRequestBody.cs @@ -0,0 +1,188 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A schedule pickup request body +/// +public partial class SchedulePickupRequestBody +{ + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details"), JsonPropertyOrder(1)] + public required ContactDetails ContactDetails { get; set; } + + /// + /// Label IDs that will be included in the pickup request + /// + /// Label IDs that will be included in the pickup request + [JsonPropertyName("label_ids"), JsonPropertyOrder(2)] + public required List LabelIds { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window"), JsonPropertyOrder(3)] + public required PickupWindow PickupWindow { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at"), JsonInclude] + public DateTimeOffset? CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number"), JsonInclude] + public string? ConfirmationNumber { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_address"), JsonInclude] + public Address? PickupAddress { get; set; } + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id"), JsonInclude] + public string? PickupId { get; set; } + + /// + /// Used by some carriers to give special instructions for a package pickup + /// + /// Used by some carriers to give special instructions for a package pickup + [JsonPropertyName("pickup_notes"), JsonPropertyOrder(10)] + public string? PickupNotes { get; set; } + + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_windows"), JsonInclude] + public List? PickupWindows { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SchedulePickupRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" PickupWindow: ").Append(PickupWindow).Append("\n"); + sb.Append(" CancelledAt: ").Append(CancelledAt).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ConfirmationNumber: ").Append(ConfirmationNumber).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" PickupNotes: ").Append(PickupNotes).Append("\n"); + sb.Append(" PickupWindows: ").Append(PickupWindows).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/SchedulePickupResponseBody.cs b/ShipEngineSDK/Model/SchedulePickupResponseBody.cs new file mode 100644 index 00000000..3c7ae855 --- /dev/null +++ b/ShipEngineSDK/Model/SchedulePickupResponseBody.cs @@ -0,0 +1,210 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// SchedulePickupResponseBody +/// +public partial class SchedulePickupResponseBody +{ + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude] + public List? Errors { get; set; } + + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur + /// + /// aa3d8e8e-462b-4476-9618-72db7f7b7009 + /// + [JsonPropertyName("request_id"), JsonPropertyOrder(2)] + public required Guid RequestId { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at"), JsonInclude] + public DateTimeOffset? CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number"), JsonInclude] + public string? ConfirmationNumber { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details"), JsonPropertyOrder(6)] + public ContactDetails? ContactDetails { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Label IDs that will be included in the pickup request + /// + /// Label IDs that will be included in the pickup request + [JsonPropertyName("label_ids"), JsonPropertyOrder(8)] + public List? LabelIds { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_address"), JsonInclude] + public Address? PickupAddress { get; set; } + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id"), JsonInclude] + public string? PickupId { get; set; } + + /// + /// Used by some carriers to give special instructions for a package pickup + /// + /// Used by some carriers to give special instructions for a package pickup + [JsonPropertyName("pickup_notes"), JsonPropertyOrder(11)] + public string? PickupNotes { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window"), JsonPropertyOrder(12)] + public PickupWindow? PickupWindow { get; set; } + + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// An array of available pickup windows. Carriers can return multiple times that they will pickup packages. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("pickup_windows"), JsonInclude] + public List? PickupWindows { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SchedulePickupResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" CancelledAt: ").Append(CancelledAt).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ConfirmationNumber: ").Append(ConfirmationNumber).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" PickupNotes: ").Append(PickupNotes).Append("\n"); + sb.Append(" PickupWindow: ").Append(PickupWindow).Append("\n"); + sb.Append(" PickupWindows: ").Append(PickupWindows).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Service.cs b/ShipEngineSDK/Model/Service.cs new file mode 100644 index 00000000..51826222 --- /dev/null +++ b/ShipEngineSDK/Model/Service.cs @@ -0,0 +1,139 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A service offered by the carrier +/// +public partial class Service +{ + + /// + /// A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc. + /// + /// A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc. + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_code"), JsonPropertyOrder(1)] + public string? CarrierCode { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public string? CarrierId { get; set; } + + /// + /// Supports domestic shipping + /// + /// Supports domestic shipping + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("domestic"), JsonInclude] + public bool? Domestic { get; set; } + + /// + /// Supports international shipping. + /// + /// Supports international shipping. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("international"), JsonInclude] + public bool? International { get; set; } + + /// + /// Carrier supports multiple packages per shipment + /// + /// Carrier supports multiple packages per shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("is_multi_package_supported"), JsonInclude] + public bool? IsMultiPackageSupported { get; set; } + + /// + /// User friendly service name + /// + /// User friendly service name + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// USPS First Class Mail + /// + [JsonPropertyName("name"), JsonInclude] + public string? Name { get; set; } + + /// + /// service code + /// + /// service code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// usps_media_mail + /// + [JsonPropertyName("service_code"), JsonInclude] + public string? ServiceCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Service {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" Domestic: ").Append(Domestic).Append("\n"); + sb.Append(" International: ").Append(International).Append("\n"); + sb.Append(" IsMultiPackageSupported: ").Append(IsMultiPackageSupported).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Shipment.cs b/ShipEngineSDK/Model/Shipment.cs new file mode 100644 index 00000000..1357c0f7 --- /dev/null +++ b/ShipEngineSDK/Model/Shipment.cs @@ -0,0 +1,312 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight. > **Note:** Either `ship_from` or `warehouse_id` must be set. +/// +public partial class Shipment +{ + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(1)] + public required AdvancedShipmentOptions AdvancedOptions { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(2)] + public required string CarrierId { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(3)] + public required DeliveryConfirmation Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(5)] + public required InsuranceProvider InsuranceProvider { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(7)] + public required List Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(8)] + public required ShippingAddress ReturnTo { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(9)] + public required string ServiceCode { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(10)] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(11)] + public required ShippingAddress ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(12)] + public required ShippingAddressTo ShipTo { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(17)] + public string? ComparisonRateType { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(18)] + public required InternationalShipmentOptions Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(19)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(20)] + public string? ExternalShipmentId { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(21)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(22)] + public List? Items { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(23)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(24)] + public string? ShipmentNumber { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(25)] + public string? ShippingRuleId { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(26)] + public List? TaxIdentifiers { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(27)] + public required string WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Shipment {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShipmentIdRequest.cs b/ShipEngineSDK/Model/ShipmentIdRequest.cs new file mode 100644 index 00000000..68ae4efb --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentIdRequest.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ShipmentIdRequest +/// +public partial class ShipmentIdRequest +{ + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonPropertyOrder(1)] + public string? ShipmentId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShipmentIdRequest {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShipmentItem.cs b/ShipEngineSDK/Model/ShipmentItem.cs new file mode 100644 index 00000000..e91a0a23 --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentItem.cs @@ -0,0 +1,127 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A shipment item +/// +public partial class ShipmentItem +{ + + /// + /// Amazon Standard Identification Number + /// + /// Amazon Standard Identification Number + /// + /// B00005N5PF + /// + [JsonPropertyName("asin"), JsonPropertyOrder(1)] + public string? Asin { get; set; } + + /// + /// external order id + /// + /// external order id + [JsonPropertyName("external_order_id"), JsonPropertyOrder(2)] + public string? ExternalOrderId { get; set; } + + /// + /// external order item id + /// + /// external order item id + [JsonPropertyName("external_order_item_id"), JsonPropertyOrder(3)] + public string? ExternalOrderItemId { get; set; } + + /// + /// item name + /// + /// item name + [JsonPropertyName("name"), JsonPropertyOrder(4)] + public string? Name { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(5)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// The quantity of this item included in the shipment + /// + /// The quantity of this item included in the shipment + [JsonPropertyName("quantity"), JsonPropertyOrder(6)] + public int? Quantity { get; set; } + + /// + /// sales order id + /// + /// sales order id + [JsonPropertyName("sales_order_id"), JsonPropertyOrder(7)] + public string? SalesOrderId { get; set; } + + /// + /// sales order item id + /// + /// sales order item id + [JsonPropertyName("sales_order_item_id"), JsonPropertyOrder(8)] + public string? SalesOrderItemId { get; set; } + + /// + /// Item Stock Keeping Unit + /// + /// Item Stock Keeping Unit + [JsonPropertyName("sku"), JsonPropertyOrder(9)] + public string? Sku { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShipmentItem {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Asin: ").Append(Asin).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalOrderItemId: ").Append(ExternalOrderItemId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" SalesOrderId: ").Append(SalesOrderId).Append("\n"); + sb.Append(" SalesOrderItemId: ").Append(SalesOrderItemId).Append("\n"); + sb.Append(" Sku: ").Append(Sku).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShipmentRequest.cs b/ShipEngineSDK/Model/ShipmentRequest.cs new file mode 100644 index 00000000..8edca8d5 --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentRequest.cs @@ -0,0 +1,237 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight. > **Note:** Either `ship_from` or `warehouse_id` must be set. +/// +public partial class ShipmentRequest +{ + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(1)] + public required string CarrierId { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(2)] + public required List Packages { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(3)] + public required string ServiceCode { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(4)] + public required ShippingAddressTo ShipTo { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(5)] + public AdvancedShipmentOptions? AdvancedOptions { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(6)] + public string? ComparisonRateType { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(7)] + public DeliveryConfirmation? Confirmation { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(8)] + public InternationalShipmentOptions? Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(9)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(10)] + public string? ExternalShipmentId { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(11)] + public InsuranceProvider? InsuranceProvider { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(12)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(13)] + public List? Items { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(14)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(15)] + public ShippingAddress? ReturnTo { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(16)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(17)] + public ShippingAddressFrom? ShipFrom { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(18)] + public string? ShipmentNumber { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(19)] + public string? ShippingRuleId { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(20)] + public List? TaxIdentifiers { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(21)] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShipmentRequest {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShipmentStatus.cs b/ShipEngineSDK/Model/ShipmentStatus.cs new file mode 100644 index 00000000..e8a9a24c --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentStatus.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible shipment status values +/// +/// The possible shipment status values +[JsonConverter(typeof(ShipmentStatusJsonConverter))] +public class ShipmentStatus +{ + private readonly string _value; + + /// + /// Create a new instance of ShipmentStatus with a predefined value. + /// + internal ShipmentStatus() + { + _value = "pending"; + } + + /// + /// Create a new instance of ShipmentStatus with a custom value. + /// + /// The value of the ShipmentStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ShipmentStatus(string value) + { + _value = value; + } + + /// + /// Enum Pending for value: pending + /// + public static ShipmentStatus Pending { get; } = new("pending"); + + + /// + /// Enum Processing for value: processing + /// + public static ShipmentStatus Processing { get; } = new("processing"); + + + /// + /// Enum LabelPurchased for value: label_purchased + /// + public static ShipmentStatus LabelPurchased { get; } = new("label_purchased"); + + + /// + /// Enum Cancelled for value: cancelled + /// + public static ShipmentStatus Cancelled { get; } = new("cancelled"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ShipmentStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ShipmentStatusJsonConverter : JsonConverter +{ + public override ShipmentStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ShipmentStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ShipmentStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ShipmentStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShipmentsSortBy.cs b/ShipEngineSDK/Model/ShipmentsSortBy.cs new file mode 100644 index 00000000..c7a4c655 --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentsSortBy.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible shipments sort by values +/// +/// The possible shipments sort by values +[JsonConverter(typeof(ShipmentsSortByJsonConverter))] +public class ShipmentsSortBy +{ + private readonly string _value; + + /// + /// Create a new instance of ShipmentsSortBy with a predefined value. + /// + internal ShipmentsSortBy() + { + _value = "modified_at"; + } + + /// + /// Create a new instance of ShipmentsSortBy with a custom value. + /// + /// The value of the ShipmentsSortBy + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ShipmentsSortBy(string value) + { + _value = value; + } + + /// + /// Enum ModifiedAt for value: modified_at + /// + public static ShipmentsSortBy ModifiedAt { get; } = new("modified_at"); + + + /// + /// Enum CreatedAt for value: created_at + /// + public static ShipmentsSortBy CreatedAt { get; } = new("created_at"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ShipmentsSortBy other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ShipmentsSortByJsonConverter : JsonConverter +{ + public override ShipmentsSortBy? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ShipmentsSortBy(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ShipmentsSortBy value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ShipmentsSortBy); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShippingAddress.cs b/ShipEngineSDK/Model/ShippingAddress.cs new file mode 100644 index 00000000..e2d5e938 --- /dev/null +++ b/ShipEngineSDK/Model/ShippingAddress.cs @@ -0,0 +1,190 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ShippingAddress +/// +public partial class ShippingAddress +{ + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public required string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(2)] + public required string CityLocality { get; set; } + + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// John Doe + /// + [JsonPropertyName("name"), JsonPropertyOrder(3)] + public required string Name { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(4)] + public required string PostalCode { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// Manitoba + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(5)] + public required string StateProvince { get; set; } + + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// Unit 408 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(6)] + public string? AddressLine2 { get; set; } + + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// Building #7 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(7)] + public string? AddressLine3 { get; set; } + + /// + /// Indicates whether this is a residential address. + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(8)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// The Home Depot + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(9)] + public string? CompanyName { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(10)] + public string? CountryCode { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(11)] + public string? Email { get; set; } + + /// + /// Additional text about how to handle the shipment at this address. + /// + /// Additional text about how to handle the shipment at this address. + [JsonPropertyName("instructions"), JsonPropertyOrder(12)] + public string? Instructions { get; set; } + + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// +1 204-253-9411 ext. 123 + /// + [JsonPropertyName("phone"), JsonPropertyOrder(13)] + public string? Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShippingAddress {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShippingAddressFrom.cs b/ShipEngineSDK/Model/ShippingAddressFrom.cs new file mode 100644 index 00000000..43f5da0e --- /dev/null +++ b/ShipEngineSDK/Model/ShippingAddressFrom.cs @@ -0,0 +1,190 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ShippingAddressFrom +/// +public partial class ShippingAddressFrom +{ + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public required string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(2)] + public required string CityLocality { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(3)] + public required string CountryCode { get; set; } + + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// John Doe + /// + [JsonPropertyName("name"), JsonPropertyOrder(4)] + public required string Name { get; set; } + + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// +1 204-253-9411 ext. 123 + /// + [JsonPropertyName("phone"), JsonPropertyOrder(5)] + public required string Phone { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(6)] + public required string PostalCode { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// Manitoba + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(7)] + public required string StateProvince { get; set; } + + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// Unit 408 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(8)] + public string? AddressLine2 { get; set; } + + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// Building #7 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(9)] + public string? AddressLine3 { get; set; } + + /// + /// Indicates whether this is a residential address. + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(10)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// The Home Depot + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(11)] + public string? CompanyName { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(12)] + public string? Email { get; set; } + + /// + /// Additional text about how to handle the shipment at this address. + /// + /// Additional text about how to handle the shipment at this address. + [JsonPropertyName("instructions"), JsonPropertyOrder(13)] + public string? Instructions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShippingAddressFrom {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ShippingAddressTo.cs b/ShipEngineSDK/Model/ShippingAddressTo.cs new file mode 100644 index 00000000..a5b2db68 --- /dev/null +++ b/ShipEngineSDK/Model/ShippingAddressTo.cs @@ -0,0 +1,197 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ShippingAddressTo +/// +public partial class ShippingAddressTo +{ + + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. + /// + /// 1999 Bishop Grandin Blvd. + /// + [JsonPropertyName("address_line1"), JsonPropertyOrder(1)] + public required string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality"), JsonPropertyOrder(2)] + public required string CityLocality { get; set; } + + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. + /// + /// John Doe + /// + [JsonPropertyName("name"), JsonPropertyOrder(3)] + public required string Name { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code"), JsonPropertyOrder(4)] + public required string PostalCode { get; set; } + + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. + /// + /// Manitoba + /// + [JsonPropertyName("state_province"), JsonPropertyOrder(5)] + public required string StateProvince { get; set; } + + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// The second line of the street address. For some addresses, this line may not be needed. + /// + /// Unit 408 + /// + [JsonPropertyName("address_line2"), JsonPropertyOrder(6)] + public string? AddressLine2 { get; set; } + + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// The third line of the street address. For some addresses, this line may not be needed. + /// + /// Building #7 + /// + [JsonPropertyName("address_line3"), JsonPropertyOrder(7)] + public string? AddressLine3 { get; set; } + + /// + /// Indicates whether this is a residential address. + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(8)] + public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } + + /// + /// If this is a business address, then the company name should be specified here. + /// + /// If this is a business address, then the company name should be specified here. + /// + /// The Home Depot + /// + [JsonPropertyName("company_name"), JsonPropertyOrder(9)] + public string? CompanyName { get; set; } + + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(10)] + public string? CountryCode { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email"), JsonPropertyOrder(11)] + public string? Email { get; set; } + + /// + /// Gets or Sets Geolocation + /// + [JsonPropertyName("geolocation"), JsonPropertyOrder(12)] + public List? Geolocation { get; set; } + + /// + /// Additional text about how to handle the shipment at this address. + /// + /// Additional text about how to handle the shipment at this address. + [JsonPropertyName("instructions"), JsonPropertyOrder(13)] + public string? Instructions { get; set; } + + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// The phone number of a contact person at this address. The format of this phone number varies depending on the country. + /// + /// +1 204-253-9411 ext. 123 + /// + [JsonPropertyName("phone"), JsonPropertyOrder(14)] + public string? Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShippingAddressTo {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); + sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Geolocation: ").Append(Geolocation).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/SmartPostHub.cs b/ShipEngineSDK/Model/SmartPostHub.cs new file mode 100644 index 00000000..83f886a0 --- /dev/null +++ b/ShipEngineSDK/Model/SmartPostHub.cs @@ -0,0 +1,296 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible smart post hub values +/// +/// The possible smart post hub values +[JsonConverter(typeof(SmartPostHubJsonConverter))] +public class SmartPostHub +{ + private readonly string _value; + + /// + /// Create a new instance of SmartPostHub with a predefined value. + /// + internal SmartPostHub() + { + _value = "none"; + } + + /// + /// Create a new instance of SmartPostHub with a custom value. + /// + /// The value of the SmartPostHub + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public SmartPostHub(string value) + { + _value = value; + } + + /// + /// Enum None for value: none + /// + public static SmartPostHub None { get; } = new("none"); + + + /// + /// Enum AllentownPa for value: allentown_pa + /// + public static SmartPostHub AllentownPa { get; } = new("allentown_pa"); + + + /// + /// Enum AtlantaGa for value: atlanta_ga + /// + public static SmartPostHub AtlantaGa { get; } = new("atlanta_ga"); + + + /// + /// Enum BaltimoreMd for value: baltimore_md + /// + public static SmartPostHub BaltimoreMd { get; } = new("baltimore_md"); + + + /// + /// Enum CharlotteNc for value: charlotte_nc + /// + public static SmartPostHub CharlotteNc { get; } = new("charlotte_nc"); + + + /// + /// Enum ChinoCa for value: chino_ca + /// + public static SmartPostHub ChinoCa { get; } = new("chino_ca"); + + + /// + /// Enum DallasTx for value: dallas_tx + /// + public static SmartPostHub DallasTx { get; } = new("dallas_tx"); + + + /// + /// Enum DenverCo for value: denver_co + /// + public static SmartPostHub DenverCo { get; } = new("denver_co"); + + + /// + /// Enum DetroitMi for value: detroit_mi + /// + public static SmartPostHub DetroitMi { get; } = new("detroit_mi"); + + + /// + /// Enum EdisonNj for value: edison_nj + /// + public static SmartPostHub EdisonNj { get; } = new("edison_nj"); + + + /// + /// Enum GroveCityOh for value: grove_city_oh + /// + public static SmartPostHub GroveCityOh { get; } = new("grove_city_oh"); + + + /// + /// Enum GroveportOh for value: groveport_oh + /// + public static SmartPostHub GroveportOh { get; } = new("groveport_oh"); + + + /// + /// Enum HoustonTx for value: houston_tx + /// + public static SmartPostHub HoustonTx { get; } = new("houston_tx"); + + + /// + /// Enum IndianapolisIn for value: indianapolis_in + /// + public static SmartPostHub IndianapolisIn { get; } = new("indianapolis_in"); + + + /// + /// Enum KansasCityKs for value: kansas_city_ks + /// + public static SmartPostHub KansasCityKs { get; } = new("kansas_city_ks"); + + + /// + /// Enum LosAngelesCa for value: los_angeles_ca + /// + public static SmartPostHub LosAngelesCa { get; } = new("los_angeles_ca"); + + + /// + /// Enum MartinsburgWv for value: martinsburg_wv + /// + public static SmartPostHub MartinsburgWv { get; } = new("martinsburg_wv"); + + + /// + /// Enum MemphisTn for value: memphis_tn + /// + public static SmartPostHub MemphisTn { get; } = new("memphis_tn"); + + + /// + /// Enum MinneapolisMn for value: minneapolis_mn + /// + public static SmartPostHub MinneapolisMn { get; } = new("minneapolis_mn"); + + + /// + /// Enum NewBerlinWi for value: new_berlin_wi + /// + public static SmartPostHub NewBerlinWi { get; } = new("new_berlin_wi"); + + + /// + /// Enum NorthboroughMa for value: northborough_ma + /// + public static SmartPostHub NorthboroughMa { get; } = new("northborough_ma"); + + + /// + /// Enum OrlandoFl for value: orlando_fl + /// + public static SmartPostHub OrlandoFl { get; } = new("orlando_fl"); + + + /// + /// Enum PhoneixAz for value: phoneix_az + /// + public static SmartPostHub PhoneixAz { get; } = new("phoneix_az"); + + + /// + /// Enum PittsburghPa for value: pittsburgh_pa + /// + public static SmartPostHub PittsburghPa { get; } = new("pittsburgh_pa"); + + + /// + /// Enum RenoNv for value: reno_nv + /// + public static SmartPostHub RenoNv { get; } = new("reno_nv"); + + + /// + /// Enum SacramentoCa for value: sacramento_ca + /// + public static SmartPostHub SacramentoCa { get; } = new("sacramento_ca"); + + + /// + /// Enum SaltLakeCityUt for value: salt_lake_city_ut + /// + public static SmartPostHub SaltLakeCityUt { get; } = new("salt_lake_city_ut"); + + + /// + /// Enum SeattleWa for value: seattle_wa + /// + public static SmartPostHub SeattleWa { get; } = new("seattle_wa"); + + + /// + /// Enum StLouisMo for value: st_louis_mo + /// + public static SmartPostHub StLouisMo { get; } = new("st_louis_mo"); + + + /// + /// Enum WindsorCt for value: windsor_ct + /// + public static SmartPostHub WindsorCt { get; } = new("windsor_ct"); + + + /// + /// Enum NewarkNy for value: newark_ny + /// + public static SmartPostHub NewarkNy { get; } = new("newark_ny"); + + + /// + /// Enum SouthBrunswickNj for value: south_brunswick_nj + /// + public static SmartPostHub SouthBrunswickNj { get; } = new("south_brunswick_nj"); + + + /// + /// Enum ScrantonPa for value: scranton_pa + /// + public static SmartPostHub ScrantonPa { get; } = new("scranton_pa"); + + + /// + /// Enum WheelingIl for value: wheeling_il + /// + public static SmartPostHub WheelingIl { get; } = new("wheeling_il"); + + + /// + /// Enum MiddletownCt for value: middletown_ct + /// + public static SmartPostHub MiddletownCt { get; } = new("middletown_ct"); + + + /// + /// Enum PortlandOr for value: portland_or + /// + public static SmartPostHub PortlandOr { get; } = new("portland_or"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is SmartPostHub other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class SmartPostHubJsonConverter : JsonConverter +{ + public override SmartPostHub? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new SmartPostHub(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, SmartPostHub value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(SmartPostHub); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/SortDir.cs b/ShipEngineSDK/Model/SortDir.cs new file mode 100644 index 00000000..eb5b579d --- /dev/null +++ b/ShipEngineSDK/Model/SortDir.cs @@ -0,0 +1,92 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Controls the sort order of queries |Value |Description |:- -- -- -- --|:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`asc` |Return results in ascending order |`desc` |Return results in descending order +/// +/// Controls the sort order of queries |Value |Description |:- -- -- -- --|:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`asc` |Return results in ascending order |`desc` |Return results in descending order +[JsonConverter(typeof(SortDirJsonConverter))] +public class SortDir +{ + private readonly string _value; + + /// + /// Create a new instance of SortDir with a predefined value. + /// + internal SortDir() + { + _value = "asc"; + } + + /// + /// Create a new instance of SortDir with a custom value. + /// + /// The value of the SortDir + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public SortDir(string value) + { + _value = value; + } + + /// + /// Enum Asc for value: asc + /// + public static SortDir Asc { get; } = new("asc"); + + + /// + /// Enum Desc for value: desc + /// + public static SortDir Desc { get; } = new("desc"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is SortDir other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class SortDirJsonConverter : JsonConverter +{ + public override SortDir? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new SortDir(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, SortDir value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(SortDir); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/StatusCode.cs b/ShipEngineSDK/Model/StatusCode.cs new file mode 100644 index 00000000..abf7fde2 --- /dev/null +++ b/ShipEngineSDK/Model/StatusCode.cs @@ -0,0 +1,128 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The tracking status codes |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`UN` | Unknown |`AC` | Accepted |`IT` | In Transit |`DE` | Delivered |`EX` | Exception |`AT` | Delivery Attempt |`NY` | Not Yet In System |`SP` | Delivered To Collection Location +/// +/// The tracking status codes |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`UN` | Unknown |`AC` | Accepted |`IT` | In Transit |`DE` | Delivered |`EX` | Exception |`AT` | Delivery Attempt |`NY` | Not Yet In System |`SP` | Delivered To Collection Location +[JsonConverter(typeof(StatusCodeJsonConverter))] +public class StatusCode +{ + private readonly string _value; + + /// + /// Create a new instance of StatusCode with a predefined value. + /// + internal StatusCode() + { + _value = "UN"; + } + + /// + /// Create a new instance of StatusCode with a custom value. + /// + /// The value of the StatusCode + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public StatusCode(string value) + { + _value = value; + } + + /// + /// Enum UN for value: UN + /// + public static StatusCode UN { get; } = new("UN"); + + + /// + /// Enum AC for value: AC + /// + public static StatusCode AC { get; } = new("AC"); + + + /// + /// Enum IT for value: IT + /// + public static StatusCode IT { get; } = new("IT"); + + + /// + /// Enum DE for value: DE + /// + public static StatusCode DE { get; } = new("DE"); + + + /// + /// Enum EX for value: EX + /// + public static StatusCode EX { get; } = new("EX"); + + + /// + /// Enum AT for value: AT + /// + public static StatusCode AT { get; } = new("AT"); + + + /// + /// Enum NY for value: NY + /// + public static StatusCode NY { get; } = new("NY"); + + + /// + /// Enum SP for value: SP + /// + public static StatusCode SP { get; } = new("SP"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is StatusCode other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class StatusCodeJsonConverter : JsonConverter +{ + public override StatusCode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new StatusCode(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, StatusCode value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(StatusCode); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/StatusDetailCode.cs b/ShipEngineSDK/Model/StatusDetailCode.cs new file mode 100644 index 00000000..145820e4 --- /dev/null +++ b/ShipEngineSDK/Model/StatusDetailCode.cs @@ -0,0 +1,512 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The tracking status detail codes |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | `CARRIER_STATUS_NOT_MAPPED` | Status not mapped. Please check the carrier's website for updates. | `SHIPMENT_CREATED` | Your tracking number is ready. Your parcel is waiting to be registered in the carrier system and scheduled for pickup. | `AWAITING_PICKUP_DROP_OFF` | Your parcel is waiting to be handed over to the carrier. | `DROPPED_OFF` | Your parcel has been dropped off and is ready for carrier processing. | `ELEC_ADVICE_RECD_BY_CARRIER` | Your shipment is now in the carrier's system. | `PICKED_UP` | Your parcel has been picked up by the carrier. | `CUSTOMS_CLEARED` | Your parcel has cleared customs and is continuing its journey. | `CUSTOMS_PROCESSING` | Your parcel is currently being processed by customs. | `DELIVERY_ARRANGED_WITH_RECIPIENT` | Your parcel's delivery has been arranged with the carrier. | `HUB_SCAN_OUT` | Your parcel has left the carrier's hub. | `HUB_SCAN_IN` | Your parcel has arrived at the carrier's hub for processing. | `IN_TRANSIT` | Your shipment is on its way between the carrier hubs. | `INFORMATION` | The carrier has shared additional information about your parcel. | `PARCEL_OVER_LABELLED` | Your parcel's label has been updated by the carrier, which may affect tracking visibility. | `PARCEL_UPDATE_NOTIFICATION` | The carrier has sent you an update on your parcel status via SMS or email. | `RECEIVED_BY_CARRIER` | Your parcel has been received by the carrier and is beginning its journey. | `RECEIVED_LOCAL_DELIVERY_DEPOT` | Your parcel has arrived at the local delivery depot and is almost ready for delivery. | `SUB_CONTRACTOR_EVENT` | The carrier has shared additional information about your parcel's handling by a delivery partner. | `SUB_CONTRACTOR_RECEIVED` | Your parcel has been received by the carrier's local delivery partner. | `PARCEL_REDIRECTED` | Your parcel has been redirected to a new delivery address per your request. | `DELIVERY_SCHEDULED` | Your parcel's delivery has been scheduled and will soon be out for delivery. | `HUB_PROCESSING` | Your parcel is being processed at a carrier hub. | `DELIVERY_RESCHEDULED` | Your parcel's delivery has been rescheduled due to operational issues. | `ATTEMPTED_DELIVERY` | The carrier attempted to deliver your parcel but was unable to complete delivery. | `ATTEMPTED_DELIVERY_FINAL` | The carrier made a final attempt to deliver your parcel but was unable to complete delivery. Please check the carrier's instructions for next steps. | `COD_AMOUNT_PAID` | Cash on delivery payment received. | `CUSTOMER_CARDED` | Delivery attempt failed. Please follow delivery instructions left by the carrier. | `OUT_FOR_DELIVERY` | Your parcel is on its way and will be delivered today. | `AWAITING_COLLECTION_FROM_PICKUP_POINT` | Your parcel is ready for collection at the selected pickup point. | `COLLECT_AT_LOCAL_PO` | Your parcel is ready for collection at your local post office. | `CUSTOMER_TO_COLLECT_FROM_CARRIER` | Your parcel is available for collection from the carrier's local delivery unit. | `DELIVERED_TO_RECEPTION` | Your parcel has been delivered to your building's reception or designated mail area. | `DELIVERED` | Your parcel has been successfully delivered. | `DELIVERED_DAMAGED` | Your parcel was delivered but arrived with visible damage. | `DELIVERED_IN_PART` | Part of your shipment has been delivered. Check for updates on the rest. | `DELIVERED_SPECIFIED_SAFE_PLACE` | Your parcel has been delivered to your specified safe place. | `DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION` | Your parcel was delivered to an alternative location due to the delivery company being unable to deliver it to the specified address. Check carrier instructions for pickup details. | `DELIVERED_TO_NEIGHBOUR` | Your parcel was delivered to your neighbor. | `DELIVERED_TO_PO_BOX` | Your parcel has been delivered to your specified PO Box. | `PARCEL_COLLECTED_FROM_PICKUP_POINT` | Your package has been picked up from the pick up point. | `POST_TRANSIT_STATUS` | The carrier has added more information about your delivery. | `PROOF_OF_DELIVERY` | The carrier has confirmed delivery with proof, such as a signature or photo. | `PICKUP_FAILED` | Parcel pickup failed. The delivery company will try again soon. | `NOT_YET_RECEIVED_BY_CARRIER` | The carrier has not yet received your parcel, which may cause a delay. | `PARCEL_DAMAGED` | Your parcel was damaged in transit but will still be delivered. | `ADDRESS_QUERY` | There is an issue with the delivery address, which may delay your parcel. | `CARRIER_DELAYS` | Your parcel is delayed due to issues within the carrier network. | `DELAYED_NOT_CARRIER` | Your parcel is delayed due to circumstances beyond the carrier's control. | `HELD_BY_CARRIER` | Your parcel is being held due to an operational issue. Contact with the carrier for more information. | `HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING` | Your parcel is being held by the carrier for customs documentation checks. This may occur when the carrier must confirm documentation before the parcel can continue its journey. | `HELD_BY_CUSTOMS` | Your parcel is being held at customs, which may delay delivery. | `HELD_BY_EXPORT_CUSTOMS` | Your parcel is held at export customs, which may delay delivery. | `HELD_BY_IMPORT_CUSTOMS` | Your parcel is held at import customs and may require action to proceed. | `INCORRECT_DECLARATION` | Your parcel has been incorrectly declared but is still moving forward for delivery. | `MISROUTED` | Your parcel was sent to the wrong place due to a routing error but is being redirected. | `PARCEL_REPACKED` | Your parcel was repackaged by the carrier due to damage and will still be delivered. | `RECD_BY_CARRIER_NO_ELEC_ADVICE` | Your parcel has been received by the carrier but may experience delays due to missing pre-advice. | `COD_AMOUNT_NOT_PAID` | Delivery failed due to unpaid cash on delivery. Please follow carrier instructions. | `CUSTOMER_IDENTIFICATION_FAILED` | Delivery couldn't be completed as identification requirements were not met. | `NO_ACCESS_TO_RECIPIENTS_ADDRESS` | The carrier couldn't access the delivery location due to restricted entry. | `CANCELLED` | Your parcel has been cancelled. | `CUSTOMER_MOVED` | Delivery failed as the recipient is no longer at the specified address. Your parcel is being returned. | `HAZARDOUS_PROHIBITED` | Your parcel contains restricted items and will not be delivered. | `NOT_COLLECTED_FROM_PICKUP_POINT` | Your parcel was not collected from the pickup point within the designated time and will be returned. | `NOT_DELIVERED` | All delivery attempts failed. Your parcel is being returned to the sender. | `NOT_DELIVERED_ADDRESSEE_DECEASED` | The parcel could not be delivered as the addressee is reported deceased. | `PARCEL_DISPOSED` | Your parcel has been disposed of due to its contents or condition and will not be delivered. | `PARCEL_LOST` | The carrier has reported that your parcel is lost and will not be delivered. | `PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY` | The parcel cannot be delivered as it exceeds the carrier's service limits. | `REFUSED_BY_CUSTOMER` | You have refused the parcel, and it will be returned to the sender. | `RETURN_TO_SENDER` | Your parcel is being returned to the sender due to delivery issues. | `UNSPECIFIED_EXCEPTION` | The carrier has reported an issue with your parcel, but details are unavailable. +/// +/// The tracking status detail codes |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | `CARRIER_STATUS_NOT_MAPPED` | Status not mapped. Please check the carrier's website for updates. | `SHIPMENT_CREATED` | Your tracking number is ready. Your parcel is waiting to be registered in the carrier system and scheduled for pickup. | `AWAITING_PICKUP_DROP_OFF` | Your parcel is waiting to be handed over to the carrier. | `DROPPED_OFF` | Your parcel has been dropped off and is ready for carrier processing. | `ELEC_ADVICE_RECD_BY_CARRIER` | Your shipment is now in the carrier's system. | `PICKED_UP` | Your parcel has been picked up by the carrier. | `CUSTOMS_CLEARED` | Your parcel has cleared customs and is continuing its journey. | `CUSTOMS_PROCESSING` | Your parcel is currently being processed by customs. | `DELIVERY_ARRANGED_WITH_RECIPIENT` | Your parcel's delivery has been arranged with the carrier. | `HUB_SCAN_OUT` | Your parcel has left the carrier's hub. | `HUB_SCAN_IN` | Your parcel has arrived at the carrier's hub for processing. | `IN_TRANSIT` | Your shipment is on its way between the carrier hubs. | `INFORMATION` | The carrier has shared additional information about your parcel. | `PARCEL_OVER_LABELLED` | Your parcel's label has been updated by the carrier, which may affect tracking visibility. | `PARCEL_UPDATE_NOTIFICATION` | The carrier has sent you an update on your parcel status via SMS or email. | `RECEIVED_BY_CARRIER` | Your parcel has been received by the carrier and is beginning its journey. | `RECEIVED_LOCAL_DELIVERY_DEPOT` | Your parcel has arrived at the local delivery depot and is almost ready for delivery. | `SUB_CONTRACTOR_EVENT` | The carrier has shared additional information about your parcel's handling by a delivery partner. | `SUB_CONTRACTOR_RECEIVED` | Your parcel has been received by the carrier's local delivery partner. | `PARCEL_REDIRECTED` | Your parcel has been redirected to a new delivery address per your request. | `DELIVERY_SCHEDULED` | Your parcel's delivery has been scheduled and will soon be out for delivery. | `HUB_PROCESSING` | Your parcel is being processed at a carrier hub. | `DELIVERY_RESCHEDULED` | Your parcel's delivery has been rescheduled due to operational issues. | `ATTEMPTED_DELIVERY` | The carrier attempted to deliver your parcel but was unable to complete delivery. | `ATTEMPTED_DELIVERY_FINAL` | The carrier made a final attempt to deliver your parcel but was unable to complete delivery. Please check the carrier's instructions for next steps. | `COD_AMOUNT_PAID` | Cash on delivery payment received. | `CUSTOMER_CARDED` | Delivery attempt failed. Please follow delivery instructions left by the carrier. | `OUT_FOR_DELIVERY` | Your parcel is on its way and will be delivered today. | `AWAITING_COLLECTION_FROM_PICKUP_POINT` | Your parcel is ready for collection at the selected pickup point. | `COLLECT_AT_LOCAL_PO` | Your parcel is ready for collection at your local post office. | `CUSTOMER_TO_COLLECT_FROM_CARRIER` | Your parcel is available for collection from the carrier's local delivery unit. | `DELIVERED_TO_RECEPTION` | Your parcel has been delivered to your building's reception or designated mail area. | `DELIVERED` | Your parcel has been successfully delivered. | `DELIVERED_DAMAGED` | Your parcel was delivered but arrived with visible damage. | `DELIVERED_IN_PART` | Part of your shipment has been delivered. Check for updates on the rest. | `DELIVERED_SPECIFIED_SAFE_PLACE` | Your parcel has been delivered to your specified safe place. | `DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION` | Your parcel was delivered to an alternative location due to the delivery company being unable to deliver it to the specified address. Check carrier instructions for pickup details. | `DELIVERED_TO_NEIGHBOUR` | Your parcel was delivered to your neighbor. | `DELIVERED_TO_PO_BOX` | Your parcel has been delivered to your specified PO Box. | `PARCEL_COLLECTED_FROM_PICKUP_POINT` | Your package has been picked up from the pick up point. | `POST_TRANSIT_STATUS` | The carrier has added more information about your delivery. | `PROOF_OF_DELIVERY` | The carrier has confirmed delivery with proof, such as a signature or photo. | `PICKUP_FAILED` | Parcel pickup failed. The delivery company will try again soon. | `NOT_YET_RECEIVED_BY_CARRIER` | The carrier has not yet received your parcel, which may cause a delay. | `PARCEL_DAMAGED` | Your parcel was damaged in transit but will still be delivered. | `ADDRESS_QUERY` | There is an issue with the delivery address, which may delay your parcel. | `CARRIER_DELAYS` | Your parcel is delayed due to issues within the carrier network. | `DELAYED_NOT_CARRIER` | Your parcel is delayed due to circumstances beyond the carrier's control. | `HELD_BY_CARRIER` | Your parcel is being held due to an operational issue. Contact with the carrier for more information. | `HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING` | Your parcel is being held by the carrier for customs documentation checks. This may occur when the carrier must confirm documentation before the parcel can continue its journey. | `HELD_BY_CUSTOMS` | Your parcel is being held at customs, which may delay delivery. | `HELD_BY_EXPORT_CUSTOMS` | Your parcel is held at export customs, which may delay delivery. | `HELD_BY_IMPORT_CUSTOMS` | Your parcel is held at import customs and may require action to proceed. | `INCORRECT_DECLARATION` | Your parcel has been incorrectly declared but is still moving forward for delivery. | `MISROUTED` | Your parcel was sent to the wrong place due to a routing error but is being redirected. | `PARCEL_REPACKED` | Your parcel was repackaged by the carrier due to damage and will still be delivered. | `RECD_BY_CARRIER_NO_ELEC_ADVICE` | Your parcel has been received by the carrier but may experience delays due to missing pre-advice. | `COD_AMOUNT_NOT_PAID` | Delivery failed due to unpaid cash on delivery. Please follow carrier instructions. | `CUSTOMER_IDENTIFICATION_FAILED` | Delivery couldn't be completed as identification requirements were not met. | `NO_ACCESS_TO_RECIPIENTS_ADDRESS` | The carrier couldn't access the delivery location due to restricted entry. | `CANCELLED` | Your parcel has been cancelled. | `CUSTOMER_MOVED` | Delivery failed as the recipient is no longer at the specified address. Your parcel is being returned. | `HAZARDOUS_PROHIBITED` | Your parcel contains restricted items and will not be delivered. | `NOT_COLLECTED_FROM_PICKUP_POINT` | Your parcel was not collected from the pickup point within the designated time and will be returned. | `NOT_DELIVERED` | All delivery attempts failed. Your parcel is being returned to the sender. | `NOT_DELIVERED_ADDRESSEE_DECEASED` | The parcel could not be delivered as the addressee is reported deceased. | `PARCEL_DISPOSED` | Your parcel has been disposed of due to its contents or condition and will not be delivered. | `PARCEL_LOST` | The carrier has reported that your parcel is lost and will not be delivered. | `PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY` | The parcel cannot be delivered as it exceeds the carrier's service limits. | `REFUSED_BY_CUSTOMER` | You have refused the parcel, and it will be returned to the sender. | `RETURN_TO_SENDER` | Your parcel is being returned to the sender due to delivery issues. | `UNSPECIFIED_EXCEPTION` | The carrier has reported an issue with your parcel, but details are unavailable. +[JsonConverter(typeof(StatusDetailCodeJsonConverter))] +public class StatusDetailCode +{ + private readonly string _value; + + /// + /// Create a new instance of StatusDetailCode with a predefined value. + /// + internal StatusDetailCode() + { + _value = "CARRIER_STATUS_NOT_MAPPED"; + } + + /// + /// Create a new instance of StatusDetailCode with a custom value. + /// + /// The value of the StatusDetailCode + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public StatusDetailCode(string value) + { + _value = value; + } + + /// + /// Enum CARRIERSTATUSNOTMAPPED for value: CARRIER_STATUS_NOT_MAPPED + /// + public static StatusDetailCode CARRIERSTATUSNOTMAPPED { get; } = new("CARRIER_STATUS_NOT_MAPPED"); + + + /// + /// Enum SHIPMENTCREATED for value: SHIPMENT_CREATED + /// + public static StatusDetailCode SHIPMENTCREATED { get; } = new("SHIPMENT_CREATED"); + + + /// + /// Enum AWAITINGPICKUPDROPOFF for value: AWAITING_PICKUP_DROP_OFF + /// + public static StatusDetailCode AWAITINGPICKUPDROPOFF { get; } = new("AWAITING_PICKUP_DROP_OFF"); + + + /// + /// Enum DROPPEDOFF for value: DROPPED_OFF + /// + public static StatusDetailCode DROPPEDOFF { get; } = new("DROPPED_OFF"); + + + /// + /// Enum ELECADVICERECDBYCARRIER for value: ELEC_ADVICE_RECD_BY_CARRIER + /// + public static StatusDetailCode ELECADVICERECDBYCARRIER { get; } = new("ELEC_ADVICE_RECD_BY_CARRIER"); + + + /// + /// Enum PICKEDUP for value: PICKED_UP + /// + public static StatusDetailCode PICKEDUP { get; } = new("PICKED_UP"); + + + /// + /// Enum CUSTOMSCLEARED for value: CUSTOMS_CLEARED + /// + public static StatusDetailCode CUSTOMSCLEARED { get; } = new("CUSTOMS_CLEARED"); + + + /// + /// Enum CUSTOMSPROCESSING for value: CUSTOMS_PROCESSING + /// + public static StatusDetailCode CUSTOMSPROCESSING { get; } = new("CUSTOMS_PROCESSING"); + + + /// + /// Enum DELIVERYARRANGEDWITHRECIPIENT for value: DELIVERY_ARRANGED_WITH_RECIPIENT + /// + public static StatusDetailCode DELIVERYARRANGEDWITHRECIPIENT { get; } = new("DELIVERY_ARRANGED_WITH_RECIPIENT"); + + + /// + /// Enum HUBSCANOUT for value: HUB_SCAN_OUT + /// + public static StatusDetailCode HUBSCANOUT { get; } = new("HUB_SCAN_OUT"); + + + /// + /// Enum HUBSCANIN for value: HUB_SCAN_IN + /// + public static StatusDetailCode HUBSCANIN { get; } = new("HUB_SCAN_IN"); + + + /// + /// Enum INTRANSIT for value: IN_TRANSIT + /// + public static StatusDetailCode INTRANSIT { get; } = new("IN_TRANSIT"); + + + /// + /// Enum INFORMATION for value: INFORMATION + /// + public static StatusDetailCode INFORMATION { get; } = new("INFORMATION"); + + + /// + /// Enum PARCELOVERLABELLED for value: PARCEL_OVER_LABELLED + /// + public static StatusDetailCode PARCELOVERLABELLED { get; } = new("PARCEL_OVER_LABELLED"); + + + /// + /// Enum PARCELUPDATENOTIFICATION for value: PARCEL_UPDATE_NOTIFICATION + /// + public static StatusDetailCode PARCELUPDATENOTIFICATION { get; } = new("PARCEL_UPDATE_NOTIFICATION"); + + + /// + /// Enum RECEIVEDBYCARRIER for value: RECEIVED_BY_CARRIER + /// + public static StatusDetailCode RECEIVEDBYCARRIER { get; } = new("RECEIVED_BY_CARRIER"); + + + /// + /// Enum RECEIVEDLOCALDELIVERYDEPOT for value: RECEIVED_LOCAL_DELIVERY_DEPOT + /// + public static StatusDetailCode RECEIVEDLOCALDELIVERYDEPOT { get; } = new("RECEIVED_LOCAL_DELIVERY_DEPOT"); + + + /// + /// Enum SUBCONTRACTOREVENT for value: SUB_CONTRACTOR_EVENT + /// + public static StatusDetailCode SUBCONTRACTOREVENT { get; } = new("SUB_CONTRACTOR_EVENT"); + + + /// + /// Enum SUBCONTRACTORRECEIVED for value: SUB_CONTRACTOR_RECEIVED + /// + public static StatusDetailCode SUBCONTRACTORRECEIVED { get; } = new("SUB_CONTRACTOR_RECEIVED"); + + + /// + /// Enum PARCELREDIRECTED for value: PARCEL_REDIRECTED + /// + public static StatusDetailCode PARCELREDIRECTED { get; } = new("PARCEL_REDIRECTED"); + + + /// + /// Enum DELIVERYSCHEDULED for value: DELIVERY_SCHEDULED + /// + public static StatusDetailCode DELIVERYSCHEDULED { get; } = new("DELIVERY_SCHEDULED"); + + + /// + /// Enum HUBPROCESSING for value: HUB_PROCESSING + /// + public static StatusDetailCode HUBPROCESSING { get; } = new("HUB_PROCESSING"); + + + /// + /// Enum DELIVERYRESCHEDULED for value: DELIVERY_RESCHEDULED + /// + public static StatusDetailCode DELIVERYRESCHEDULED { get; } = new("DELIVERY_RESCHEDULED"); + + + /// + /// Enum ATTEMPTEDDELIVERY for value: ATTEMPTED_DELIVERY + /// + public static StatusDetailCode ATTEMPTEDDELIVERY { get; } = new("ATTEMPTED_DELIVERY"); + + + /// + /// Enum ATTEMPTEDDELIVERYFINAL for value: ATTEMPTED_DELIVERY_FINAL + /// + public static StatusDetailCode ATTEMPTEDDELIVERYFINAL { get; } = new("ATTEMPTED_DELIVERY_FINAL"); + + + /// + /// Enum CODAMOUNTPAID for value: COD_AMOUNT_PAID + /// + public static StatusDetailCode CODAMOUNTPAID { get; } = new("COD_AMOUNT_PAID"); + + + /// + /// Enum CUSTOMERCARDED for value: CUSTOMER_CARDED + /// + public static StatusDetailCode CUSTOMERCARDED { get; } = new("CUSTOMER_CARDED"); + + + /// + /// Enum OUTFORDELIVERY for value: OUT_FOR_DELIVERY + /// + public static StatusDetailCode OUTFORDELIVERY { get; } = new("OUT_FOR_DELIVERY"); + + + /// + /// Enum AWAITINGCOLLECTIONFROMPICKUPPOINT for value: AWAITING_COLLECTION_FROM_PICKUP_POINT + /// + public static StatusDetailCode AWAITINGCOLLECTIONFROMPICKUPPOINT { get; } = new("AWAITING_COLLECTION_FROM_PICKUP_POINT"); + + + /// + /// Enum COLLECTATLOCALPO for value: COLLECT_AT_LOCAL_PO + /// + public static StatusDetailCode COLLECTATLOCALPO { get; } = new("COLLECT_AT_LOCAL_PO"); + + + /// + /// Enum CUSTOMERTOCOLLECTFROMCARRIER for value: CUSTOMER_TO_COLLECT_FROM_CARRIER + /// + public static StatusDetailCode CUSTOMERTOCOLLECTFROMCARRIER { get; } = new("CUSTOMER_TO_COLLECT_FROM_CARRIER"); + + + /// + /// Enum DELIVEREDTORECEPTION for value: DELIVERED_TO_RECEPTION + /// + public static StatusDetailCode DELIVEREDTORECEPTION { get; } = new("DELIVERED_TO_RECEPTION"); + + + /// + /// Enum DELIVERED for value: DELIVERED + /// + public static StatusDetailCode DELIVERED { get; } = new("DELIVERED"); + + + /// + /// Enum DELIVEREDDAMAGED for value: DELIVERED_DAMAGED + /// + public static StatusDetailCode DELIVEREDDAMAGED { get; } = new("DELIVERED_DAMAGED"); + + + /// + /// Enum DELIVEREDINPART for value: DELIVERED_IN_PART + /// + public static StatusDetailCode DELIVEREDINPART { get; } = new("DELIVERED_IN_PART"); + + + /// + /// Enum DELIVEREDSPECIFIEDSAFEPLACE for value: DELIVERED_SPECIFIED_SAFE_PLACE + /// + public static StatusDetailCode DELIVEREDSPECIFIEDSAFEPLACE { get; } = new("DELIVERED_SPECIFIED_SAFE_PLACE"); + + + /// + /// Enum DELIVEREDTOALTERNATIVEDELIVERYLOCATION for value: DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION + /// + public static StatusDetailCode DELIVEREDTOALTERNATIVEDELIVERYLOCATION { get; } = new("DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION"); + + + /// + /// Enum DELIVEREDTONEIGHBOUR for value: DELIVERED_TO_NEIGHBOUR + /// + public static StatusDetailCode DELIVEREDTONEIGHBOUR { get; } = new("DELIVERED_TO_NEIGHBOUR"); + + + /// + /// Enum DELIVEREDTOPOBOX for value: DELIVERED_TO_PO_BOX + /// + public static StatusDetailCode DELIVEREDTOPOBOX { get; } = new("DELIVERED_TO_PO_BOX"); + + + /// + /// Enum PARCELCOLLECTEDFROMPICKUPPOINT for value: PARCEL_COLLECTED_FROM_PICKUP_POINT + /// + public static StatusDetailCode PARCELCOLLECTEDFROMPICKUPPOINT { get; } = new("PARCEL_COLLECTED_FROM_PICKUP_POINT"); + + + /// + /// Enum POSTTRANSITSTATUS for value: POST_TRANSIT_STATUS + /// + public static StatusDetailCode POSTTRANSITSTATUS { get; } = new("POST_TRANSIT_STATUS"); + + + /// + /// Enum PROOFOFDELIVERY for value: PROOF_OF_DELIVERY + /// + public static StatusDetailCode PROOFOFDELIVERY { get; } = new("PROOF_OF_DELIVERY"); + + + /// + /// Enum PICKUPFAILED for value: PICKUP_FAILED + /// + public static StatusDetailCode PICKUPFAILED { get; } = new("PICKUP_FAILED"); + + + /// + /// Enum NOTYETRECEIVEDBYCARRIER for value: NOT_YET_RECEIVED_BY_CARRIER + /// + public static StatusDetailCode NOTYETRECEIVEDBYCARRIER { get; } = new("NOT_YET_RECEIVED_BY_CARRIER"); + + + /// + /// Enum PARCELDAMAGED for value: PARCEL_DAMAGED + /// + public static StatusDetailCode PARCELDAMAGED { get; } = new("PARCEL_DAMAGED"); + + + /// + /// Enum ADDRESSQUERY for value: ADDRESS_QUERY + /// + public static StatusDetailCode ADDRESSQUERY { get; } = new("ADDRESS_QUERY"); + + + /// + /// Enum CARRIERDELAYS for value: CARRIER_DELAYS + /// + public static StatusDetailCode CARRIERDELAYS { get; } = new("CARRIER_DELAYS"); + + + /// + /// Enum DELAYEDNOTCARRIER for value: DELAYED_NOT_CARRIER + /// + public static StatusDetailCode DELAYEDNOTCARRIER { get; } = new("DELAYED_NOT_CARRIER"); + + + /// + /// Enum HELDBYCARRIER for value: HELD_BY_CARRIER + /// + public static StatusDetailCode HELDBYCARRIER { get; } = new("HELD_BY_CARRIER"); + + + /// + /// Enum HELDBYCARRIERFORCLEARANCEPREPROCESSING for value: HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING + /// + public static StatusDetailCode HELDBYCARRIERFORCLEARANCEPREPROCESSING { get; } = new("HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING"); + + + /// + /// Enum HELDBYCUSTOMS for value: HELD_BY_CUSTOMS + /// + public static StatusDetailCode HELDBYCUSTOMS { get; } = new("HELD_BY_CUSTOMS"); + + + /// + /// Enum HELDBYEXPORTCUSTOMS for value: HELD_BY_EXPORT_CUSTOMS + /// + public static StatusDetailCode HELDBYEXPORTCUSTOMS { get; } = new("HELD_BY_EXPORT_CUSTOMS"); + + + /// + /// Enum HELDBYIMPORTCUSTOMS for value: HELD_BY_IMPORT_CUSTOMS + /// + public static StatusDetailCode HELDBYIMPORTCUSTOMS { get; } = new("HELD_BY_IMPORT_CUSTOMS"); + + + /// + /// Enum INCORRECTDECLARATION for value: INCORRECT_DECLARATION + /// + public static StatusDetailCode INCORRECTDECLARATION { get; } = new("INCORRECT_DECLARATION"); + + + /// + /// Enum MISROUTED for value: MISROUTED + /// + public static StatusDetailCode MISROUTED { get; } = new("MISROUTED"); + + + /// + /// Enum PARCELREPACKED for value: PARCEL_REPACKED + /// + public static StatusDetailCode PARCELREPACKED { get; } = new("PARCEL_REPACKED"); + + + /// + /// Enum RECDBYCARRIERNOELECADVICE for value: RECD_BY_CARRIER_NO_ELEC_ADVICE + /// + public static StatusDetailCode RECDBYCARRIERNOELECADVICE { get; } = new("RECD_BY_CARRIER_NO_ELEC_ADVICE"); + + + /// + /// Enum CODAMOUNTNOTPAID for value: COD_AMOUNT_NOT_PAID + /// + public static StatusDetailCode CODAMOUNTNOTPAID { get; } = new("COD_AMOUNT_NOT_PAID"); + + + /// + /// Enum CUSTOMERIDENTIFICATIONFAILED for value: CUSTOMER_IDENTIFICATION_FAILED + /// + public static StatusDetailCode CUSTOMERIDENTIFICATIONFAILED { get; } = new("CUSTOMER_IDENTIFICATION_FAILED"); + + + /// + /// Enum NOACCESSTORECIPIENTSADDRESS for value: NO_ACCESS_TO_RECIPIENTS_ADDRESS + /// + public static StatusDetailCode NOACCESSTORECIPIENTSADDRESS { get; } = new("NO_ACCESS_TO_RECIPIENTS_ADDRESS"); + + + /// + /// Enum CANCELLED for value: CANCELLED + /// + public static StatusDetailCode CANCELLED { get; } = new("CANCELLED"); + + + /// + /// Enum CUSTOMERMOVED for value: CUSTOMER_MOVED + /// + public static StatusDetailCode CUSTOMERMOVED { get; } = new("CUSTOMER_MOVED"); + + + /// + /// Enum HAZARDOUSPROHIBITED for value: HAZARDOUS_PROHIBITED + /// + public static StatusDetailCode HAZARDOUSPROHIBITED { get; } = new("HAZARDOUS_PROHIBITED"); + + + /// + /// Enum NOTCOLLECTEDFROMPICKUPPOINT for value: NOT_COLLECTED_FROM_PICKUP_POINT + /// + public static StatusDetailCode NOTCOLLECTEDFROMPICKUPPOINT { get; } = new("NOT_COLLECTED_FROM_PICKUP_POINT"); + + + /// + /// Enum NOTDELIVERED for value: NOT_DELIVERED + /// + public static StatusDetailCode NOTDELIVERED { get; } = new("NOT_DELIVERED"); + + + /// + /// Enum NOTDELIVEREDADDRESSEEDECEASED for value: NOT_DELIVERED_ADDRESSEE_DECEASED + /// + public static StatusDetailCode NOTDELIVEREDADDRESSEEDECEASED { get; } = new("NOT_DELIVERED_ADDRESSEE_DECEASED"); + + + /// + /// Enum PARCELDISPOSED for value: PARCEL_DISPOSED + /// + public static StatusDetailCode PARCELDISPOSED { get; } = new("PARCEL_DISPOSED"); + + + /// + /// Enum PARCELLOST for value: PARCEL_LOST + /// + public static StatusDetailCode PARCELLOST { get; } = new("PARCEL_LOST"); + + + /// + /// Enum PARCELOUTSIDEOFSERVICECAPABILITY for value: PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY + /// + public static StatusDetailCode PARCELOUTSIDEOFSERVICECAPABILITY { get; } = new("PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY"); + + + /// + /// Enum REFUSEDBYCUSTOMER for value: REFUSED_BY_CUSTOMER + /// + public static StatusDetailCode REFUSEDBYCUSTOMER { get; } = new("REFUSED_BY_CUSTOMER"); + + + /// + /// Enum RETURNTOSENDER for value: RETURN_TO_SENDER + /// + public static StatusDetailCode RETURNTOSENDER { get; } = new("RETURN_TO_SENDER"); + + + /// + /// Enum UNSPECIFIEDEXCEPTION for value: UNSPECIFIED_EXCEPTION + /// + public static StatusDetailCode UNSPECIFIEDEXCEPTION { get; } = new("UNSPECIFIED_EXCEPTION"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is StatusDetailCode other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class StatusDetailCodeJsonConverter : JsonConverter +{ + public override StatusDetailCode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new StatusDetailCode(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, StatusDetailCode value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(StatusDetailCode); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Tag.cs b/ShipEngineSDK/Model/Tag.cs new file mode 100644 index 00000000..2a551bd2 --- /dev/null +++ b/ShipEngineSDK/Model/Tag.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Tags are arbitrary strings that you can use to categorize shipments. For example, you may want to use tags to distinguish between domestic and international shipments, or between insured and uninsured shipments. Or maybe you want to create a tag for each of your customers so you can easily retrieve every shipment for a customer. +/// +public partial class Tag +{ + + /// + /// The tag name. + /// + /// The tag name. + /// + /// Fragile + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Tag {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TagShipmentResponseBody.cs b/ShipEngineSDK/Model/TagShipmentResponseBody.cs new file mode 100644 index 00000000..38954cd8 --- /dev/null +++ b/ShipEngineSDK/Model/TagShipmentResponseBody.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Get shipment tags response body +/// +public partial class TagShipmentResponseBody +{ + + /// + /// Gets or Sets Tags + /// + [JsonPropertyName("tags"), JsonPropertyOrder(1)] + public required List Tags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TagShipmentResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Tags: ").Append(Tags).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TaxIdentifier.cs b/ShipEngineSDK/Model/TaxIdentifier.cs new file mode 100644 index 00000000..3aac17b6 --- /dev/null +++ b/ShipEngineSDK/Model/TaxIdentifier.cs @@ -0,0 +1,83 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A tax identifier object +/// +public partial class TaxIdentifier +{ + + /// + /// Gets or Sets IdentifierType + /// + [JsonPropertyName("identifier_type"), JsonPropertyOrder(1)] + public required IdentifierType IdentifierType { get; set; } + + /// + /// The authority that issued this tax. This must be a valid 2 character ISO 3166 Alpha 2 country code. + /// + /// The authority that issued this tax. This must be a valid 2 character ISO 3166 Alpha 2 country code. + [JsonPropertyName("issuing_authority"), JsonPropertyOrder(2)] + public required string IssuingAuthority { get; set; } + + /// + /// Gets or Sets TaxableEntityType + /// + [JsonPropertyName("taxable_entity_type"), JsonPropertyOrder(3)] + public required TaxableEntityType TaxableEntityType { get; set; } + + /// + /// The value of the identifier + /// + /// The value of the identifier + [JsonPropertyName("value"), JsonPropertyOrder(4)] + public required string Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TaxIdentifier {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IdentifierType: ").Append(IdentifierType).Append("\n"); + sb.Append(" IssuingAuthority: ").Append(IssuingAuthority).Append("\n"); + sb.Append(" TaxableEntityType: ").Append(TaxableEntityType).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TaxType.cs b/ShipEngineSDK/Model/TaxType.cs new file mode 100644 index 00000000..80aef2f2 --- /dev/null +++ b/ShipEngineSDK/Model/TaxType.cs @@ -0,0 +1,86 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Type of a tax added to shipping cost +/// +/// Type of a tax added to shipping cost +[JsonConverter(typeof(TaxTypeJsonConverter))] +public class TaxType +{ + private readonly string _value; + + /// + /// Create a new instance of TaxType with a predefined value. + /// + internal TaxType() + { + _value = "vat"; + } + + /// + /// Create a new instance of TaxType with a custom value. + /// + /// The value of the TaxType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public TaxType(string value) + { + _value = value; + } + + /// + /// Enum Vat for value: vat + /// + public static TaxType Vat { get; } = new("vat"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is TaxType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class TaxTypeJsonConverter : JsonConverter +{ + public override TaxType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new TaxType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, TaxType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(TaxType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TaxableEntityType.cs b/ShipEngineSDK/Model/TaxableEntityType.cs new file mode 100644 index 00000000..3e3a7780 --- /dev/null +++ b/ShipEngineSDK/Model/TaxableEntityType.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The taxable entity type for this tax item. Valid values include the following |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`shipper` | The shipper is responsible for this tax. |`recipient` | The recipient of the shipment is responsible for this tax. |`ior` | The importer of records is responsible for tax. +/// +/// The taxable entity type for this tax item. Valid values include the following |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`shipper` | The shipper is responsible for this tax. |`recipient` | The recipient of the shipment is responsible for this tax. |`ior` | The importer of records is responsible for tax. +[JsonConverter(typeof(TaxableEntityTypeJsonConverter))] +public class TaxableEntityType +{ + private readonly string _value; + + /// + /// Create a new instance of TaxableEntityType with a predefined value. + /// + internal TaxableEntityType() + { + _value = "shipper"; + } + + /// + /// Create a new instance of TaxableEntityType with a custom value. + /// + /// The value of the TaxableEntityType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public TaxableEntityType(string value) + { + _value = value; + } + + /// + /// Enum Shipper for value: shipper + /// + public static TaxableEntityType Shipper { get; } = new("shipper"); + + + /// + /// Enum Recipient for value: recipient + /// + public static TaxableEntityType Recipient { get; } = new("recipient"); + + + /// + /// Enum Ior for value: ior + /// + public static TaxableEntityType Ior { get; } = new("ior"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is TaxableEntityType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class TaxableEntityTypeJsonConverter : JsonConverter +{ + public override TaxableEntityType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new TaxableEntityType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, TaxableEntityType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(TaxableEntityType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TokensGetEphemeralTokenResponseBodyYaml.cs b/ShipEngineSDK/Model/TokensGetEphemeralTokenResponseBodyYaml.cs new file mode 100644 index 00000000..1c8991ae --- /dev/null +++ b/ShipEngineSDK/Model/TokensGetEphemeralTokenResponseBodyYaml.cs @@ -0,0 +1,69 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// TokensGetEphemeralTokenResponseBodyYaml +/// +public partial class TokensGetEphemeralTokenResponseBodyYaml +{ + + /// + /// The redirect url formatted with the requested token. + /// + /// The redirect url formatted with the requested token. + [JsonPropertyName("redirect_url"), JsonPropertyOrder(1)] + public string? RedirectUrl { get; set; } + + /// + /// The requested token that expires in 10 seconds. + /// + /// The requested token that expires in 10 seconds. + [JsonPropertyName("token"), JsonPropertyOrder(2)] + public string? Token { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TokensGetEphemeralTokenResponseBodyYaml {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" RedirectUrl: ").Append(RedirectUrl).Append("\n"); + sb.Append(" Token: ").Append(Token).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TrackEvent.cs b/ShipEngineSDK/Model/TrackEvent.cs new file mode 100644 index 00000000..8d6b32b4 --- /dev/null +++ b/ShipEngineSDK/Model/TrackEvent.cs @@ -0,0 +1,275 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A track event +/// +public partial class TrackEvent +{ + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code"), JsonInclude] + public string? CarrierDetailCode { get; set; } + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code"), JsonInclude] + public string? CarrierStatusCode { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description"), JsonInclude] + public string? CarrierStatusDescription { get; set; } + + /// + /// City locality + /// + /// City locality + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// AUSTIN + /// + [JsonPropertyName("city_locality"), JsonInclude] + public string? CityLocality { get; set; } + + /// + /// Timestamp for carrier event + /// + /// Timestamp for carrier event + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("occurred_at"), JsonPropertyOrder(5)] + public required DateTimeOffset OccurredAt { get; set; } + + /// + /// Postal code + /// + /// Postal code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 78756 + /// + [JsonPropertyName("postal_code"), JsonInclude] + public string? PostalCode { get; set; } + + /// + /// State province + /// + /// State province + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// TX + /// + [JsonPropertyName("state_province"), JsonInclude] + public string? StateProvince { get; set; } + + /// + /// Gets or Sets StatusCode + /// + [JsonPropertyName("status_code"), JsonPropertyOrder(8)] + public required StatusCode StatusCode { get; set; } + + /// + /// Event Status Description + /// + /// Event Status Description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// In Transit + /// + [JsonPropertyName("status_description"), JsonInclude] + public string? StatusDescription { get; set; } + + /// + /// Carrier timestamp for the event, it is assumed to be the local time of where the event occurred. + /// + /// Carrier timestamp for the event, it is assumed to be the local time of where the event occurred. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("carrier_occurred_at"), JsonPropertyOrder(10)] + public DateTimeOffset? CarrierOccurredAt { get; set; } + + /// + /// Company Name + /// + /// Company Name + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Stamps.com + /// + [JsonPropertyName("company_name"), JsonInclude] + public string? CompanyName { get; set; } + + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) + /// + /// CA + /// + [JsonPropertyName("country_code"), JsonPropertyOrder(12)] + public string? CountryCode { get; set; } + + /// + /// Event description + /// + /// Event description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Delivered, In/At Mailbox + /// + [JsonPropertyName("description"), JsonInclude] + public string? Description { get; set; } + + /// + /// Event Code + /// + /// Event Code + [JsonPropertyName("event_code"), JsonPropertyOrder(14)] + public string? EventCode { get; set; } + + /// + /// Latitude coordinate of tracking event. + /// + /// Latitude coordinate of tracking event. + [JsonPropertyName("latitude"), JsonPropertyOrder(15)] + public double? Latitude { get; set; } + + /// + /// Longitude coordinate of tracking event. + /// + /// Longitude coordinate of tracking event. + [JsonPropertyName("longitude"), JsonPropertyOrder(16)] + public double? Longitude { get; set; } + + /// + /// Signer information + /// + /// Signer information + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("signer"), JsonInclude] + public string? Signer { get; set; } + + /// + /// Gets or Sets StatusDetailCode + /// + [JsonPropertyName("status_detail_code"), JsonPropertyOrder(18)] + public StatusDetailCode? StatusDetailCode { get; set; } + + /// + /// Event Status Detail Description + /// + /// Event Status Detail Description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your shipment is on its way between the carrier hubs. + /// + [JsonPropertyName("status_detail_description"), JsonInclude] + public string? StatusDetailDescription { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TrackEvent {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" OccurredAt: ").Append(OccurredAt).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" CarrierOccurredAt: ").Append(CarrierOccurredAt).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" EventCode: ").Append(EventCode).Append("\n"); + sb.Append(" Latitude: ").Append(Latitude).Append("\n"); + sb.Append(" Longitude: ").Append(Longitude).Append("\n"); + sb.Append(" Signer: ").Append(Signer).Append("\n"); + sb.Append(" StatusDetailCode: ").Append(StatusDetailCode).Append("\n"); + sb.Append(" StatusDetailDescription: ").Append(StatusDetailDescription).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TrackingInformation.cs b/ShipEngineSDK/Model/TrackingInformation.cs new file mode 100644 index 00000000..900d00a1 --- /dev/null +++ b/ShipEngineSDK/Model/TrackingInformation.cs @@ -0,0 +1,239 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A tracking information resource +/// +public partial class TrackingInformation +{ + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("actual_delivery_date"), JsonPropertyOrder(1)] + public DateTimeOffset? ActualDeliveryDate { get; set; } + + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. + /// + /// dhl_express + /// + [JsonPropertyName("carrier_code"), JsonPropertyOrder(2)] + public string? CarrierCode { get; set; } + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code"), JsonInclude] + public string? CarrierDetailCode { get; set; } + + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("carrier_id"), JsonInclude] + public int? CarrierId { get; set; } + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code"), JsonInclude] + public string? CarrierStatusCode { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description"), JsonInclude] + public string? CarrierStatusDescription { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("estimated_delivery_date"), JsonPropertyOrder(7)] + public DateTimeOffset? EstimatedDeliveryDate { get; set; } + + /// + /// The events that have occured during the lifetime of this tracking number. + /// + /// The events that have occured during the lifetime of this tracking number. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("events"), JsonInclude] + public List? Events { get; set; } + + /// + /// Exception description + /// + /// Exception description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("exception_description"), JsonInclude] + public string? ExceptionDescription { get; set; } + + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(10)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// Gets or Sets StatusCode + /// + [JsonPropertyName("status_code"), JsonPropertyOrder(11)] + public StatusCode? StatusCode { get; set; } + + /// + /// Status description + /// + /// Status description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Delivered + /// + [JsonPropertyName("status_description"), JsonInclude] + public string? StatusDescription { get; set; } + + /// + /// Gets or Sets StatusDetailCode + /// + [JsonPropertyName("status_detail_code"), JsonPropertyOrder(13)] + public StatusDetailCode? StatusDetailCode { get; set; } + + /// + /// Status detail description + /// + /// Status detail description + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Your parcel has been successfully delivered. + /// + [JsonPropertyName("status_detail_description"), JsonInclude] + public string? StatusDetailDescription { get; set; } + + /// + /// A tracking number for a package. The format depends on the carrier. + /// + /// A tracking number for a package. The format depends on the carrier. + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number"), JsonPropertyOrder(15)] + public string? TrackingNumber { get; set; } + + /// + /// Carrier Tracking Url, if available + /// + /// Carrier Tracking Url, if available + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url"), JsonInclude] + public string? TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TrackingInformation {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ActualDeliveryDate: ").Append(ActualDeliveryDate).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append(" ExceptionDescription: ").Append(ExceptionDescription).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" StatusDetailCode: ").Append(StatusDetailCode).Append("\n"); + sb.Append(" StatusDetailDescription: ").Append(StatusDetailDescription).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TrackingStatus.cs b/ShipEngineSDK/Model/TrackingStatus.cs new file mode 100644 index 00000000..1421a1a1 --- /dev/null +++ b/ShipEngineSDK/Model/TrackingStatus.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The different statuses that can apply to a shipment. +/// +/// The different statuses that can apply to a shipment. +[JsonConverter(typeof(TrackingStatusJsonConverter))] +public class TrackingStatus +{ + private readonly string _value; + + /// + /// Create a new instance of TrackingStatus with a predefined value. + /// + internal TrackingStatus() + { + _value = "unknown"; + } + + /// + /// Create a new instance of TrackingStatus with a custom value. + /// + /// The value of the TrackingStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public TrackingStatus(string value) + { + _value = value; + } + + /// + /// Enum Unknown for value: unknown + /// + public static TrackingStatus Unknown { get; } = new("unknown"); + + + /// + /// Enum InTransit for value: in_transit + /// + public static TrackingStatus InTransit { get; } = new("in_transit"); + + + /// + /// Enum Error for value: error + /// + public static TrackingStatus Error { get; } = new("error"); + + + /// + /// Enum Delivered for value: delivered + /// + public static TrackingStatus Delivered { get; } = new("delivered"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is TrackingStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class TrackingStatusJsonConverter : JsonConverter +{ + public override TrackingStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new TrackingStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, TrackingStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(TrackingStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/TransportMean.cs b/ShipEngineSDK/Model/TransportMean.cs new file mode 100644 index 00000000..ae41b755 --- /dev/null +++ b/ShipEngineSDK/Model/TransportMean.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Defines transport_mean +/// +[JsonConverter(typeof(TransportMeanJsonConverter))] +public class TransportMean +{ + private readonly string _value; + + /// + /// Create a new instance of TransportMean with a predefined value. + /// + internal TransportMean() + { + _value = "ground"; + } + + /// + /// Create a new instance of TransportMean with a custom value. + /// + /// The value of the TransportMean + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public TransportMean(string value) + { + _value = value; + } + + /// + /// Enum Ground for value: ground + /// + public static TransportMean Ground { get; } = new("ground"); + + + /// + /// Enum Water for value: water + /// + public static TransportMean Water { get; } = new("water"); + + + /// + /// Enum CargoAircraftOnly for value: cargo_aircraft_only + /// + public static TransportMean CargoAircraftOnly { get; } = new("cargo_aircraft_only"); + + + /// + /// Enum PassengerAircraft for value: passenger_aircraft + /// + public static TransportMean PassengerAircraft { get; } = new("passenger_aircraft"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is TransportMean other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class TransportMeanJsonConverter : JsonConverter +{ + public override TransportMean? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new TransportMean(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, TransportMean value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(TransportMean); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateAccountSettingsImageRequestBody.cs b/ShipEngineSDK/Model/UpdateAccountSettingsImageRequestBody.cs new file mode 100644 index 00000000..5d7341a0 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateAccountSettingsImageRequestBody.cs @@ -0,0 +1,196 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A ShipEngine account settings images request body +/// +public partial class UpdateAccountSettingsImageRequestBody +{ + /// + /// The image type + /// + /// The image type + [JsonConverter(typeof(ImageContentTypeEnumJsonConverter))] + public class ImageContentTypeEnum + { + private readonly string _value; + + /// + /// Create a new instance of ImageContentTypeEnum with a predefined value. + /// + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + /// + /// Create a new instance of ImageContentTypeEnum with a custom value. + /// + /// The value of the ImageContentTypeEnum + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ImageContentTypeEnum(string value) + { + _value = value; + } + + /// + /// Enum Png for value: image/png + /// + public static ImageContentTypeEnum Png { get; } = new("image/png"); + + + /// + /// Enum Jpeg for value: image/jpeg + /// + public static ImageContentTypeEnum Jpeg { get; } = new("image/jpeg"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + } + + internal class ImageContentTypeEnumJsonConverter : JsonConverter + { + public override ImageContentTypeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ImageContentTypeEnum(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ImageContentTypeEnum value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ImageContentTypeEnum); + } + + + /// + /// Indicates whether this image is set as default. + /// + /// Indicates whether this image is set as default. + /// + /// false + /// + [JsonPropertyName("is_default"), JsonPropertyOrder(1)] + public required bool IsDefault { get; set; } + + /// + /// The date and time that the image was created in ShipEngine. + /// + /// The date and time that the image was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The image type + /// + /// The image type + [JsonPropertyName("image_content_type"), JsonPropertyOrder(3)] + public ImageContentTypeEnum? ImageContentType { get; set; } + + /// + /// A base64 encoded string representation of the image. + /// + /// A base64 encoded string representation of the image. + /// + /// iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg== + /// + [JsonPropertyName("image_data"), JsonPropertyOrder(4)] + public string? ImageData { get; set; } + + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id"), JsonInclude] + public string? LabelImageId { get; set; } + + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// The date and time that the image was modified in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name"), JsonPropertyOrder(7)] + public string? Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateAccountSettingsImageRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateAmazonBuyShippingRequestBody.cs b/ShipEngineSDK/Model/UpdateAmazonBuyShippingRequestBody.cs new file mode 100644 index 00000000..0fc41ccf --- /dev/null +++ b/ShipEngineSDK/Model/UpdateAmazonBuyShippingRequestBody.cs @@ -0,0 +1,61 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An amazon buy shipping account settings request body +/// +public partial class UpdateAmazonBuyShippingRequestBody +{ + + /// + /// Email + /// + /// Email + [JsonPropertyName("email"), JsonPropertyOrder(1)] + public string? Email { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateAmazonBuyShippingRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Email: ").Append(Email).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateCarrierSettingsRequestBody.cs b/ShipEngineSDK/Model/UpdateCarrierSettingsRequestBody.cs new file mode 100644 index 00000000..554a34f1 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateCarrierSettingsRequestBody.cs @@ -0,0 +1,371 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// UpdateCarrierSettingsRequestBody +/// +[JsonConverter(typeof(UpdateCarrierSettingsRequestBodyJsonConverter))] +//[DataContract(Name = "update_carrier_settings_request_body")] +public partial class UpdateCarrierSettingsRequestBody : AbstractOpenAPISchema +{ + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpdateDhlExpressSettingsRequestBody. + public UpdateCarrierSettingsRequestBody(UpdateDhlExpressSettingsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpdateFedexSettingsRequestBody. + public UpdateCarrierSettingsRequestBody(UpdateFedexSettingsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpdateNewgisticsSettingsRequestBody. + public UpdateCarrierSettingsRequestBody(UpdateNewgisticsSettingsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpdateUpsSettingsRequestBody. + public UpdateCarrierSettingsRequestBody(UpdateUpsSettingsRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpdateAmazonBuyShippingRequestBody. + public UpdateCarrierSettingsRequestBody(UpdateAmazonBuyShippingRequestBody actualInstance) : base("oneOf") + { + this.IsNullable = false; + _actualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(UpdateDhlExpressSettingsRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(UpdateFedexSettingsRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(UpdateNewgisticsSettingsRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(UpdateUpsSettingsRequestBody)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(UpdateAmazonBuyShippingRequestBody)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: UpdateDhlExpressSettingsRequestBody, UpdateFedexSettingsRequestBody, UpdateNewgisticsSettingsRequestBody, UpdateUpsSettingsRequestBody, UpdateAmazonBuyShippingRequestBody"); + } + } + } + + /// + /// Get the actual instance of `UpdateDhlExpressSettingsRequestBody`. If the actual instance is not `UpdateDhlExpressSettingsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpdateDhlExpressSettingsRequestBody + public UpdateDhlExpressSettingsRequestBody GetUpdateDhlExpressSettingsRequestBody() + { + return (UpdateDhlExpressSettingsRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `UpdateFedexSettingsRequestBody`. If the actual instance is not `UpdateFedexSettingsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpdateFedexSettingsRequestBody + public UpdateFedexSettingsRequestBody GetUpdateFedexSettingsRequestBody() + { + return (UpdateFedexSettingsRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `UpdateNewgisticsSettingsRequestBody`. If the actual instance is not `UpdateNewgisticsSettingsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpdateNewgisticsSettingsRequestBody + public UpdateNewgisticsSettingsRequestBody GetUpdateNewgisticsSettingsRequestBody() + { + return (UpdateNewgisticsSettingsRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `UpdateUpsSettingsRequestBody`. If the actual instance is not `UpdateUpsSettingsRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpdateUpsSettingsRequestBody + public UpdateUpsSettingsRequestBody GetUpdateUpsSettingsRequestBody() + { + return (UpdateUpsSettingsRequestBody)this.ActualInstance; + } + + /// + /// Get the actual instance of `UpdateAmazonBuyShippingRequestBody`. If the actual instance is not `UpdateAmazonBuyShippingRequestBody`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpdateAmazonBuyShippingRequestBody + public UpdateAmazonBuyShippingRequestBody GetUpdateAmazonBuyShippingRequestBody() + { + return (UpdateAmazonBuyShippingRequestBody)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateCarrierSettingsRequestBody {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, UpdateCarrierSettingsRequestBody.SerializerSettings); + } + +} + +/// +/// Custom JSON converter for UpdateCarrierSettingsRequestBody +/// +public class UpdateCarrierSettingsRequestBodyJsonConverter : JsonConverter +{ + private static readonly HashSet OneOfTypes = [typeof(UpdateDhlExpressSettingsRequestBody), typeof(UpdateFedexSettingsRequestBody), typeof(UpdateNewgisticsSettingsRequestBody), typeof(UpdateUpsSettingsRequestBody), typeof(UpdateAmazonBuyShippingRequestBody)]; + private static readonly HashSet MandatoryFields = []; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Strip IsRequired constraint from every property except those which define the underlying type + if (OneOfTypes.Contains(typeInfo.Type)) + { + var underlyingPropertyName = (propertyInfo.AttributeProvider as MemberInfo)?.Name; + propertyInfo.IsRequired = underlyingPropertyName != null && MandatoryFields.Contains(underlyingPropertyName); + } + else + { + propertyInfo.IsRequired = false; + } + } + } + } + } + }; + + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, UpdateCarrierSettingsRequestBody value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) + { + if (prop.Value != null) + { + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); + } + } + + writer.WriteEndObject(); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override UpdateCarrierSettingsRequestBody? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return null; + } + + var jsonDoc = JsonDocument.ParseValue(ref reader); + UpdateCarrierSettingsRequestBody? newUpdateCarrierSettingsRequestBody = null; + + + int match = 0; + var matchedTypes = new List(); + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("UpdateDhlExpressSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into UpdateDhlExpressSettingsRequestBody: {1}", jsonDoc, exception); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("UpdateFedexSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into UpdateFedexSettingsRequestBody: {1}", jsonDoc, exception); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("UpdateNewgisticsSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into UpdateNewgisticsSettingsRequestBody: {1}", jsonDoc, exception); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("UpdateUpsSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into UpdateUpsSettingsRequestBody: {1}", jsonDoc, exception); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(jsonDoc.Deserialize(DeserializingOptions)!); + + matchedTypes.Add("UpdateAmazonBuyShippingRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into UpdateAmazonBuyShippingRequestBody: {1}", jsonDoc, exception); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); + } + + if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newUpdateCarrierSettingsRequestBody; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof(UpdateCarrierSettingsRequestBody).IsAssignableFrom(objectType); + } +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateDhlExpressSettingsRequestBody.cs b/ShipEngineSDK/Model/UpdateDhlExpressSettingsRequestBody.cs new file mode 100644 index 00000000..a2e76f3b --- /dev/null +++ b/ShipEngineSDK/Model/UpdateDhlExpressSettingsRequestBody.cs @@ -0,0 +1,77 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update dhl express settings request body +/// +public partial class UpdateDhlExpressSettingsRequestBody +{ + + /// + /// Indicates if this is primary account + /// + /// Indicates if this is primary account + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(1)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(2)] + public string? Nickname { get; set; } + + /// + /// Indicates if the account number should be hidden on the archive documentation + /// + /// Indicates if the account number should be hidden on the archive documentation + [JsonPropertyName("should_hide_account_number_on_archive_doc"), JsonPropertyOrder(3)] + public bool? ShouldHideAccountNumberOnArchiveDoc { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateDhlExpressSettingsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ShouldHideAccountNumberOnArchiveDoc: ").Append(ShouldHideAccountNumberOnArchiveDoc).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateFedexSettingsRequestBody.cs b/ShipEngineSDK/Model/UpdateFedexSettingsRequestBody.cs new file mode 100644 index 00000000..e964ecb8 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateFedexSettingsRequestBody.cs @@ -0,0 +1,103 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update Fedex settings request body +/// +public partial class UpdateFedexSettingsRequestBody +{ + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(1)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image"), JsonPropertyOrder(2)] + public string? LetterheadImage { get; set; } + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(3)] + public string? Nickname { get; set; } + + /// + /// Gets or Sets PickupType + /// + [JsonPropertyName("pickup_type"), JsonPropertyOrder(4)] + public FedexPickupType? PickupType { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image"), JsonPropertyOrder(5)] + public string? SignatureImage { get; set; } + + /// + /// Gets or Sets SmartPostEndorsement + /// + [JsonPropertyName("smart_post_endorsement"), JsonPropertyOrder(6)] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + + /// + /// Gets or Sets SmartPostHub + /// + [JsonPropertyName("smart_post_hub"), JsonPropertyOrder(7)] + public SmartPostHub? SmartPostHub { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateFedexSettingsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateNewgisticsSettingsRequestBody.cs b/ShipEngineSDK/Model/UpdateNewgisticsSettingsRequestBody.cs new file mode 100644 index 00000000..5fb4d3b5 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateNewgisticsSettingsRequestBody.cs @@ -0,0 +1,67 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A newgistics account settings request body +/// +public partial class UpdateNewgisticsSettingsRequestBody +{ + + /// + /// Gets or Sets IncludeBarcodeWithOrderNumber + /// + [JsonPropertyName("include_barcode_with_order_number"), JsonPropertyOrder(1)] + public bool? IncludeBarcodeWithOrderNumber { get; set; } + + /// + /// Gets or Sets ReceiveEmailOnManifestProcessing + /// + [JsonPropertyName("receive_email_on_manifest_processing"), JsonPropertyOrder(2)] + public bool? ReceiveEmailOnManifestProcessing { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateNewgisticsSettingsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IncludeBarcodeWithOrderNumber: ").Append(IncludeBarcodeWithOrderNumber).Append("\n"); + sb.Append(" ReceiveEmailOnManifestProcessing: ").Append(ReceiveEmailOnManifestProcessing).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdatePackageTypeRequestBody.cs b/ShipEngineSDK/Model/UpdatePackageTypeRequestBody.cs new file mode 100644 index 00000000..1eec8da0 --- /dev/null +++ b/ShipEngineSDK/Model/UpdatePackageTypeRequestBody.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update package type request body +/// +public partial class UpdatePackageTypeRequestBody +{ + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. + /// + /// small_flat_rate_box + /// + [JsonPropertyName("package_code"), JsonPropertyOrder(2)] + public required string PackageCode { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description"), JsonPropertyOrder(3)] + public string? Description { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions"), JsonPropertyOrder(4)] + public Dimensions? Dimensions { get; set; } + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id"), JsonPropertyOrder(5)] + public string? PackageId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdatePackageTypeRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateShipmentFields.cs b/ShipEngineSDK/Model/UpdateShipmentFields.cs new file mode 100644 index 00000000..56c76527 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentFields.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// UpdateShipmentFields +/// +public partial class UpdateShipmentFields +{ + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(1)] + public ValidateAddress? ValidateAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateShipmentFields {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateShipmentRequestBody.cs b/ShipEngineSDK/Model/UpdateShipmentRequestBody.cs new file mode 100644 index 00000000..e1800690 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentRequestBody.cs @@ -0,0 +1,319 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update shipment request body +/// +public partial class UpdateShipmentRequestBody +{ + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(1)] + public required ShippingAddress ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(2)] + public required ShippingAddressTo ShipTo { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(3)] + public AdvancedShipmentOptions? AdvancedOptions { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(4)] + public string? CarrierId { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(5)] + public string? ComparisonRateType { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(6)] + public DeliveryConfirmation? Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(8)] + public InternationalShipmentOptions? Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(9)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(10)] + public string? ExternalShipmentId { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(11)] + public InsuranceProvider? InsuranceProvider { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(12)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(13)] + public List? Items { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(15)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(16)] + public List? Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(17)] + public ShippingAddress? ReturnTo { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(18)] + public string? ServiceCode { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(19)] + public DateTimeOffset? ShipDate { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(21)] + public string? ShipmentNumber { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(23)] + public string? ShippingRuleId { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(25)] + public List? TaxIdentifiers { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(27)] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(28)] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateShipmentRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateShipmentResponseBody.cs b/ShipEngineSDK/Model/UpdateShipmentResponseBody.cs new file mode 100644 index 00000000..c531141f --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentResponseBody.cs @@ -0,0 +1,331 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update shipment response body +/// +public partial class UpdateShipmentResponseBody +{ + + /// + /// The address validation + /// + /// The address validation + [JsonPropertyName("address_validation"), JsonPropertyOrder(1)] + public required AddressValidationResult AddressValidation { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options"), JsonPropertyOrder(2)] + public required AdvancedShipmentOptions AdvancedOptions { get; set; } + + /// + /// The carrier account that is billed for the shipping charges + /// + /// The carrier account that is billed for the shipping charges + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id"), JsonPropertyOrder(3)] + public required string CarrierId { get; set; } + + /// + /// The type of delivery confirmation that is required for this shipment. + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation"), JsonPropertyOrder(4)] + public required DeliveryConfirmation Confirmation { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// An array of errors that occurred while creating shipment. + /// + /// An array of errors that occurred while creating shipment. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("errors"), JsonInclude, Obsolete] + public List? Errors { get; set; } + + /// + /// The insurance provider to use for any insured packages in the shipment. + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider"), JsonPropertyOrder(7)] + public required InsuranceProvider InsuranceProvider { get; set; } + + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + /// + /// The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. + [JsonPropertyName("packages"), JsonPropertyOrder(8)] + public required List Packages { get; set; } + + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + /// + /// The return address for this shipment. Defaults to the `ship_from` address. + [JsonPropertyName("return_to"), JsonPropertyOrder(9)] + public required ShippingAddress ReturnTo { get; set; } + + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. + /// + /// usps_first_class_mail + /// + [JsonPropertyName("service_code"), JsonPropertyOrder(10)] + public required string ServiceCode { get; set; } + + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date"), JsonPropertyOrder(11)] + public required DateTimeOffset ShipDate { get; set; } + + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + /// + /// The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. + [JsonPropertyName("ship_from"), JsonPropertyOrder(12)] + public required ShippingAddress ShipFrom { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to"), JsonPropertyOrder(13)] + public required ShippingAddressTo ShipTo { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id"), JsonInclude] + public string? ShipmentId { get; set; } + + /// + /// The current status of the shipment + /// + /// The current status of the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("shipment_status"), JsonInclude] + public ShipmentStatus? ShipmentStatus { get; set; } + + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("tags"), JsonInclude] + public List? Tags { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("total_weight"), JsonInclude] + public Weight? TotalWeight { get; set; } + + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. + /// + /// retail + /// + [JsonPropertyName("comparison_rate_type"), JsonPropertyOrder(18)] + public string? ComparisonRateType { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs"), JsonPropertyOrder(19)] + public required InternationalShipmentOptions Customs { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id"), JsonPropertyOrder(20)] + public string? ExternalOrderId { get; set; } + + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("external_shipment_id"), JsonPropertyOrder(21)] + public string? ExternalShipmentId { get; set; } + + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + /// + /// An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. + [JsonPropertyName("is_return"), JsonPropertyOrder(22)] + public bool? IsReturn { get; set; } + + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + /// + /// Describe the packages included in this shipment as related to potential metadata that was imported from external order sources + [JsonPropertyName("items"), JsonPropertyOrder(23)] + public List? Items { get; set; } + + /// + /// The date and time that the shipment was created or last modified. + /// + /// The date and time that the shipment was created or last modified. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at"), JsonInclude] + public DateTimeOffset? ModifiedAt { get; set; } + + /// + /// Gets or Sets OrderSourceCode + /// + [JsonPropertyName("order_source_code"), JsonPropertyOrder(25)] + public OrderSourceName? OrderSourceCode { get; set; } + + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + /// + /// A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. + [JsonPropertyName("shipment_number"), JsonPropertyOrder(26)] + public string? ShipmentNumber { get; set; } + + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipping_rule_id"), JsonPropertyOrder(27)] + public string? ShippingRuleId { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers"), JsonPropertyOrder(28)] + public List? TaxIdentifiers { get; set; } + + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonPropertyOrder(29)] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateShipmentResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AddressValidation: ").Append(AddressValidation).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateShipmentsTags.cs b/ShipEngineSDK/Model/UpdateShipmentsTags.cs new file mode 100644 index 00000000..e85d24e0 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentsTags.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// UpdateShipmentsTags +/// +public partial class UpdateShipmentsTags +{ + + /// + /// Gets or Sets ShipmentsTags + /// + [JsonPropertyName("shipments_tags"), JsonPropertyOrder(1)] + public List? ShipmentsTags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateShipmentsTags {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ShipmentsTags: ").Append(ShipmentsTags).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateShipmentsTagsRequestBody.cs b/ShipEngineSDK/Model/UpdateShipmentsTagsRequestBody.cs new file mode 100644 index 00000000..86135a27 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentsTagsRequestBody.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A request body with shipments and tags +/// +public partial class UpdateShipmentsTagsRequestBody +{ + + /// + /// Gets or Sets ShipmentsTags + /// + [JsonPropertyName("shipments_tags"), JsonPropertyOrder(1)] + public List? ShipmentsTags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateShipmentsTagsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ShipmentsTags: ").Append(ShipmentsTags).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateShipmentsTagsShipmentsTagsInner.cs b/ShipEngineSDK/Model/UpdateShipmentsTagsShipmentsTagsInner.cs new file mode 100644 index 00000000..77040254 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentsTagsShipmentsTagsInner.cs @@ -0,0 +1,67 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// UpdateShipmentsTagsShipmentsTagsInner +/// +public partial class UpdateShipmentsTagsShipmentsTagsInner +{ + + /// + /// Gets or Sets ShipmentId + /// + [JsonPropertyName("shipment_id"), JsonPropertyOrder(1)] + public string? ShipmentId { get; set; } + + /// + /// Gets or Sets Tags + /// + [JsonPropertyName("tags"), JsonPropertyOrder(2)] + public List? Tags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateShipmentsTagsShipmentsTagsInner {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateUpsSettingsRequestBody.cs b/ShipEngineSDK/Model/UpdateUpsSettingsRequestBody.cs new file mode 100644 index 00000000..3895dc5f --- /dev/null +++ b/ShipEngineSDK/Model/UpdateUpsSettingsRequestBody.cs @@ -0,0 +1,147 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update UPS settings request body +/// +public partial class UpdateUpsSettingsRequestBody +{ + + /// + /// account postal code + /// + /// account postal code + [JsonPropertyName("account_postal_code"), JsonPropertyOrder(1)] + public string? AccountPostalCode { get; set; } + + /// + /// The invoice + /// + /// The invoice + [JsonPropertyName("invoice"), JsonPropertyOrder(2)] + public UpsInvoice? Invoice { get; set; } + + /// + /// Indicates if this is the primary UPS account + /// + /// Indicates if this is the primary UPS account + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(3)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// mail innovations cost center + /// + /// mail innovations cost center + [JsonPropertyName("mail_innovations_cost_center"), JsonPropertyOrder(4)] + public string? MailInnovationsCostCenter { get; set; } + + /// + /// Gets or Sets MailInnovationsEndorsement + /// + [JsonPropertyName("mail_innovations_endorsement"), JsonPropertyOrder(5)] + public AncillaryServiceEndorsement? MailInnovationsEndorsement { get; set; } + + /// + /// nickname + /// + /// nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(6)] + public string? Nickname { get; set; } + + /// + /// Gets or Sets PickupType + /// + [JsonPropertyName("pickup_type"), JsonPropertyOrder(7)] + public UpsPickupType? PickupType { get; set; } + + /// + /// The use carbon neutral shipping program + /// + /// The use carbon neutral shipping program + [JsonPropertyName("use_carbon_neutral_shipping_program"), JsonPropertyOrder(8)] + public bool? UseCarbonNeutralShippingProgram { get; set; } + + /// + /// The use consolidation services + /// + /// The use consolidation services + [JsonPropertyName("use_consolidation_services"), JsonPropertyOrder(9)] + public bool? UseConsolidationServices { get; set; } + + /// + /// The use ground freight pricing + /// + /// The use ground freight pricing + [JsonPropertyName("use_ground_freight_pricing"), JsonPropertyOrder(10)] + public bool? UseGroundFreightPricing { get; set; } + + /// + /// The use negotiated rates + /// + /// The use negotiated rates + [JsonPropertyName("use_negotiated_rates"), JsonPropertyOrder(11)] + public bool? UseNegotiatedRates { get; set; } + + /// + /// The use order number on mail innovations labels + /// + /// The use order number on mail innovations labels + [JsonPropertyName("use_order_number_on_mail_innovations_labels"), JsonPropertyOrder(12)] + public bool? UseOrderNumberOnMailInnovationsLabels { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateUpsSettingsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountPostalCode: ").Append(AccountPostalCode).Append("\n"); + sb.Append(" Invoice: ").Append(Invoice).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" MailInnovationsCostCenter: ").Append(MailInnovationsCostCenter).Append("\n"); + sb.Append(" MailInnovationsEndorsement: ").Append(MailInnovationsEndorsement).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" UseCarbonNeutralShippingProgram: ").Append(UseCarbonNeutralShippingProgram).Append("\n"); + sb.Append(" UseConsolidationServices: ").Append(UseConsolidationServices).Append("\n"); + sb.Append(" UseGroundFreightPricing: ").Append(UseGroundFreightPricing).Append("\n"); + sb.Append(" UseNegotiatedRates: ").Append(UseNegotiatedRates).Append("\n"); + sb.Append(" UseOrderNumberOnMailInnovationsLabels: ").Append(UseOrderNumberOnMailInnovationsLabels).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateWarehouseRequestBody.cs b/ShipEngineSDK/Model/UpdateWarehouseRequestBody.cs new file mode 100644 index 00000000..edf388e8 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateWarehouseRequestBody.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update warehouse request body +/// +public partial class UpdateWarehouseRequestBody +{ + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name"), JsonPropertyOrder(1)] + public required string Name { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address"), JsonPropertyOrder(2)] + public required Address OriginAddress { get; set; } + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Designates which single warehouse is the default on the account + /// + /// Designates which single warehouse is the default on the account + [JsonPropertyName("is_default"), JsonPropertyOrder(4)] + public bool? IsDefault { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address"), JsonPropertyOrder(5)] + public Address? ReturnAddress { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateWarehouseRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateWarehouseSettingsRequestBody.cs b/ShipEngineSDK/Model/UpdateWarehouseSettingsRequestBody.cs new file mode 100644 index 00000000..2b214c07 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateWarehouseSettingsRequestBody.cs @@ -0,0 +1,64 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update warehouse settings request body +/// +public partial class UpdateWarehouseSettingsRequestBody +{ + + /// + /// The default property on the warehouse. + /// + /// The default property on the warehouse. + /// + /// true + /// + [JsonPropertyName("is_default"), JsonPropertyOrder(1)] + public bool? IsDefault { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateWarehouseSettingsRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpdateWebhookRequestBody.cs b/ShipEngineSDK/Model/UpdateWebhookRequestBody.cs new file mode 100644 index 00000000..3989d3c8 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateWebhookRequestBody.cs @@ -0,0 +1,72 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// An update webhook request body +/// +public partial class UpdateWebhookRequestBody +{ + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers"), JsonPropertyOrder(1)] + public List? Headers { get; set; } + + /// + /// The url that the wehbook sends the request + /// + /// The url that the wehbook sends the request + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("url"), JsonPropertyOrder(2)] + public string? Url { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateWebhookRequestBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Headers: ").Append(Headers).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpsAccountSettings.cs b/ShipEngineSDK/Model/UpsAccountSettings.cs new file mode 100644 index 00000000..6cad13d3 --- /dev/null +++ b/ShipEngineSDK/Model/UpsAccountSettings.cs @@ -0,0 +1,147 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// UPS account settings +/// +public partial class UpsAccountSettings +{ + + /// + /// account postal code + /// + /// account postal code + [JsonPropertyName("account_postal_code"), JsonPropertyOrder(1)] + public string? AccountPostalCode { get; set; } + + /// + /// The invoice + /// + /// The invoice + [JsonPropertyName("invoice"), JsonPropertyOrder(2)] + public UpsInvoice? Invoice { get; set; } + + /// + /// Indicates if this is the primary UPS account + /// + /// Indicates if this is the primary UPS account + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(3)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// mail innovations cost center + /// + /// mail innovations cost center + [JsonPropertyName("mail_innovations_cost_center"), JsonPropertyOrder(4)] + public string? MailInnovationsCostCenter { get; set; } + + /// + /// Gets or Sets MailInnovationsEndorsement + /// + [JsonPropertyName("mail_innovations_endorsement"), JsonPropertyOrder(5)] + public AncillaryServiceEndorsement? MailInnovationsEndorsement { get; set; } + + /// + /// nickname + /// + /// nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(6)] + public string? Nickname { get; set; } + + /// + /// Gets or Sets PickupType + /// + [JsonPropertyName("pickup_type"), JsonPropertyOrder(7)] + public UpsPickupType? PickupType { get; set; } + + /// + /// The use carbon neutral shipping program + /// + /// The use carbon neutral shipping program + [JsonPropertyName("use_carbon_neutral_shipping_program"), JsonPropertyOrder(8)] + public bool? UseCarbonNeutralShippingProgram { get; set; } + + /// + /// The use consolidation services + /// + /// The use consolidation services + [JsonPropertyName("use_consolidation_services"), JsonPropertyOrder(9)] + public bool? UseConsolidationServices { get; set; } + + /// + /// The use ground freight pricing + /// + /// The use ground freight pricing + [JsonPropertyName("use_ground_freight_pricing"), JsonPropertyOrder(10)] + public bool? UseGroundFreightPricing { get; set; } + + /// + /// The use negotiated rates + /// + /// The use negotiated rates + [JsonPropertyName("use_negotiated_rates"), JsonPropertyOrder(11)] + public bool? UseNegotiatedRates { get; set; } + + /// + /// The use order number on mail innovations labels + /// + /// The use order number on mail innovations labels + [JsonPropertyName("use_order_number_on_mail_innovations_labels"), JsonPropertyOrder(12)] + public bool? UseOrderNumberOnMailInnovationsLabels { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpsAccountSettings {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountPostalCode: ").Append(AccountPostalCode).Append("\n"); + sb.Append(" Invoice: ").Append(Invoice).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" MailInnovationsCostCenter: ").Append(MailInnovationsCostCenter).Append("\n"); + sb.Append(" MailInnovationsEndorsement: ").Append(MailInnovationsEndorsement).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" UseCarbonNeutralShippingProgram: ").Append(UseCarbonNeutralShippingProgram).Append("\n"); + sb.Append(" UseConsolidationServices: ").Append(UseConsolidationServices).Append("\n"); + sb.Append(" UseGroundFreightPricing: ").Append(UseGroundFreightPricing).Append("\n"); + sb.Append(" UseNegotiatedRates: ").Append(UseNegotiatedRates).Append("\n"); + sb.Append(" UseOrderNumberOnMailInnovationsLabels: ").Append(UseOrderNumberOnMailInnovationsLabels).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpsInvoice.cs b/ShipEngineSDK/Model/UpsInvoice.cs new file mode 100644 index 00000000..18b19963 --- /dev/null +++ b/ShipEngineSDK/Model/UpsInvoice.cs @@ -0,0 +1,94 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// UPS invoice +/// +public partial class UpsInvoice +{ + + /// + /// A string that uniquely identifies the control + /// + /// A string that uniquely identifies the control + /// + /// se-28529731 + /// + [JsonPropertyName("control_id"), JsonPropertyOrder(1)] + public string? ControlId { get; set; } + + /// + /// Gets or Sets InvoiceAmount + /// + [JsonPropertyName("invoice_amount"), JsonPropertyOrder(2)] + public decimal? InvoiceAmount { get; set; } + + /// + /// Gets or Sets InvoiceCurrencyCode + /// + [JsonPropertyName("invoice_currency_code"), JsonPropertyOrder(3)] + public string? InvoiceCurrencyCode { get; set; } + + /// + /// invoice date + /// + /// invoice date + [JsonPropertyName("invoice_date"), JsonPropertyOrder(4)] + public DateTimeOffset? InvoiceDate { get; set; } + + /// + /// invoice number + /// + /// invoice number + [JsonPropertyName("invoice_number"), JsonPropertyOrder(5)] + public string? InvoiceNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpsInvoice {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ControlId: ").Append(ControlId).Append("\n"); + sb.Append(" InvoiceAmount: ").Append(InvoiceAmount).Append("\n"); + sb.Append(" InvoiceCurrencyCode: ").Append(InvoiceCurrencyCode).Append("\n"); + sb.Append(" InvoiceDate: ").Append(InvoiceDate).Append("\n"); + sb.Append(" InvoiceNumber: ").Append(InvoiceNumber).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpsPickupType.cs b/ShipEngineSDK/Model/UpsPickupType.cs new file mode 100644 index 00000000..c782d825 --- /dev/null +++ b/ShipEngineSDK/Model/UpsPickupType.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible ups pickup type values +/// +/// The possible ups pickup type values +[JsonConverter(typeof(UpsPickupTypeJsonConverter))] +public class UpsPickupType +{ + private readonly string _value; + + /// + /// Create a new instance of UpsPickupType with a predefined value. + /// + internal UpsPickupType() + { + _value = "daily_pickup"; + } + + /// + /// Create a new instance of UpsPickupType with a custom value. + /// + /// The value of the UpsPickupType + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public UpsPickupType(string value) + { + _value = value; + } + + /// + /// Enum DailyPickup for value: daily_pickup + /// + public static UpsPickupType DailyPickup { get; } = new("daily_pickup"); + + + /// + /// Enum OccasionalPickup for value: occasional_pickup + /// + public static UpsPickupType OccasionalPickup { get; } = new("occasional_pickup"); + + + /// + /// Enum CustomerCounter for value: customer_counter + /// + public static UpsPickupType CustomerCounter { get; } = new("customer_counter"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is UpsPickupType other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class UpsPickupTypeJsonConverter : JsonConverter +{ + public override UpsPickupType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new UpsPickupType(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, UpsPickupType value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(UpsPickupType); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/UpsSettingsResponseBody.cs b/ShipEngineSDK/Model/UpsSettingsResponseBody.cs new file mode 100644 index 00000000..bf720348 --- /dev/null +++ b/ShipEngineSDK/Model/UpsSettingsResponseBody.cs @@ -0,0 +1,147 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A UPS settings response body +/// +public partial class UpsSettingsResponseBody +{ + + /// + /// account postal code + /// + /// account postal code + [JsonPropertyName("account_postal_code"), JsonPropertyOrder(1)] + public string? AccountPostalCode { get; set; } + + /// + /// The invoice + /// + /// The invoice + [JsonPropertyName("invoice"), JsonPropertyOrder(2)] + public UpsInvoice? Invoice { get; set; } + + /// + /// Indicates if this is the primary UPS account + /// + /// Indicates if this is the primary UPS account + [JsonPropertyName("is_primary_account"), JsonPropertyOrder(3)] + public bool? IsPrimaryAccount { get; set; } + + /// + /// mail innovations cost center + /// + /// mail innovations cost center + [JsonPropertyName("mail_innovations_cost_center"), JsonPropertyOrder(4)] + public string? MailInnovationsCostCenter { get; set; } + + /// + /// Gets or Sets MailInnovationsEndorsement + /// + [JsonPropertyName("mail_innovations_endorsement"), JsonPropertyOrder(5)] + public AncillaryServiceEndorsement? MailInnovationsEndorsement { get; set; } + + /// + /// nickname + /// + /// nickname + [JsonPropertyName("nickname"), JsonPropertyOrder(6)] + public string? Nickname { get; set; } + + /// + /// Gets or Sets PickupType + /// + [JsonPropertyName("pickup_type"), JsonPropertyOrder(7)] + public UpsPickupType? PickupType { get; set; } + + /// + /// The use carbon neutral shipping program + /// + /// The use carbon neutral shipping program + [JsonPropertyName("use_carbon_neutral_shipping_program"), JsonPropertyOrder(8)] + public bool? UseCarbonNeutralShippingProgram { get; set; } + + /// + /// The use consolidation services + /// + /// The use consolidation services + [JsonPropertyName("use_consolidation_services"), JsonPropertyOrder(9)] + public bool? UseConsolidationServices { get; set; } + + /// + /// The use ground freight pricing + /// + /// The use ground freight pricing + [JsonPropertyName("use_ground_freight_pricing"), JsonPropertyOrder(10)] + public bool? UseGroundFreightPricing { get; set; } + + /// + /// The use negotiated rates + /// + /// The use negotiated rates + [JsonPropertyName("use_negotiated_rates"), JsonPropertyOrder(11)] + public bool? UseNegotiatedRates { get; set; } + + /// + /// The use order number on mail innovations labels + /// + /// The use order number on mail innovations labels + [JsonPropertyName("use_order_number_on_mail_innovations_labels"), JsonPropertyOrder(12)] + public bool? UseOrderNumberOnMailInnovationsLabels { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpsSettingsResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" AccountPostalCode: ").Append(AccountPostalCode).Append("\n"); + sb.Append(" Invoice: ").Append(Invoice).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" MailInnovationsCostCenter: ").Append(MailInnovationsCostCenter).Append("\n"); + sb.Append(" MailInnovationsEndorsement: ").Append(MailInnovationsEndorsement).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" UseCarbonNeutralShippingProgram: ").Append(UseCarbonNeutralShippingProgram).Append("\n"); + sb.Append(" UseConsolidationServices: ").Append(UseConsolidationServices).Append("\n"); + sb.Append(" UseGroundFreightPricing: ").Append(UseGroundFreightPricing).Append("\n"); + sb.Append(" UseNegotiatedRates: ").Append(UseNegotiatedRates).Append("\n"); + sb.Append(" UseOrderNumberOnMailInnovationsLabels: ").Append(UseOrderNumberOnMailInnovationsLabels).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ValidateAddress.cs b/ShipEngineSDK/Model/ValidateAddress.cs new file mode 100644 index 00000000..12d913a9 --- /dev/null +++ b/ShipEngineSDK/Model/ValidateAddress.cs @@ -0,0 +1,98 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible validate address values +/// +/// The possible validate address values +[JsonConverter(typeof(ValidateAddressJsonConverter))] +public class ValidateAddress +{ + private readonly string _value; + + /// + /// Create a new instance of ValidateAddress with a predefined value. + /// + internal ValidateAddress() + { + _value = "no_validation"; + } + + /// + /// Create a new instance of ValidateAddress with a custom value. + /// + /// The value of the ValidateAddress + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ValidateAddress(string value) + { + _value = value; + } + + /// + /// Enum NoValidation for value: no_validation + /// + public static ValidateAddress NoValidation { get; } = new("no_validation"); + + + /// + /// Enum ValidateOnly for value: validate_only + /// + public static ValidateAddress ValidateOnly { get; } = new("validate_only"); + + + /// + /// Enum ValidateAndClean for value: validate_and_clean + /// + public static ValidateAddress ValidateAndClean { get; } = new("validate_and_clean"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ValidateAddress other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ValidateAddressJsonConverter : JsonConverter +{ + public override ValidateAddress? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ValidateAddress(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ValidateAddress value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ValidateAddress); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ValidateShipmentFields.cs b/ShipEngineSDK/Model/ValidateShipmentFields.cs new file mode 100644 index 00000000..23eea7e9 --- /dev/null +++ b/ShipEngineSDK/Model/ValidateShipmentFields.cs @@ -0,0 +1,60 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ValidateShipmentFields +/// +public partial class ValidateShipmentFields +{ + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address"), JsonPropertyOrder(1)] + public ValidateAddress? ValidateAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ValidateShipmentFields {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/ValidationStatus.cs b/ShipEngineSDK/Model/ValidationStatus.cs new file mode 100644 index 00000000..4cb8b3a9 --- /dev/null +++ b/ShipEngineSDK/Model/ValidationStatus.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible validation status values +/// +/// The possible validation status values +[JsonConverter(typeof(ValidationStatusJsonConverter))] +public class ValidationStatus +{ + private readonly string _value; + + /// + /// Create a new instance of ValidationStatus with a predefined value. + /// + internal ValidationStatus() + { + _value = "valid"; + } + + /// + /// Create a new instance of ValidationStatus with a custom value. + /// + /// The value of the ValidationStatus + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public ValidationStatus(string value) + { + _value = value; + } + + /// + /// Enum Valid for value: valid + /// + public static ValidationStatus Valid { get; } = new("valid"); + + + /// + /// Enum Invalid for value: invalid + /// + public static ValidationStatus Invalid { get; } = new("invalid"); + + + /// + /// Enum HasWarnings for value: has_warnings + /// + public static ValidationStatus HasWarnings { get; } = new("has_warnings"); + + + /// + /// Enum Unknown for value: unknown + /// + public static ValidationStatus Unknown { get; } = new("unknown"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is ValidationStatus other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class ValidationStatusJsonConverter : JsonConverter +{ + public override ValidationStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new ValidationStatus(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, ValidationStatus value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(ValidationStatus); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/VoidLabelResponseBody.cs b/ShipEngineSDK/Model/VoidLabelResponseBody.cs new file mode 100644 index 00000000..ca95569c --- /dev/null +++ b/ShipEngineSDK/Model/VoidLabelResponseBody.cs @@ -0,0 +1,91 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A void label response body +/// +public partial class VoidLabelResponseBody +{ + + /// + /// Indicates whether the attempt to void the label was successful + /// + /// Indicates whether the attempt to void the label was successful + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// false + /// + [JsonPropertyName("approved"), JsonInclude] + public bool? Approved { get; set; } + + /// + /// Gets or Sets Message + /// + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// Unable to delete FedEx shipment. Unable to retrieve record from database. + /// + [JsonPropertyName("message"), JsonInclude] + public string? Message { get; set; } + + /// + /// Indicates a normalized reason for the conditions if the void attempt was not approved. Will not populate if approved is true. “unknown” codes may be specified later. + /// + /// Indicates a normalized reason for the conditions if the void attempt was not approved. Will not populate if approved is true. “unknown” codes may be specified later. + /// + /// This should not be used for input as it will be ignored on serialization. + /// + [JsonPropertyName("reason_code"), JsonInclude] + public ReasonCode? ReasonCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class VoidLabelResponseBody {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Approved: ").Append(Approved).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" ReasonCode: ").Append(ReasonCode).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Warehouse.cs b/ShipEngineSDK/Model/Warehouse.cs new file mode 100644 index 00000000..ca5b9fdf --- /dev/null +++ b/ShipEngineSDK/Model/Warehouse.cs @@ -0,0 +1,116 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A warehouse +/// +public partial class Warehouse +{ + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at"), JsonInclude] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Designates which single warehouse is the default on the account + /// + /// Designates which single warehouse is the default on the account + [JsonPropertyName("is_default"), JsonPropertyOrder(2)] + public bool? IsDefault { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name"), JsonPropertyOrder(3)] + public string? Name { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address"), JsonPropertyOrder(4)] + public Address? OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address"), JsonPropertyOrder(5)] + public Address? ReturnAddress { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id"), JsonInclude] + public string? WarehouseId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Warehouse {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Webhook.cs b/ShipEngineSDK/Model/Webhook.cs new file mode 100644 index 00000000..2978bd1b --- /dev/null +++ b/ShipEngineSDK/Model/Webhook.cs @@ -0,0 +1,93 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// A webhook +/// +public partial class Webhook +{ + + /// + /// Gets or Sets Event + /// + [JsonPropertyName("event"), JsonPropertyOrder(1)] + public WebhookEvent? Event { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers"), JsonPropertyOrder(2)] + public List? Headers { get; set; } + + /// + /// The url that the webhook sends the request to + /// + /// The url that the webhook sends the request to + /// + /// http://api.shipengine.com/v1/labels/se-28529731 + /// + [JsonPropertyName("url"), JsonPropertyOrder(3)] + public string? Url { get; set; } + + /// + /// A string that uniquely identifies the webhook + /// + /// A string that uniquely identifies the webhook + /// + /// This should not be used for input as it will be ignored on serialization. + /// + /// + /// se-28529731 + /// + [JsonPropertyName("webhook_id"), JsonInclude] + public string? WebhookId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Webhook {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/WebhookEvent.cs b/ShipEngineSDK/Model/WebhookEvent.cs new file mode 100644 index 00000000..d57c9bac --- /dev/null +++ b/ShipEngineSDK/Model/WebhookEvent.cs @@ -0,0 +1,122 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible webook event values +/// +/// The possible webook event values +[JsonConverter(typeof(WebhookEventJsonConverter))] +public class WebhookEvent +{ + private readonly string _value; + + /// + /// Create a new instance of WebhookEvent with a predefined value. + /// + internal WebhookEvent() + { + _value = "batch"; + } + + /// + /// Create a new instance of WebhookEvent with a custom value. + /// + /// The value of the WebhookEvent + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public WebhookEvent(string value) + { + _value = value; + } + + /// + /// Enum Batch for value: batch + /// + public static WebhookEvent Batch { get; } = new("batch"); + + + /// + /// Enum CarrierConnected for value: carrier_connected + /// + public static WebhookEvent CarrierConnected { get; } = new("carrier_connected"); + + + /// + /// Enum OrderSourceRefreshComplete for value: order_source_refresh_complete + /// + public static WebhookEvent OrderSourceRefreshComplete { get; } = new("order_source_refresh_complete"); + + + /// + /// Enum Rate for value: rate + /// + public static WebhookEvent Rate { get; } = new("rate"); + + + /// + /// Enum ReportComplete for value: report_complete + /// + public static WebhookEvent ReportComplete { get; } = new("report_complete"); + + + /// + /// Enum SalesOrdersImported for value: sales_orders_imported + /// + public static WebhookEvent SalesOrdersImported { get; } = new("sales_orders_imported"); + + + /// + /// Enum Track for value: track + /// + public static WebhookEvent Track { get; } = new("track"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is WebhookEvent other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class WebhookEventJsonConverter : JsonConverter +{ + public override WebhookEvent? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new WebhookEvent(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, WebhookEvent value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(WebhookEvent); +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/WebhookHeader.cs b/ShipEngineSDK/Model/WebhookHeader.cs new file mode 100644 index 00000000..64eb2b89 --- /dev/null +++ b/ShipEngineSDK/Model/WebhookHeader.cs @@ -0,0 +1,75 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// Optional header to be specified in webhook +/// +public partial class WebhookHeader +{ + + /// + /// Key/name of a header + /// + /// Key/name of a header + /// + /// custom-key + /// + [JsonPropertyName("key"), JsonPropertyOrder(1)] + public required string Key { get; set; } + + /// + /// Value of a header + /// + /// Value of a header + /// + /// custom-value + /// + [JsonPropertyName("value"), JsonPropertyOrder(2)] + public required string Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class WebhookHeader {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/Weight.cs b/ShipEngineSDK/Model/Weight.cs new file mode 100644 index 00000000..d4bcef5e --- /dev/null +++ b/ShipEngineSDK/Model/Weight.cs @@ -0,0 +1,68 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The weight of a package +/// +public partial class Weight +{ + + /// + /// Gets or Sets Unit + /// + [JsonPropertyName("unit"), JsonPropertyOrder(1)] + public required WeightUnit Unit { get; set; } + + /// + /// The weight, in the specified unit + /// + /// The weight, in the specified unit + [JsonPropertyName("value"), JsonPropertyOrder(2)] + public required decimal Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Weight {\n"); +#pragma warning disable CS0612 // Type or member is obsolete + sb.Append(" Unit: ").Append(Unit).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); +#pragma warning restore CS0612 // Type or member is obsolete + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/WeightUnit.cs b/ShipEngineSDK/Model/WeightUnit.cs new file mode 100644 index 00000000..14accf99 --- /dev/null +++ b/ShipEngineSDK/Model/WeightUnit.cs @@ -0,0 +1,104 @@ +// +// 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 System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// The possible weight unit values +/// +/// The possible weight unit values +[JsonConverter(typeof(WeightUnitJsonConverter))] +public class WeightUnit +{ + private readonly string _value; + + /// + /// Create a new instance of WeightUnit with a predefined value. + /// + internal WeightUnit() + { + _value = "pound"; + } + + /// + /// Create a new instance of WeightUnit with a custom value. + /// + /// The value of the WeightUnit + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// + public WeightUnit(string value) + { + _value = value; + } + + /// + /// Enum Pound for value: pound + /// + public static WeightUnit Pound { get; } = new("pound"); + + + /// + /// Enum Ounce for value: ounce + /// + public static WeightUnit Ounce { get; } = new("ounce"); + + + /// + /// Enum Gram for value: gram + /// + public static WeightUnit Gram { get; } = new("gram"); + + + /// + /// Enum Kilogram for value: kilogram + /// + public static WeightUnit Kilogram { get; } = new("kilogram"); + + + /// + /// Get a string representation of the current value + /// + public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is WeightUnit other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); +} + +internal class WeightUnitJsonConverter : JsonConverter +{ + public override WeightUnit? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.TokenType == JsonTokenType.String ? new WeightUnit(reader.GetString()!) : null; + + public override void Write(Utf8JsonWriter writer, WeightUnit value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof(WeightUnit); +} \ No newline at end of file diff --git a/ShipEngineSDK/Multimap.cs b/ShipEngineSDK/Multimap.cs index 4500b438..cc5ad8b0 100644 --- a/ShipEngineSDK/Multimap.cs +++ b/ShipEngineSDK/Multimap.cs @@ -239,7 +239,7 @@ public void CopyTo(Array array, int index) /// The object to use as the key of the item to add. /// The object to use as the value of the item to add. /// Thrown when couldn't add value to Multimap. - public void Add(TKey key, TValue value) + public void Add(TKey key, TValue? value) { if (value == null) { diff --git a/ShipEngineSDK/PublicAPI.Unshipped.txt b/ShipEngineSDK/PublicAPI.Unshipped.txt index cf4f1cec..ef285a19 100644 --- a/ShipEngineSDK/PublicAPI.Unshipped.txt +++ b/ShipEngineSDK/PublicAPI.Unshipped.txt @@ -2,8 +2,10 @@ abstract ShipEngineSDK.Model.AbstractOpenAPISchema.ActualInstance.set -> void abstract ShipEngineSDK.Model.AbstractOpenAPISchema.ToJson() -> string! const ShipEngineSDK.Client.ClientUtils.DateTimeFormat = "o" -> string! +const System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RefStructs = "RefStructs" -> string! +const System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RequiredMembers = "RequiredMembers" -> string! override ShipEngineSDK.DateJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> System.DateTime -override ShipEngineSDK.DateJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, System.DateTime dateTimeValue, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.DateJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, System.DateTime value, System.Text.Json.JsonSerializerOptions! options) -> void override ShipEngineSDK.Model.AccountSettings.ToString() -> string! override ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum.ToString() -> string! override ShipEngineSDK.Model.AccountSettingsImages.ToString() -> string! @@ -388,6 +390,15 @@ ShipEngineSDK.Client.Multimap.this[TKey key].get -> System.Collect ShipEngineSDK.Client.Multimap.this[TKey key].set -> void ShipEngineSDK.Client.Multimap.TryGetValue(TKey key, out System.Collections.Generic.IList! value) -> bool ShipEngineSDK.Client.Multimap.Values.get -> System.Collections.Generic.ICollection!>! +ShipEngineSDK.Common.AdvancedShipmentOptions.CertificateNumber.get -> string? +ShipEngineSDK.Common.AdvancedShipmentOptions.CertificateNumber.set -> void +ShipEngineSDK.Common.AdvancedShipmentOptions.InvoiceNumber.get -> string? +ShipEngineSDK.Common.AdvancedShipmentOptions.InvoiceNumber.set -> void +ShipEngineSDK.Common.AdvancedShipmentOptions.LicenseNumber.get -> string? +ShipEngineSDK.Common.AdvancedShipmentOptions.LicenseNumber.set -> void +ShipEngineSDK.Common.Enums.InsuranceProvider.FundingSource = 4 -> ShipEngineSDK.Common.Enums.InsuranceProvider +ShipEngineSDK.Common.Enums.InsuranceProvider.ParcelGuard = 5 -> ShipEngineSDK.Common.Enums.InsuranceProvider +ShipEngineSDK.Common.Enums.TrackingStatusCode.SP = 7 -> ShipEngineSDK.Common.Enums.TrackingStatusCode ShipEngineSDK.Common.Error.ErrorCode.get -> ShipEngineSDK.Enums.ErrorCode ShipEngineSDK.Common.Error.ErrorSource.get -> ShipEngineSDK.Enums.ErrorSource ShipEngineSDK.Common.Error.ErrorType.get -> ShipEngineSDK.Enums.ErrorType @@ -445,287 +456,197 @@ ShipEngineSDK.Enums.ErrorType.BusinessRules = 3 -> ShipEngineSDK.Enums.ErrorType ShipEngineSDK.Enums.ErrorType.Security = 1 -> ShipEngineSDK.Enums.ErrorType ShipEngineSDK.Enums.ErrorType.System = 4 -> ShipEngineSDK.Enums.ErrorType ShipEngineSDK.Enums.ErrorType.Validation = 2 -> ShipEngineSDK.Enums.ErrorType -ShipEngineSDK.IShipEngine.AddFundsToCarrier(ShipEngineSDK.Config! methodConfig, string! carrierId, ShipEngineSDK.Model.AddFundsToCarrierRequestBody! addFundsToCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +ShipEngineSDK.ErrorCode.MultipackageNotSupported = 41 -> ShipEngineSDK.ErrorCode +ShipEngineSDK.ErrorType.FundingSources = 6 -> ShipEngineSDK.ErrorType +ShipEngineSDK.ErrorType.Wallet = 5 -> ShipEngineSDK.ErrorType ShipEngineSDK.IShipEngine.AddFundsToCarrier(string! carrierId, ShipEngineSDK.Model.AddFundsToCarrierRequestBody! addFundsToCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.AddFundsToCarrier(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, ShipEngineSDK.Model.AddFundsToCarrierRequestBody! addFundsToCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.AddFundsToInsurance(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.AddFundsToInsuranceRequestBody! addFundsToInsuranceRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.AddFundsToInsurance(ShipEngineSDK.Model.AddFundsToInsuranceRequestBody! addFundsToInsuranceRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.AddFundsToInsurance(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.AddFundsToInsuranceRequestBody! addFundsToInsuranceRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.AddToBatch(ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.AddToBatchRequestBody! addToBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.AddToBatch(string! batchId, ShipEngineSDK.Model.AddToBatchRequestBody! addToBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.AddToBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.AddToBatchRequestBody! addToBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CalculateRates(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CalculateRatesRequestBody! calculateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CalculateRates(ShipEngineSDK.Model.CalculateRatesRequestBody! calculateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CalculateRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CalculateRatesRequestBody! calculateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CancelShipments(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CancelShipments(string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CancelShipments(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CompareBulkRates(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CompareBulkRatesRequestBody! compareBulkRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.CompareBulkRates(ShipEngineSDK.Model.CompareBulkRatesRequestBody! compareBulkRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.CompareBulkRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CompareBulkRatesRequestBody! compareBulkRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.IShipEngine.ConnectCarrier(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, ShipEngineSDK.Model.ConnectCarrierRequestBody! connectCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ConnectCarrier(ShipEngineSDK.Model.CarrierName! carrierName, ShipEngineSDK.Model.ConnectCarrierRequestBody! connectCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ConnectCarrier(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, ShipEngineSDK.Model.ConnectCarrierRequestBody! connectCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ConnectInsurer(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ConnectInsurerRequestBody! connectInsurerRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ConnectInsurer(ShipEngineSDK.Model.ConnectInsurerRequestBody! connectInsurerRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ConnectInsurer(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ConnectInsurerRequestBody! connectInsurerRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateAccountImage(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody! createAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateAccountImage(ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody! createAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateAccountImage(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody! createAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateBatch(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateBatchRequest! createBatchRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateBatch(ShipEngineSDK.Model.CreateBatchRequest! createBatchRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateBatchRequest! createBatchRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateLabel(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateLabelRequestBody! createLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateLabel(ShipEngineSDK.Model.CreateLabelRequestBody! createLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateLabelRequestBody! createLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateLabelFromRate(ShipEngineSDK.Config! methodConfig, string! rateId, ShipEngineSDK.Model.CreateLabelFromRateRequestBody! createLabelFromRateRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateLabelFromRate(string! rateId, ShipEngineSDK.Model.CreateLabelFromRateRequestBody! createLabelFromRateRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateLabelFromRate(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! rateId, ShipEngineSDK.Model.CreateLabelFromRateRequestBody! createLabelFromRateRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateLabelFromShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody! createLabelFromShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateLabelFromShipment(string! shipmentId, ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody! createLabelFromShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateLabelFromShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody! createLabelFromShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateManifest(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateManifestRequestBody! createManifestRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateManifest(ShipEngineSDK.Model.CreateManifestRequestBody! createManifestRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateManifest(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateManifestRequestBody! createManifestRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreatePackageType(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreatePackageTypeRequestBody! createPackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreatePackageType(ShipEngineSDK.Model.CreatePackageTypeRequestBody! createPackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreatePackageType(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreatePackageTypeRequestBody! createPackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateReturnLabel(ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.CreateReturnLabelRequestBody! createReturnLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateReturnLabel(string! labelId, ShipEngineSDK.Model.CreateReturnLabelRequestBody! createReturnLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateReturnLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.CreateReturnLabelRequestBody! createReturnLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateShipments(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateShipmentsRequestBody! createShipmentsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateShipments(ShipEngineSDK.Model.CreateShipmentsRequestBody! createShipmentsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateShipments(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateShipmentsRequestBody! createShipmentsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateTag(ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateTag(string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateTag(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateWarehouse(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWarehouseRequestBody! createWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateWarehouse(ShipEngineSDK.Model.CreateWarehouseRequestBody! createWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateWarehouse(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWarehouseRequestBody! createWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.CreateWebhook(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWebhookRequestBody! createWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateWebhook(ShipEngineSDK.Model.CreateWebhookRequestBody! createWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.CreateWebhook(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWebhookRequestBody! createWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DeleteAccountImageById(ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteAccountImageById(string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteAccountImageById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DeleteBatch(ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteBatch(string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DeletePackageType(ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeletePackageType(string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeletePackageType(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DeleteScheduledPickup(ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteScheduledPickup(string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteScheduledPickup(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DeleteTag(ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteTag(string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteTag(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DeleteWarehouse(ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteWarehouse(string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteWarehouse(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DeleteWebhook(ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteWebhook(string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DeleteWebhook(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DisconnectCarrier(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DisconnectCarrier(ShipEngineSDK.Model.CarrierName! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DisconnectCarrier(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DisconnectCarrierById(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DisconnectCarrierById(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DisconnectCarrierById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DisconnectInsurer(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DisconnectInsurer(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DisconnectInsurer(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.DownloadFile(ShipEngineSDK.Config! methodConfig, string! subdir, string! filename, string! dir, string! download, int? rotation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DownloadFile(string! subdir, string! filename, string! dir, string! download, int? rotation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.DownloadFile(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! subdir, string! filename, string! dir, string! download, int? rotation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.EstimateRates(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.EstimateRatesRequestBody! estimateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.EstimateRates(ShipEngineSDK.Model.EstimateRatesRequestBody! estimateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.EstimateRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.EstimateRatesRequestBody! estimateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.IShipEngine.GetAccountSettingsImagesById(ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetAccountSettingsImagesById(string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetAccountSettingsImagesById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetBatchByExternalId(ShipEngineSDK.Config! methodConfig, string! externalBatchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetBatchByExternalId(string! externalBatchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetBatchByExternalId(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! externalBatchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetBatchById(ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetBatchById(string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetBatchById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetCarrierById(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetCarrierById(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetCarrierById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetCarrierOptions(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetCarrierOptions(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetCarrierOptions(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetCarrierSettings(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetCarrierSettings(ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetCarrierSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetInsuranceBalance(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetInsuranceBalance(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetInsuranceBalance(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetLabelByExternalShipmentId(ShipEngineSDK.Config! methodConfig, string! externalShipmentId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetLabelByExternalShipmentId(string! externalShipmentId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetLabelByExternalShipmentId(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! externalShipmentId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetLabelById(ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetLabelById(string! labelId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetLabelById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetManifestById(ShipEngineSDK.Config! methodConfig, string! manifestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetManifestById(string! manifestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetManifestById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! manifestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetManifestRequestById(ShipEngineSDK.Config! methodConfig, string! manifestRequestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetManifestRequestById(string! manifestRequestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetManifestRequestById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! manifestRequestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetPackageTypeById(ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetPackageTypeById(string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetPackageTypeById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetPickupById(ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetPickupById(string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetPickupById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetRateById(ShipEngineSDK.Config! methodConfig, string! rateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetRateById(string! rateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetRateById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! rateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetShipmentByExternalId(ShipEngineSDK.Config! methodConfig, string! externalShipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetShipmentByExternalId(string! externalShipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetShipmentByExternalId(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! externalShipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetShipmentById(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetShipmentById(string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetShipmentById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetTrackingLog(ShipEngineSDK.Config! methodConfig, string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetTrackingLog(string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetTrackingLog(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetTrackingLogFromLabel(ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetTrackingLogFromLabel(string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetTrackingLogFromLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetWarehouseById(ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetWarehouseById(string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetWarehouseById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.GetWebhookById(ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetWebhookById(string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.GetWebhookById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListAccountImages(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListAccountImages(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListAccountImages(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListAccountSettings(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListAccountSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListAccountSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListBatchErrors(ShipEngineSDK.Config! methodConfig, string! batchId, int? page, int? pagesize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListBatchErrors(string! batchId, int? page, int? pagesize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListBatchErrors(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, int? page, int? pagesize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListBatches(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.BatchStatus? status, int? page, int? pageSize, ShipEngineSDK.Model.SortDir? sortDir, string! batchNumber, ShipEngineSDK.Model.BatchesSortBy? sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListBatches(ShipEngineSDK.Model.BatchStatus? status, int? page, int? pageSize, ShipEngineSDK.Model.SortDir? sortDir, string! batchNumber, ShipEngineSDK.Model.BatchesSortBy? sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListBatches(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.BatchStatus? status, int? page, int? pageSize, ShipEngineSDK.Model.SortDir? sortDir, string! batchNumber, ShipEngineSDK.Model.BatchesSortBy? sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListCarrierPackageTypes(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListCarrierPackageTypes(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListCarrierPackageTypes(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListCarriers(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListCarriers(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListCarriers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListCarrierServices(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListCarrierServices(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListCarrierServices(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListLabels(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.LabelStatus? labelStatus, string! serviceCode, string! carrierId, string! trackingNumber, string! batchId, string! rateId, string! shipmentId, string! warehouseId, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, int? page, int? pageSize, ShipEngineSDK.Model.SortDir? sortDir, string! sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListLabels(ShipEngineSDK.Model.LabelStatus? labelStatus, string! serviceCode, string! carrierId, string! trackingNumber, string! batchId, string! rateId, string! shipmentId, string! warehouseId, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, int? page, int? pageSize, ShipEngineSDK.Model.SortDir? sortDir, string! sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListLabels(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.LabelStatus? labelStatus, string! serviceCode, string! carrierId, string! trackingNumber, string! batchId, string! rateId, string! shipmentId, string! warehouseId, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, int? page, int? pageSize, ShipEngineSDK.Model.SortDir? sortDir, string! sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListManifests(ShipEngineSDK.Config! methodConfig, string! warehouseId, System.DateTime? shipDateStart, System.DateTime? shipDateEnd, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, string! carrierId, int? page, int? pageSize, System.Collections.Generic.List! labelIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListManifests(string! warehouseId, System.DateTime? shipDateStart, System.DateTime? shipDateEnd, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, string! carrierId, int? page, int? pageSize, System.Collections.Generic.List! labelIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListManifests(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, System.DateTime? shipDateStart, System.DateTime? shipDateEnd, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, string! carrierId, int? page, int? pageSize, System.Collections.Generic.List! labelIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListPackageTypes(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListPackageTypes(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListPackageTypes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListScheduledPickups(ShipEngineSDK.Config! methodConfig, string! carrierId, string! warehouseId, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, int? page, int? pageSize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListScheduledPickups(string! carrierId, string! warehouseId, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, int? page, int? pageSize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListScheduledPickups(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, string! warehouseId, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, int? page, int? pageSize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListShipmentRates(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.DateTime? createdAtStart, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListShipmentRates(string! shipmentId, System.DateTime? createdAtStart, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListShipmentRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.DateTime? createdAtStart, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListShipments(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ShipmentStatus? shipmentStatus, string! batchId, string! tag, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, System.DateTime? modifiedAtStart, System.DateTime? modifiedAtEnd, int? page, int? pageSize, string! salesOrderId, ShipEngineSDK.Model.SortDir? sortDir, ShipEngineSDK.Model.ShipmentsSortBy? sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListShipments(ShipEngineSDK.Model.ShipmentStatus? shipmentStatus, string! batchId, string! tag, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, System.DateTime? modifiedAtStart, System.DateTime? modifiedAtEnd, int? page, int? pageSize, string! salesOrderId, ShipEngineSDK.Model.SortDir? sortDir, ShipEngineSDK.Model.ShipmentsSortBy? sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListShipments(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ShipmentStatus? shipmentStatus, string! batchId, string! tag, System.DateTime? createdAtStart, System.DateTime? createdAtEnd, System.DateTime? modifiedAtStart, System.DateTime? modifiedAtEnd, int? page, int? pageSize, string! salesOrderId, ShipEngineSDK.Model.SortDir? sortDir, ShipEngineSDK.Model.ShipmentsSortBy? sortBy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListTags(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListTags(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListTags(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListWarehouses(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListWarehouses(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ListWarehouses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ListWebhooks(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.ListWebhooks(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.ListWebhooks(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.IShipEngine.ParseAddress(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseAddressRequestBody! parseAddressRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ParseAddress(ShipEngineSDK.Model.ParseAddressRequestBody! parseAddressRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ParseAddress(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseAddressRequestBody! parseAddressRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ParseShipment(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseShipmentRequestBody! parseShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ParseShipment(ShipEngineSDK.Model.ParseShipmentRequestBody! parseShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ParseShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseShipmentRequestBody! parseShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ProcessBatch(ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.ProcessBatchRequestBody! processBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ProcessBatch(string! batchId, ShipEngineSDK.Model.ProcessBatchRequestBody! processBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ProcessBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.ProcessBatchRequestBody! processBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.RemoveFromBatch(ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.RemoveFromBatchRequestBody! removeFromBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.RemoveFromBatch(string! batchId, ShipEngineSDK.Model.RemoveFromBatchRequestBody! removeFromBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.RemoveFromBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.RemoveFromBatchRequestBody! removeFromBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.RenameTag(ShipEngineSDK.Config! methodConfig, string! tagName, string! newTagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.RenameTag(string! tagName, string! newTagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.RenameTag(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! tagName, string! newTagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.SchedulePickup(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.SchedulePickupRequestBody! schedulePickupRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.SchedulePickup(ShipEngineSDK.Model.SchedulePickupRequestBody! schedulePickupRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.SchedulePickup(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.SchedulePickupRequestBody! schedulePickupRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ServicePointsGetById(ShipEngineSDK.Config! methodConfig, string! carrierCode, string! countryCode, string! servicePointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ServicePointsGetById(string! carrierCode, string! countryCode, string! servicePointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ServicePointsGetById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode, string! countryCode, string! servicePointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ServicePointsList(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.GetServicePointsRequest! getServicePointsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ServicePointsList(ShipEngineSDK.Model.GetServicePointsRequest! getServicePointsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ServicePointsList(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.GetServicePointsRequest! getServicePointsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ShipmentsListTags(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ShipmentsListTags(string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ShipmentsListTags(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ShipmentsUpdateTags(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody! updateShipmentsTagsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ShipmentsUpdateTags(ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody! updateShipmentsTagsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.ShipmentsUpdateTags(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody! updateShipmentsTagsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.StartTracking(ShipEngineSDK.Config! methodConfig, string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.StartTracking(string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.StartTracking(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.StopTracking(ShipEngineSDK.Config! methodConfig, string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.StopTracking(string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.StopTracking(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode, string! trackingNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.TagShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.TagShipment(string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.TagShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.TokensGetEphemeralToken(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.Redirect? redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.TokensGetEphemeralToken(ShipEngineSDK.Model.Redirect? redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.TokensGetEphemeralToken(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.Redirect? redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UntagShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UntagShipment(string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UntagShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdateAccountSettingsImagesById(ShipEngineSDK.Config! methodConfig, string! labelImageId, ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody! updateAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateAccountSettingsImagesById(string! labelImageId, ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody! updateAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateAccountSettingsImagesById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelImageId, ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody! updateAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdateBatch(ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateBatch(string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdateCarrierSettings(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! updateCarrierSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateCarrierSettings(ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! updateCarrierSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateCarrierSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! updateCarrierSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdatePackageType(ShipEngineSDK.Config! methodConfig, string! packageId, ShipEngineSDK.Model.UpdatePackageTypeRequestBody! updatePackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdatePackageType(string! packageId, ShipEngineSDK.Model.UpdatePackageTypeRequestBody! updatePackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdatePackageType(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! packageId, ShipEngineSDK.Model.UpdatePackageTypeRequestBody! updatePackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdateShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.UpdateShipmentRequestBody! updateShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateShipment(string! shipmentId, ShipEngineSDK.Model.UpdateShipmentRequestBody! updateShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.UpdateShipmentRequestBody! updateShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdateWarehouse(ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseRequestBody! updateWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateWarehouse(string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseRequestBody! updateWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateWarehouse(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseRequestBody! updateWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdateWarehouseSettings(ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody! updateWarehouseSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateWarehouseSettings(string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody! updateWarehouseSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateWarehouseSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody! updateWarehouseSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.UpdateWebhook(ShipEngineSDK.Config! methodConfig, string! webhookId, ShipEngineSDK.Model.UpdateWebhookRequestBody! updateWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateWebhook(string! webhookId, ShipEngineSDK.Model.UpdateWebhookRequestBody! updateWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.UpdateWebhook(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! webhookId, ShipEngineSDK.Model.UpdateWebhookRequestBody! updateWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.IShipEngine.ValidateAddress(ShipEngineSDK.Config! methodConfig, System.Collections.Generic.List! addressToValidate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.ValidateAddress(System.Collections.Generic.List! addressToValidate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! ShipEngineSDK.IShipEngine.ValidateAddress(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Collections.Generic.List! addressToValidate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.IShipEngine.VoidLabel(ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.VoidLabel(string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.IShipEngine.VoidLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! ShipEngineSDK.Model.AbstractOpenAPISchema -ShipEngineSDK.Model.AbstractOpenAPISchema.AbstractOpenAPISchema() -> void +ShipEngineSDK.Model.AbstractOpenAPISchema.AbstractOpenAPISchema(string! schemaType) -> void ShipEngineSDK.Model.AbstractOpenAPISchema.IsNullable.get -> bool ShipEngineSDK.Model.AbstractOpenAPISchema.IsNullable.set -> void ShipEngineSDK.Model.AbstractOpenAPISchema.SchemaType.get -> string! @@ -5213,285 +5134,11 @@ ShipEngineSDK.RequestOptions.Operation.set -> void ShipEngineSDK.RequestOptions.PathParameters.get -> System.Collections.Generic.Dictionary! ShipEngineSDK.RequestOptions.QueryParameters.get -> ShipEngineSDK.Client.Multimap! ShipEngineSDK.RequestOptions.RequestOptions(string! path) -> void -ShipEngineSDK.ShipEngine.AddFundsToCarrier(ShipEngineSDK.Config! methodConfig, string! carrierId, ShipEngineSDK.Model.AddFundsToCarrierRequestBody! addFundsToCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddFundsToCarrier(string! carrierId, ShipEngineSDK.Model.AddFundsToCarrierRequestBody! addFundsToCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddFundsToCarrier(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, ShipEngineSDK.Model.AddFundsToCarrierRequestBody! addFundsToCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddFundsToInsurance(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.AddFundsToInsuranceRequestBody! addFundsToInsuranceRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddFundsToInsurance(ShipEngineSDK.Model.AddFundsToInsuranceRequestBody! addFundsToInsuranceRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddFundsToInsurance(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.AddFundsToInsuranceRequestBody! addFundsToInsuranceRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddToBatch(ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.AddToBatchRequestBody! addToBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddToBatch(string! batchId, ShipEngineSDK.Model.AddToBatchRequestBody! addToBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.AddToBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.AddToBatchRequestBody! addToBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CalculateRates(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CalculateRatesRequestBody! calculateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CalculateRates(ShipEngineSDK.Model.CalculateRatesRequestBody! calculateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CalculateRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CalculateRatesRequestBody! calculateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CancelShipments(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CancelShipments(string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CancelShipments(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CompareBulkRates(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CompareBulkRatesRequestBody! compareBulkRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.CompareBulkRates(ShipEngineSDK.Model.CompareBulkRatesRequestBody! compareBulkRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.CompareBulkRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CompareBulkRatesRequestBody! compareBulkRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.ConnectCarrier(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, ShipEngineSDK.Model.ConnectCarrierRequestBody! connectCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ConnectCarrier(ShipEngineSDK.Model.CarrierName! carrierName, ShipEngineSDK.Model.ConnectCarrierRequestBody! connectCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ConnectCarrier(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, ShipEngineSDK.Model.ConnectCarrierRequestBody! connectCarrierRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ConnectInsurer(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ConnectInsurerRequestBody! connectInsurerRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ConnectInsurer(ShipEngineSDK.Model.ConnectInsurerRequestBody! connectInsurerRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ConnectInsurer(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ConnectInsurerRequestBody! connectInsurerRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateAccountImage(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody! createAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateAccountImage(ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody! createAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateAccountImage(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody! createAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateBatch(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateBatchRequest! createBatchRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateBatch(ShipEngineSDK.Model.CreateBatchRequest! createBatchRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateBatchRequest! createBatchRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabel(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateLabelRequestBody! createLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabel(ShipEngineSDK.Model.CreateLabelRequestBody! createLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateLabelRequestBody! createLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabelFromRate(ShipEngineSDK.Config! methodConfig, string! rateId, ShipEngineSDK.Model.CreateLabelFromRateRequestBody! createLabelFromRateRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabelFromRate(string! rateId, ShipEngineSDK.Model.CreateLabelFromRateRequestBody! createLabelFromRateRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabelFromRate(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! rateId, ShipEngineSDK.Model.CreateLabelFromRateRequestBody! createLabelFromRateRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabelFromShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody! createLabelFromShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabelFromShipment(string! shipmentId, ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody! createLabelFromShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateLabelFromShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody! createLabelFromShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateManifest(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateManifestRequestBody! createManifestRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateManifest(ShipEngineSDK.Model.CreateManifestRequestBody! createManifestRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateManifest(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateManifestRequestBody! createManifestRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreatePackageType(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreatePackageTypeRequestBody! createPackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreatePackageType(ShipEngineSDK.Model.CreatePackageTypeRequestBody! createPackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreatePackageType(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreatePackageTypeRequestBody! createPackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateReturnLabel(ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.CreateReturnLabelRequestBody! createReturnLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateReturnLabel(string! labelId, ShipEngineSDK.Model.CreateReturnLabelRequestBody! createReturnLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateReturnLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.CreateReturnLabelRequestBody! createReturnLabelRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateShipments(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateShipmentsRequestBody! createShipmentsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateShipments(ShipEngineSDK.Model.CreateShipmentsRequestBody! createShipmentsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateShipments(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateShipmentsRequestBody! createShipmentsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateTag(ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateTag(string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateTag(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateWarehouse(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWarehouseRequestBody! createWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateWarehouse(ShipEngineSDK.Model.CreateWarehouseRequestBody! createWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateWarehouse(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWarehouseRequestBody! createWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateWebhook(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWebhookRequestBody! createWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateWebhook(ShipEngineSDK.Model.CreateWebhookRequestBody! createWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.CreateWebhook(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CreateWebhookRequestBody! createWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteAccountImageById(ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteAccountImageById(string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteAccountImageById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteBatch(ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteBatch(string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeletePackageType(ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeletePackageType(string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeletePackageType(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteScheduledPickup(ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteScheduledPickup(string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteScheduledPickup(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteTag(ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteTag(string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteTag(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteWarehouse(ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteWarehouse(string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteWarehouse(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteWebhook(ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteWebhook(string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DeleteWebhook(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectCarrier(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectCarrier(ShipEngineSDK.Model.CarrierName! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectCarrier(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierName! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectCarrierById(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectCarrierById(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectCarrierById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectInsurer(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectInsurer(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DisconnectInsurer(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DownloadFile(ShipEngineSDK.Config! methodConfig, string! subdir, string! filename, string! dir, string! download = null, int? rotation = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DownloadFile(string! subdir, string! filename, string! dir, string! download = null, int? rotation = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.DownloadFile(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! subdir, string! filename, string! dir, string! download = null, int? rotation = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.EstimateRates(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.EstimateRatesRequestBody! estimateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.EstimateRates(ShipEngineSDK.Model.EstimateRatesRequestBody! estimateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.EstimateRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.EstimateRatesRequestBody! estimateRatesRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.GetAccountSettingsImagesById(ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetAccountSettingsImagesById(string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetAccountSettingsImagesById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetBatchByExternalId(ShipEngineSDK.Config! methodConfig, string! externalBatchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetBatchByExternalId(string! externalBatchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetBatchByExternalId(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! externalBatchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetBatchById(ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetBatchById(string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetBatchById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierById(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierById(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierOptions(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierOptions(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierOptions(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierSettings(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierSettings(ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetCarrierSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetInsuranceBalance(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetInsuranceBalance(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetInsuranceBalance(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetLabelByExternalShipmentId(ShipEngineSDK.Config! methodConfig, string! externalShipmentId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetLabelByExternalShipmentId(string! externalShipmentId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetLabelByExternalShipmentId(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! externalShipmentId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetLabelById(ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetLabelById(string! labelId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetLabelById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, ShipEngineSDK.Model.LabelDownloadType? labelDownloadType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetManifestById(ShipEngineSDK.Config! methodConfig, string! manifestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetManifestById(string! manifestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetManifestById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! manifestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetManifestRequestById(ShipEngineSDK.Config! methodConfig, string! manifestRequestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetManifestRequestById(string! manifestRequestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetManifestRequestById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! manifestRequestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetPackageTypeById(ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetPackageTypeById(string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetPackageTypeById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! packageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetPickupById(ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetPickupById(string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetPickupById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! pickupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetRateById(ShipEngineSDK.Config! methodConfig, string! rateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetRateById(string! rateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetRateById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! rateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetShipmentByExternalId(ShipEngineSDK.Config! methodConfig, string! externalShipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetShipmentByExternalId(string! externalShipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetShipmentByExternalId(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! externalShipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetShipmentById(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetShipmentById(string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetShipmentById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetTrackingLog(ShipEngineSDK.Config! methodConfig, string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetTrackingLog(string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetTrackingLog(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetTrackingLogFromLabel(ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetTrackingLogFromLabel(string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetTrackingLogFromLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetWarehouseById(ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetWarehouseById(string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetWarehouseById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetWebhookById(ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetWebhookById(string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.GetWebhookById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! webhookId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListAccountImages(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListAccountImages(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListAccountImages(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListAccountSettings(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListAccountSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListAccountSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListBatchErrors(ShipEngineSDK.Config! methodConfig, string! batchId, int? page = null, int? pagesize = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListBatchErrors(string! batchId, int? page = null, int? pagesize = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListBatchErrors(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, int? page = null, int? pagesize = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListBatches(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.BatchStatus? status = null, int? page = null, int? pageSize = null, ShipEngineSDK.Model.SortDir? sortDir = null, string! batchNumber = null, ShipEngineSDK.Model.BatchesSortBy? sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListBatches(ShipEngineSDK.Model.BatchStatus? status = null, int? page = null, int? pageSize = null, ShipEngineSDK.Model.SortDir? sortDir = null, string! batchNumber = null, ShipEngineSDK.Model.BatchesSortBy? sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListBatches(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.BatchStatus? status = null, int? page = null, int? pageSize = null, ShipEngineSDK.Model.SortDir? sortDir = null, string! batchNumber = null, ShipEngineSDK.Model.BatchesSortBy? sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarrierPackageTypes(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarrierPackageTypes(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarrierPackageTypes(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarriers(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarriers(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarriers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarrierServices(ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarrierServices(string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListCarrierServices(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListLabels(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.LabelStatus? labelStatus = null, string! serviceCode = null, string! carrierId = null, string! trackingNumber = null, string! batchId = null, string! rateId = null, string! shipmentId = null, string! warehouseId = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, int? page = null, int? pageSize = null, ShipEngineSDK.Model.SortDir? sortDir = null, string! sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListLabels(ShipEngineSDK.Model.LabelStatus? labelStatus = null, string! serviceCode = null, string! carrierId = null, string! trackingNumber = null, string! batchId = null, string! rateId = null, string! shipmentId = null, string! warehouseId = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, int? page = null, int? pageSize = null, ShipEngineSDK.Model.SortDir? sortDir = null, string! sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListLabels(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.LabelStatus? labelStatus = null, string! serviceCode = null, string! carrierId = null, string! trackingNumber = null, string! batchId = null, string! rateId = null, string! shipmentId = null, string! warehouseId = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, int? page = null, int? pageSize = null, ShipEngineSDK.Model.SortDir? sortDir = null, string! sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListManifests(ShipEngineSDK.Config! methodConfig, string! warehouseId = null, System.DateTime? shipDateStart = null, System.DateTime? shipDateEnd = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, string! carrierId = null, int? page = null, int? pageSize = null, System.Collections.Generic.List! labelIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListManifests(string! warehouseId = null, System.DateTime? shipDateStart = null, System.DateTime? shipDateEnd = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, string! carrierId = null, int? page = null, int? pageSize = null, System.Collections.Generic.List! labelIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListManifests(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId = null, System.DateTime? shipDateStart = null, System.DateTime? shipDateEnd = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, string! carrierId = null, int? page = null, int? pageSize = null, System.Collections.Generic.List! labelIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListPackageTypes(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListPackageTypes(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListPackageTypes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListScheduledPickups(ShipEngineSDK.Config! methodConfig, string! carrierId = null, string! warehouseId = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, int? page = null, int? pageSize = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListScheduledPickups(string! carrierId = null, string! warehouseId = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, int? page = null, int? pageSize = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListScheduledPickups(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierId = null, string! warehouseId = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, int? page = null, int? pageSize = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListShipmentRates(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.DateTime? createdAtStart = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListShipmentRates(string! shipmentId, System.DateTime? createdAtStart = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListShipmentRates(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.DateTime? createdAtStart = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListShipments(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ShipmentStatus? shipmentStatus = null, string! batchId = null, string! tag = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, System.DateTime? modifiedAtStart = null, System.DateTime? modifiedAtEnd = null, int? page = null, int? pageSize = null, string! salesOrderId = null, ShipEngineSDK.Model.SortDir? sortDir = null, ShipEngineSDK.Model.ShipmentsSortBy? sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListShipments(ShipEngineSDK.Model.ShipmentStatus? shipmentStatus = null, string! batchId = null, string! tag = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, System.DateTime? modifiedAtStart = null, System.DateTime? modifiedAtEnd = null, int? page = null, int? pageSize = null, string! salesOrderId = null, ShipEngineSDK.Model.SortDir? sortDir = null, ShipEngineSDK.Model.ShipmentsSortBy? sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListShipments(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ShipmentStatus? shipmentStatus = null, string! batchId = null, string! tag = null, System.DateTime? createdAtStart = null, System.DateTime? createdAtEnd = null, System.DateTime? modifiedAtStart = null, System.DateTime? modifiedAtEnd = null, int? page = null, int? pageSize = null, string! salesOrderId = null, ShipEngineSDK.Model.SortDir? sortDir = null, ShipEngineSDK.Model.ShipmentsSortBy? sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListTags(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListTags(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListTags(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListWarehouses(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListWarehouses(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListWarehouses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ListWebhooks(ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.ListWebhooks(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.ListWebhooks(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.ParseAddress(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseAddressRequestBody! parseAddressRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ParseAddress(ShipEngineSDK.Model.ParseAddressRequestBody! parseAddressRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ParseAddress(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseAddressRequestBody! parseAddressRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ParseShipment(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseShipmentRequestBody! parseShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ParseShipment(ShipEngineSDK.Model.ParseShipmentRequestBody! parseShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ParseShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.ParseShipmentRequestBody! parseShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ProcessBatch(ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.ProcessBatchRequestBody! processBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ProcessBatch(string! batchId, ShipEngineSDK.Model.ProcessBatchRequestBody! processBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ProcessBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.ProcessBatchRequestBody! processBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.RemoveFromBatch(ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.RemoveFromBatchRequestBody! removeFromBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.RemoveFromBatch(string! batchId, ShipEngineSDK.Model.RemoveFromBatchRequestBody! removeFromBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.RemoveFromBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, ShipEngineSDK.Model.RemoveFromBatchRequestBody! removeFromBatchRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.RenameTag(ShipEngineSDK.Config! methodConfig, string! tagName, string! newTagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.RenameTag(string! tagName, string! newTagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.RenameTag(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! tagName, string! newTagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.SchedulePickup(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.SchedulePickupRequestBody! schedulePickupRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.SchedulePickup(ShipEngineSDK.Model.SchedulePickupRequestBody! schedulePickupRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.SchedulePickup(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.SchedulePickupRequestBody! schedulePickupRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ServicePointsGetById(ShipEngineSDK.Config! methodConfig, string! carrierCode, string! countryCode, string! servicePointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ServicePointsGetById(string! carrierCode, string! countryCode, string! servicePointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ServicePointsGetById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode, string! countryCode, string! servicePointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ServicePointsList(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.GetServicePointsRequest! getServicePointsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ServicePointsList(ShipEngineSDK.Model.GetServicePointsRequest! getServicePointsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ServicePointsList(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.GetServicePointsRequest! getServicePointsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ShipmentsListTags(ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ShipmentsListTags(string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ShipmentsListTags(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ShipmentsUpdateTags(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody! updateShipmentsTagsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ShipmentsUpdateTags(ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody! updateShipmentsTagsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ShipmentsUpdateTags(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody! updateShipmentsTagsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.StartTracking(ShipEngineSDK.Config! methodConfig, string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.StartTracking(string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.StartTracking(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.StopTracking(ShipEngineSDK.Config! methodConfig, string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.StopTracking(string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.StopTracking(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! carrierCode = null, string! trackingNumber = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.TagShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.TagShipment(string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.TagShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.TokensGetEphemeralToken(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.Redirect? redirect = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.TokensGetEphemeralToken(ShipEngineSDK.Model.Redirect? redirect = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.TokensGetEphemeralToken(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.Redirect? redirect = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UntagShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UntagShipment(string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UntagShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, string! tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateAccountSettingsImagesById(ShipEngineSDK.Config! methodConfig, string! labelImageId, ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody! updateAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateAccountSettingsImagesById(string! labelImageId, ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody! updateAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateAccountSettingsImagesById(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelImageId, ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody! updateAccountSettingsImageRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateBatch(ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateBatch(string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateBatch(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateCarrierSettings(ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! updateCarrierSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateCarrierSettings(ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! updateCarrierSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateCarrierSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, ShipEngineSDK.Model.CarrierNameWithSettings! carrierName, string! carrierId, ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! updateCarrierSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdatePackageType(ShipEngineSDK.Config! methodConfig, string! packageId, ShipEngineSDK.Model.UpdatePackageTypeRequestBody! updatePackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdatePackageType(string! packageId, ShipEngineSDK.Model.UpdatePackageTypeRequestBody! updatePackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdatePackageType(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! packageId, ShipEngineSDK.Model.UpdatePackageTypeRequestBody! updatePackageTypeRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateShipment(ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.UpdateShipmentRequestBody! updateShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateShipment(string! shipmentId, ShipEngineSDK.Model.UpdateShipmentRequestBody! updateShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateShipment(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! shipmentId, ShipEngineSDK.Model.UpdateShipmentRequestBody! updateShipmentRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWarehouse(ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseRequestBody! updateWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWarehouse(string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseRequestBody! updateWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWarehouse(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseRequestBody! updateWarehouseRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWarehouseSettings(ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody! updateWarehouseSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWarehouseSettings(string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody! updateWarehouseSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWarehouseSettings(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! warehouseId, ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody! updateWarehouseSettingsRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWebhook(ShipEngineSDK.Config! methodConfig, string! webhookId, ShipEngineSDK.Model.UpdateWebhookRequestBody! updateWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWebhook(string! webhookId, ShipEngineSDK.Model.UpdateWebhookRequestBody! updateWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.UpdateWebhook(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! webhookId, ShipEngineSDK.Model.UpdateWebhookRequestBody! updateWebhookRequestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.ValidateAddress(ShipEngineSDK.Config! methodConfig, System.Collections.Generic.List! addressToValidate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.ValidateAddress(System.Collections.Generic.List! addressToValidate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.ValidateAddress(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, System.Collections.Generic.List! addressToValidate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!>! -ShipEngineSDK.ShipEngine.VoidLabel(ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.VoidLabel(string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! -ShipEngineSDK.ShipEngine.VoidLabel(System.Net.Http.HttpClient! methodClient, ShipEngineSDK.Config! methodConfig, string! labelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +ShipEngineSDK.ShipEngine.ModifyRequest(System.Action! modifyRequest) -> ShipEngineSDK.ShipEngine! +ShipEngineSDK.ShipEngine.ShipEngine(ShipEngineSDK.Config! config, System.Net.Http.HttpClient! httpClient) -> void +ShipEngineSDK.ShipEngine.WithRequestModifier(System.Action! modifier) -> ShipEngineSDK.ShipEngine! +ShipEngineSDK.ShipEngineClient.requestModifiers -> System.Collections.Generic.IEnumerable!>! +ShipEngineSDK.ShipEngineClient.ShipEngineClient(System.Collections.Generic.IEnumerable!>! requestModifiers) -> void ShipEngineSDK.ShipEngineException.ErrorCode.get -> ShipEngineSDK.Enums.ErrorCode ShipEngineSDK.ShipEngineException.ErrorSource.get -> ShipEngineSDK.Enums.ErrorSource ShipEngineSDK.ShipEngineException.ErrorType.get -> ShipEngineSDK.Enums.ErrorType @@ -5924,6 +5571,11 @@ static ShipEngineSDK.Model.WeightUnit.Gram.get -> ShipEngineSDK.Model.WeightUnit static ShipEngineSDK.Model.WeightUnit.Kilogram.get -> ShipEngineSDK.Model.WeightUnit! static ShipEngineSDK.Model.WeightUnit.Ounce.get -> ShipEngineSDK.Model.WeightUnit! static ShipEngineSDK.Model.WeightUnit.Pound.get -> ShipEngineSDK.Model.WeightUnit! +System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute +System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.CompilerFeatureRequiredAttribute(string! featureName) -> void +System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName.get -> string! +System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.IsOptional.get -> bool +System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.IsOptional.init -> void virtual ShipEngineSDK.Model.AccountSettings.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! virtual ShipEngineSDK.Model.AccountSettingsImages.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! virtual ShipEngineSDK.Model.AddFundsToCarrierRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! diff --git a/ShipEngineSDK/RequestOptions.cs b/ShipEngineSDK/RequestOptions.cs index d1cb8d50..60e47eb1 100644 --- a/ShipEngineSDK/RequestOptions.cs +++ b/ShipEngineSDK/RequestOptions.cs @@ -59,12 +59,12 @@ public class RequestOptions(string path) /// /// Operation associated with the request path. /// - internal string Operation { get; set; } + internal string? Operation { get; set; } /// /// Any data associated with a request body. /// - internal string Data { get; set; } + internal string? Data { get; set; } internal string FullPath() { diff --git a/ShipEngineSDK/ShipEngine.cs b/ShipEngineSDK/ShipEngine.cs index a5ef41e3..281ebd1a 100644 --- a/ShipEngineSDK/ShipEngine.cs +++ b/ShipEngineSDK/ShipEngine.cs @@ -23,6 +23,7 @@ public partial interface IShipEngine /// /// The address to validate. This can even be an incomplete or improperly formatted address /// An address validation result object + [Obsolete("This method is deprecated. Please use ValidateAddress(List addressToValidate) instead", false)] Task> ValidateAddresses(List
addresses); /// @@ -31,12 +32,14 @@ public partial interface IShipEngine /// The address to validate. This can even be an incomplete or improperly formatted address /// Configuration object that overrides the global config for this method call /// An address validation result object + [Obsolete("This method is deprecated. Please use ValidateAddress(HttpClient methodClient, List addressToValidate) instead", false)] Task> ValidateAddresses(List
addresses, Config methodConfig); /// /// Retrieve a list of all carriers that have been added to this account /// /// A list of carriers + [Obsolete("This method is deprecated. Please use ListCarriers(CancellationToken cancellationToken) instead", false)] Task ListCarriers(); /// @@ -44,6 +47,7 @@ public partial interface IShipEngine /// /// Configuration object that overrides the global config for this method call. /// A list of carriers + [Obsolete("This method is deprecated. Please use ListCarriers(HttpClient methodClient, CancellationToken cancellationToken) instead", false)] Task ListCarriers(Config methodConfig); /// @@ -51,6 +55,7 @@ public partial interface IShipEngine /// /// The details of the manifest you want to create. /// + [Obsolete("This method is deprecated. Please use CreateManifest(CreateManifestRequestBody createManifestRequestBody instead", false)] Task CreateManifest(Manifests.Params manifestParams); /// @@ -59,6 +64,7 @@ public partial interface IShipEngine /// Configuration object that overrides the global config for this method call. /// The details of the manifest you want to create. /// + [Obsolete("This method is deprecated. Please use CreateManifest(HttpClient methodClient, CreateManifestRequestBody createManifestRequestBody) instead", false)] Task CreateManifest(Config methodConfig, Manifests.Params manifestParams); /// @@ -66,6 +72,7 @@ public partial interface IShipEngine /// /// The id of the label to void /// Result object indicating the success of the void label attempt + [Obsolete("This method is deprecated. Please use VoidLabel(string labelId) instead", false)] Task VoidLabelWithLabelId(string labelId); /// @@ -74,6 +81,7 @@ public partial interface IShipEngine /// The id of the label to void /// Configuration object that overrides the global config for this method call /// Result object indicating the success of the void label attempt + [Obsolete("This method is deprecated. Please use VoidLabel(HttpClient methodClient, string labelId) instead", false)] Task VoidLabelWithLabelId(string labelId, Config methodConfig); /// @@ -81,6 +89,7 @@ public partial interface IShipEngine /// /// The label id associated with the shipment /// An object that contains the label id tracking information + [Obsolete("This method is deprecated. Please use GetTrackingLogFromLabel(string labelId) instead", false)] Task TrackUsingLabelId(string labelId); /// @@ -89,6 +98,7 @@ public partial interface IShipEngine /// The label id associated with the shipment /// Configuration object that overrides the global config for this method call /// An object that contains the label id tracking information + [Obsolete("This method is deprecated. Please use GetTrackingLogFromLabel(HttpClient methodClient, string labelId) instead", false)] Task TrackUsingLabelId(string labelId, Config methodConfig); /// @@ -97,6 +107,7 @@ public partial interface IShipEngine /// The tracking number of the package you wish to track. /// The carrierCode for the trackingNumber you are using to track the package. /// + [Obsolete("This method is deprecated. Please use GetTrackingLog(string? carrierCode, string? trackingNumber) instead", false)] Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode); /// @@ -106,6 +117,7 @@ public partial interface IShipEngine /// The carrierCode for the trackingNumber you are using to track the package. /// Configuration object that overrides the global config for this method call /// + [Obsolete("This method is deprecated. Please use GetTrackingLog(HttpClient methodClient, string? carrierCode, string? trackingNumber) instead", false)] Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode, Config methodConfig); /// @@ -113,6 +125,7 @@ public partial interface IShipEngine /// /// Details of the label that you want to create /// Object containing the created label information + [Obsolete("This method is deprecated. Please use CreateLabel(CreateLabelRequestBody createLabelRequestBody) instead", false)] Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams); /// @@ -121,6 +134,7 @@ public partial interface IShipEngine /// Details of the label that you want to create /// Configuration object that overrides the global config for this method call /// Object containing the created label information + [Obsolete("This method is deprecated. Please use CreateLabel(HttpClient methodClient, CreateLabelRequestBody createLabelRequestBody) instead", false)] Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams, Config methodConfig); /// @@ -128,6 +142,7 @@ public partial interface IShipEngine /// /// The details of the rate that you want to use to purchase a label /// Object containing the created label information + [Obsolete("This method is deprecated. Please use CreateLabelFromRate(CreateLabelFromRateRequestBody createLabelFromRateRequestBody) instead", false)] Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams); /// @@ -136,6 +151,7 @@ public partial interface IShipEngine /// The details of the rate that you want to use to purchase a label /// Configuration object that overrides the global config for this method call /// Object containing the created label information + [Obsolete("This method is deprecated. Please use CreateLabelFromRate(HttpClient methodClient, CreateLabelFromRateRequestBody createLabelFromRateRequestBody) instead", false)] Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams, Config methodConfig); /// @@ -143,6 +159,7 @@ public partial interface IShipEngine /// /// /// The rates result + [Obsolete("This method is deprecated. Please use CalculateRates(CalculateRatesRequestBody calculateRatesRequestBody) instead", false)] Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams); /// @@ -151,6 +168,7 @@ public partial interface IShipEngine /// /// Configuration object that overrides the global config for this method call /// The rates result + [Obsolete("This method is deprecated. Please use CalculateRates(HttpClient methodClient, CalculateRatesRequestBody calculateRatesRequestBody) instead", false)] Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams, Config methodConfig); } @@ -188,12 +206,12 @@ public partial class ShipEngine : ShipEngineClient, IDisposable, IShipEngine /// /// Global HttpClient for ShipEngine instance. /// - public HttpClient _client; + internal readonly HttpClient _client; /// /// Global config for ShipEngine instance. /// - public Config _config; + internal readonly Config _config; /// /// Initialize the ShipEngine SDK with an API Key @@ -218,9 +236,11 @@ public ShipEngine(Config config) : base() /// /// Initialize the ShipEngine SDK with an httpClient object /// + /// Config object containing custom configurations /// HttpClient object to be used for ShipEngine API calls. We expect the httpClient has already been configured with ConfigureHttpClient - public ShipEngine(HttpClient httpClient) : base() + public ShipEngine(Config config, HttpClient httpClient) : base() { + _config = config; _client = httpClient; } @@ -274,7 +294,7 @@ public void Dispose() /// /// The address to validate. This can even be an incomplete or improperly formatted address /// An address validation result object - + [Obsolete("This method is deprecated. Please use ValidateAddress(List addressToValidate) instead", false)] public async Task> ValidateAddresses(List
addresses) { @@ -293,7 +313,7 @@ public void Dispose() /// The address to validate. This can even be an incomplete or improperly formatted address /// Configuration object that overrides the global config for this method call. /// An address validation result object - + [Obsolete("This method is deprecated. Please use ValidateAddress(HttpClient methodClient, List addressToValidate) instead", false)] public async Task> ValidateAddresses(List
addresses, Config methodConfig) { @@ -314,7 +334,7 @@ public void Dispose() /// Retrieve a list of all carriers that have been added to this account ///
/// A list of carriers - + [Obsolete("This method is deprecated. Please use ListCarriers(CancellationToken cancellationToken) instead", false)] public async Task ListCarriers() { var path = "v1/carriers"; @@ -329,7 +349,7 @@ public void Dispose() ///
/// Configuration object that overrides the global config for this method call. /// A list of carriers - + [Obsolete("This method is deprecated. Please use ListCarriers(HttpClient methodClient) instead", false)] public async Task ListCarriers(Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -349,7 +369,7 @@ public void Dispose() ///
/// The details of the manifest you want to create. /// - + [Obsolete("This method is deprecated. Please use CreateManifest(CreateManifestRequestBody createManifestRequestBody) instead", false)] public async Task CreateManifest(Manifests.Params manifestParams) { var path = "v1/manifests"; @@ -367,7 +387,7 @@ public void Dispose() /// Configuration object that overrides the global config for this method call. /// The details of the manifest you want to create. /// - + [Obsolete("This method is deprecated. Please use CreateManifest(HttpClient methodClient, CreateManifestRequestBody createManifestRequestBody) instead", false)] public async Task CreateManifest(Config methodConfig, Manifests.Params manifestParams) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -386,7 +406,7 @@ public void Dispose() ///
/// The id of the label to void /// Result object indicating the success of the void label attempt - + [Obsolete("This method is deprecated. Please use VoidLabel(string labelId) instead", false)] public async Task VoidLabelWithLabelId(string labelId) { var path = $"v1/labels/{labelId}/void"; @@ -402,7 +422,7 @@ public void Dispose() /// The id of the label to void /// Configuration object that overrides the global config for this method call /// Result object indicating the success of the void label attempt - + [Obsolete("This method is deprecated. Please use VoidLabel(string labelId) instead", false)] public async Task VoidLabelWithLabelId(string labelId, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -421,7 +441,7 @@ public void Dispose() ///
/// The label id associated with the shipment /// An object that contains the label id tracking information - + [Obsolete("This method is deprecated. Please use GetTrackingLogFromLabel(string labelId) instead", false)] public async Task TrackUsingLabelId(string labelId) { var path = $"/v1/labels/{labelId}/track"; @@ -437,7 +457,7 @@ public void Dispose() /// The label id associated with the shipment /// Configuration object that overrides the global config for this method call /// An object that contains the label id tracking information - + [Obsolete("This method is deprecated. Please use GetTrackingLogFromLabel(HttpClient methodClient, string labelId) instead", false)] public async Task TrackUsingLabelId(string labelId, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -457,7 +477,7 @@ public void Dispose() /// The tracking number of the package you wish to track. /// The carrierCode for the trackingNumber you are using to track the package. /// - + [Obsolete("This method is deprecated. Please use GetTrackingLog(string? carrierCode, string? trackingNumber) instead", false)] public async Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode) { var path = $"/v1/tracking?tracking_number={trackingNumber}&carrier_code={carrierCode}"; @@ -474,7 +494,7 @@ public void Dispose() /// The carrierCode for the trackingNumber you are using to track the package. /// Configuration object that overrides the global config for this method call /// - + [Obsolete("This method is deprecated. Please use GetTrackingLog(HttpClient methodClient, string? carrierCode, string? trackingNumber) instead", false)] public async Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -493,7 +513,7 @@ public void Dispose() ///
/// Details of the label that you want to create /// Object containing the created label information - + [Obsolete("This method is deprecated. Please use CreateLabel(CreateLabelRequestBody createLabelRequestBody) instead", false)] public async Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams) { @@ -512,7 +532,7 @@ public void Dispose() /// Details of the label that you want to create /// Configuration object that overrides the global config for this method call /// Object containing the created label information - + [Obsolete("This method is deprecated. Please use CreateLabel(HttpClient methodClient, CreateLabelRequestBody createLabelRequestBody) instead", false)] public async Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams, Config methodConfig) { @@ -534,7 +554,7 @@ public void Dispose() ///
/// The details of the rate that you want to use to purchase a label /// Object containing the created label information - + [Obsolete("This method is deprecated. Please use CreateLabelFromRate(CreateLabelFromRateRequestBody createLabelFromRateRequestBody) instead", false)] public async Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams) { var path = $"/v1/labels/rates/{createLabelFromRateParams.RateId}"; @@ -552,7 +572,7 @@ public void Dispose() /// The details of the rate that you want to use to purchase a label /// Configuration object that overrides the global config for this method call /// Object containing the created label information - + [Obsolete("This method is deprecated. Please use CreateLabelFromRate(HttpClient methodClient, CreateLabelFromRateRequestBody createLabelFromRateRequestBody) instead", false)] public async Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams, Config methodConfig) { @@ -574,7 +594,7 @@ public void Dispose() ///
/// /// The rates result - + [Obsolete("This method is deprecated. Please use CalculateRates(CalculateRatesRequestBody calculateRatesRequestBody) instead", false)] public async Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams) { var path = "/v1/rates"; @@ -592,7 +612,7 @@ public void Dispose() /// /// Configuration object that overrides the global config for this method call /// The rates result - + [Obsolete("This method is deprecated. Please use CalculateRates(HttpClient methodClient, CalculateRatesRequestBody calculateRatesRequestBody) instead", false)] public async Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); diff --git a/ShipEngineSDK/ShipEngineClient.cs b/ShipEngineSDK/ShipEngineClient.cs index 5ab37618..ee3543d1 100644 --- a/ShipEngineSDK/ShipEngineClient.cs +++ b/ShipEngineSDK/ShipEngineClient.cs @@ -7,13 +7,12 @@ using System.Net.Http.Headers; using System.Text.Json; using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; using System.Threading; using System.Threading.Tasks; namespace ShipEngineSDK { - using HttpMethod = System.Net.Http.HttpMethod; - /// /// ShipEngine Client is used for handling generic calls and settings that /// are needed for all ShipEngine API calls. @@ -38,13 +37,40 @@ protected ShipEngineClient(IEnumerable> requestModifi /// Options for serializing the method call params to JSON. /// A separate inline setting is used for deserializing the response /// - protected static readonly JsonSerializerOptions JsonSerializerOptions = new JsonSerializerOptions + internal static readonly JsonSerializerOptions JsonSerializerOptions = new() { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, + IgnoreReadOnlyProperties = true, PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, PropertyNameCaseInsensitive = true, WriteIndented = true, - Converters = { new JsonStringEnumMemberConverter() } + Converters = { new JsonStringEnumMemberConverter() }, + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + static typeInfo => + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (JsonPropertyInfo propertyInfo in typeInfo.Properties) + { + // Don't require any properties when deserializing since we should not break consumers + // if the API changes slightly without consumers updating + propertyInfo.IsRequired = false; + + // If a property is marked as writeOnly, we should not try deserializing it + var writeOnly = propertyInfo.AttributeProvider? + .GetCustomAttributes(typeof(JsonWriteOnlyAttribute), false).Any() ?? false; + if (writeOnly) + { + propertyInfo.Set = (o, o1) => { }; + } + } + } + } + } }; private static readonly string? OsPlatform = Environment.OSVersion.Platform.ToString(); diff --git a/ShipEngineSDK/ShipEngineSDK.csproj b/ShipEngineSDK/ShipEngineSDK.csproj index 81406dec..bd9a837b 100644 --- a/ShipEngineSDK/ShipEngineSDK.csproj +++ b/ShipEngineSDK/ShipEngineSDK.csproj @@ -4,7 +4,7 @@ ShipEngine sdk;rest;api;shipping;rates;label;tracking;cost;address;validation;normalization;fedex;ups;usps; - 2.3.6 + 3.0.0 ShipEngine ShipEngine The official ShipEngine C# SDK for .NET @@ -32,7 +32,7 @@ - + diff --git a/docs/apis/AccountApi.md b/docs/apis/AccountApi.md new file mode 100644 index 00000000..5cecd504 --- /dev/null +++ b/docs/apis/AccountApi.md @@ -0,0 +1,345 @@ +# Account Methods + +| Method | Description | +|--------|-------------| +| [**CreateAccountImage**](AccountApi.md#createaccountimage) | Create an Account Image | +| [**DeleteAccountImageById**](AccountApi.md#deleteaccountimagebyid) | Delete Account Image By Id | +| [**GetAccountSettingsImagesById**](AccountApi.md#getaccountsettingsimagesbyid) | Get Account Image By ID | +| [**ListAccountImages**](AccountApi.md#listaccountimages) | List Account Images | +| [**ListAccountSettings**](AccountApi.md#listaccountsettings) | List Account Settings | +| [**UpdateAccountSettingsImagesById**](AccountApi.md#updateaccountsettingsimagesbyid) | Update Account Image By ID | + + +# **CreateAccountImage** +```csharp +GetAccountSettingsImagesResponseBody CreateAccountImage (CreateAccountSettingsImageRequestBody createAccountSettingsImageRequestBody, CancellationToken cancellationToken = default) + +GetAccountSettingsImagesResponseBody CreateAccountImage (HttpClient methodClient, CreateAccountSettingsImageRequestBody createAccountSettingsImageRequestBody, CancellationToken cancellationToken = default) +``` + +Create an Account Image + +Create an Account Image + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateAccountImageExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createAccountSettingsImageRequestBody = new CreateAccountSettingsImageRequestBody(); + + try + { + // Create an Account Image + GetAccountSettingsImagesResponseBody result = await shipEngine.CreateAccountImage(createAccountSettingsImageRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AccountApi.CreateAccountImage: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createAccountSettingsImageRequestBody** | [**CreateAccountSettingsImageRequestBody**](../../docs//models/CreateAccountSettingsImageRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetAccountSettingsImagesResponseBody**](../models/GetAccountSettingsImagesResponseBody.md) + + +# **DeleteAccountImageById** +```csharp +string DeleteAccountImageById (string labelImageId, CancellationToken cancellationToken = default) + +string DeleteAccountImageById (HttpClient methodClient, string labelImageId, CancellationToken cancellationToken = default) +``` + +Delete Account Image By Id + +Delete Account Image By Id + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DeleteAccountImageByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var labelImageId = "labelImageId_example"; + + try + { + // Delete Account Image By Id + string result = await shipEngine.DeleteAccountImageById(labelImageId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AccountApi.DeleteAccountImageById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **labelImageId** | **string** | Label Image Id | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **GetAccountSettingsImagesById** +```csharp +GetAccountSettingsImagesResponseBody GetAccountSettingsImagesById (string labelImageId, CancellationToken cancellationToken = default) + +GetAccountSettingsImagesResponseBody GetAccountSettingsImagesById (HttpClient methodClient, string labelImageId, CancellationToken cancellationToken = default) +``` + +Get Account Image By ID + +Retrieve information for an account image. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetAccountSettingsImagesByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var labelImageId = "labelImageId_example"; + + try + { + // Get Account Image By ID + GetAccountSettingsImagesResponseBody result = await shipEngine.GetAccountSettingsImagesById(labelImageId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AccountApi.GetAccountSettingsImagesById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **labelImageId** | **string** | Label Image Id | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetAccountSettingsImagesResponseBody**](../models/GetAccountSettingsImagesResponseBody.md) + + +# **ListAccountImages** +```csharp +ListAccountSettingsImagesResponseBody ListAccountImages (CancellationToken cancellationToken = default) + +ListAccountSettingsImagesResponseBody ListAccountImages (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +List Account Images + +List all account images for the ShipEngine account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListAccountImagesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // List Account Images + ListAccountSettingsImagesResponseBody result = await shipEngine.ListAccountImages(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AccountApi.ListAccountImages: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListAccountSettingsImagesResponseBody**](../models/ListAccountSettingsImagesResponseBody.md) + + +# **ListAccountSettings** +```csharp +GetAccountSettingsResponseBody ListAccountSettings (CancellationToken cancellationToken = default) + +GetAccountSettingsResponseBody ListAccountSettings (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +List Account Settings + +List all account settings for the ShipEngine account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListAccountSettingsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // List Account Settings + GetAccountSettingsResponseBody result = await shipEngine.ListAccountSettings(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AccountApi.ListAccountSettings: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetAccountSettingsResponseBody**](../models/GetAccountSettingsResponseBody.md) + + +# **UpdateAccountSettingsImagesById** +```csharp +string UpdateAccountSettingsImagesById (UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, string labelImageId, CancellationToken cancellationToken = default) + +string UpdateAccountSettingsImagesById (HttpClient methodClient, UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, string labelImageId, CancellationToken cancellationToken = default) +``` + +Update Account Image By ID + +Update information for an account image. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdateAccountSettingsImagesByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var updateAccountSettingsImageRequestBody = new UpdateAccountSettingsImageRequestBody(); + var labelImageId = "labelImageId_example"; + + try + { + // Update Account Image By ID + string result = await shipEngine.UpdateAccountSettingsImagesById(updateAccountSettingsImageRequestBody, labelImageId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AccountApi.UpdateAccountSettingsImagesById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **updateAccountSettingsImageRequestBody** | [**UpdateAccountSettingsImageRequestBody**](../../docs//models/UpdateAccountSettingsImageRequestBody.md) | | | +| **labelImageId** | **string** | Label Image Id | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/apis/AddressesApi.md b/docs/apis/AddressesApi.md new file mode 100644 index 00000000..0a176066 --- /dev/null +++ b/docs/apis/AddressesApi.md @@ -0,0 +1,119 @@ +# Addresses Methods + +| Method | Description | +|--------|-------------| +| [**ParseAddress**](AddressesApi.md#parseaddress) | Parse an address | +| [**ValidateAddress**](AddressesApi.md#validateaddress) | Validate An Address | + + +# **ParseAddress** +```csharp +ParseAddressResponseBody ParseAddress (ParseAddressRequestBody parseAddressRequestBody, CancellationToken cancellationToken = default) + +ParseAddressResponseBody ParseAddress (HttpClient methodClient, 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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ParseAddressExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var parseAddressRequestBody = new ParseAddressRequestBody(); + + try + { + // Parse an address + ParseAddressResponseBody result = await shipEngine.ParseAddress(parseAddressRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AddressesApi.ParseAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **parseAddressRequestBody** | [**ParseAddressRequestBody**](../../docs//models/ParseAddressRequestBody.md) | 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. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ParseAddressResponseBody**](../models/ParseAddressResponseBody.md) + + +# **ValidateAddress** +```csharp +List<AddressValidationResult> ValidateAddress (List addressToValidate, CancellationToken cancellationToken = default) + +List<AddressValidationResult> ValidateAddress (HttpClient methodClient, 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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ValidateAddressExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var addressToValidate = new List(); + + try + { + // Validate An Address + List result = await shipEngine.ValidateAddress(addressToValidate); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling AddressesApi.ValidateAddress: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **addressToValidate** | [**List<AddressToValidate>**](../../docs//models/AddressToValidate.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**List<AddressValidationResult>**](../models/AddressValidationResult.md) + diff --git a/docs/apis/BatchesApi.md b/docs/apis/BatchesApi.md new file mode 100644 index 00000000..25232c33 --- /dev/null +++ b/docs/apis/BatchesApi.md @@ -0,0 +1,595 @@ +# Batches Methods + +| Method | Description | +|--------|-------------| +| [**AddToBatch**](BatchesApi.md#addtobatch) | Add to a Batch | +| [**CreateBatch**](BatchesApi.md#createbatch) | Create A Batch | +| [**DeleteBatch**](BatchesApi.md#deletebatch) | Delete Batch By Id | +| [**GetBatchByExternalId**](BatchesApi.md#getbatchbyexternalid) | Get Batch By External ID | +| [**GetBatchById**](BatchesApi.md#getbatchbyid) | Get Batch By ID | +| [**ListBatchErrors**](BatchesApi.md#listbatcherrors) | Get Batch Errors | +| [**ListBatches**](BatchesApi.md#listbatches) | List Batches | +| [**ProcessBatch**](BatchesApi.md#processbatch) | Process Batch ID Labels | +| [**RemoveFromBatch**](BatchesApi.md#removefrombatch) | Remove From Batch | +| [**UpdateBatch**](BatchesApi.md#updatebatch) | Update Batch By Id | + + +# **AddToBatch** +```csharp +string AddToBatch (AddToBatchRequestBody addToBatchRequestBody, string batchId, CancellationToken cancellationToken = default) + +string AddToBatch (HttpClient methodClient, AddToBatchRequestBody addToBatchRequestBody, string batchId, CancellationToken cancellationToken = default) +``` + +Add to a Batch + +Add a Shipment or Rate to a Batch + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class AddToBatchExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var addToBatchRequestBody = new AddToBatchRequestBody(); + var batchId = "batchId_example"; + + try + { + // Add to a Batch + string result = await shipEngine.AddToBatch(addToBatchRequestBody, batchId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.AddToBatch: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **addToBatchRequestBody** | [**AddToBatchRequestBody**](../../docs//models/AddToBatchRequestBody.md) | | | +| **batchId** | **string** | Batch ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **CreateBatch** +```csharp +CreateBatchResponseBody CreateBatch (CreateBatchRequest createBatchRequest, CancellationToken cancellationToken = default) + +CreateBatchResponseBody CreateBatch (HttpClient methodClient, CreateBatchRequest createBatchRequest, CancellationToken cancellationToken = default) +``` + +Create A Batch + +Create a Batch + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateBatchExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createBatchRequest = new CreateBatchRequest(); + + try + { + // Create A Batch + CreateBatchResponseBody result = await shipEngine.CreateBatch(createBatchRequest); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.CreateBatch: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createBatchRequest** | [**CreateBatchRequest**](../../docs//models/CreateBatchRequest.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateBatchResponseBody**](../models/CreateBatchResponseBody.md) + + +# **DeleteBatch** +```csharp +string DeleteBatch (string batchId, CancellationToken cancellationToken = default) + +string DeleteBatch (HttpClient methodClient, string batchId, CancellationToken cancellationToken = default) +``` + +Delete Batch By Id + +Delete Batch By Id + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DeleteBatchExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var batchId = "batchId_example"; + + try + { + // Delete Batch By Id + string result = await shipEngine.DeleteBatch(batchId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.DeleteBatch: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **batchId** | **string** | Batch ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **GetBatchByExternalId** +```csharp +GetBatchByExternalIdResponseBody GetBatchByExternalId (string externalBatchId, CancellationToken cancellationToken = default) + +GetBatchByExternalIdResponseBody GetBatchByExternalId (HttpClient methodClient, string externalBatchId, CancellationToken cancellationToken = default) +``` + +Get Batch By External ID + +Get Batch By External ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetBatchByExternalIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var externalBatchId = 13553d7f-3c87-4771-bae1-c49bacef11cb; + + try + { + // Get Batch By External ID + GetBatchByExternalIdResponseBody result = await shipEngine.GetBatchByExternalId(externalBatchId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.GetBatchByExternalId: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **externalBatchId** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetBatchByExternalIdResponseBody**](../models/GetBatchByExternalIdResponseBody.md) + + +# **GetBatchById** +```csharp +GetBatchByIdResponseBody GetBatchById (string batchId, CancellationToken cancellationToken = default) + +GetBatchByIdResponseBody GetBatchById (HttpClient methodClient, string batchId, CancellationToken cancellationToken = default) +``` + +Get Batch By ID + +Get Batch By ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetBatchByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var batchId = "batchId_example"; + + try + { + // Get Batch By ID + GetBatchByIdResponseBody result = await shipEngine.GetBatchById(batchId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.GetBatchById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **batchId** | **string** | Batch ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetBatchByIdResponseBody**](../models/GetBatchByIdResponseBody.md) + + +# **ListBatchErrors** +```csharp +ListBatchErrorsResponseBody ListBatchErrors (string batchId, int pagesize = null, int page = null, CancellationToken cancellationToken = default) + +ListBatchErrorsResponseBody ListBatchErrors (HttpClient methodClient, string batchId, int pagesize = null, int page = null, 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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListBatchErrorsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var batchId = "batchId_example"; + var pagesize = 56; + var page = 2; + + try + { + // Get Batch Errors + ListBatchErrorsResponseBody result = await shipEngine.ListBatchErrors(batchId, pagesize, page); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.ListBatchErrors: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **batchId** | **string** | Batch ID | | +| **pagesize** | **int** | | [optional] | +| **page** | **int** | 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] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListBatchErrorsResponseBody**](../models/ListBatchErrorsResponseBody.md) + + +# **ListBatches** +```csharp +ListBatchesResponseBody ListBatches (BatchStatus status = null, BatchesSortBy sortBy = null, SortDir sortDir = null, string batchNumber = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) + +ListBatchesResponseBody ListBatches (HttpClient methodClient, BatchStatus status = null, BatchesSortBy sortBy = null, SortDir sortDir = null, string batchNumber = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) +``` + +List Batches + +List Batches associated with your Shipengine account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListBatchesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var status = (BatchStatus) "open"; + var sortBy = (BatchesSortBy) "ship_date"; + var sortDir = (SortDir) "asc"; + var batchNumber = "batchNumber_example"; + var page = 2; + var pageSize = 50; + + try + { + // List Batches + ListBatchesResponseBody result = await shipEngine.ListBatches(status, sortBy, sortDir, batchNumber, page, pageSize); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.ListBatches: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **status** | **BatchStatus** | | [optional] | +| **sortBy** | **BatchesSortBy** | | [optional] | +| **sortDir** | **SortDir** | Controls the sort order of the query. | [optional] | +| **batchNumber** | **string** | Batch Number | [optional] | +| **page** | **int** | 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] | +| **pageSize** | **int** | The number of results to return per response. | [optional] [default to 25] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListBatchesResponseBody**](../models/ListBatchesResponseBody.md) + + +# **ProcessBatch** +```csharp +string ProcessBatch (ProcessBatchRequestBody processBatchRequestBody, string batchId, CancellationToken cancellationToken = default) + +string ProcessBatch (HttpClient methodClient, ProcessBatchRequestBody processBatchRequestBody, string batchId, CancellationToken cancellationToken = default) +``` + +Process Batch ID Labels + +Process Batch ID Labels + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ProcessBatchExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var processBatchRequestBody = new ProcessBatchRequestBody(); + var batchId = "batchId_example"; + + try + { + // Process Batch ID Labels + string result = await shipEngine.ProcessBatch(processBatchRequestBody, batchId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.ProcessBatch: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **processBatchRequestBody** | [**ProcessBatchRequestBody**](../../docs//models/ProcessBatchRequestBody.md) | | | +| **batchId** | **string** | Batch ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **RemoveFromBatch** +```csharp +string RemoveFromBatch (RemoveFromBatchRequestBody removeFromBatchRequestBody, string batchId, CancellationToken cancellationToken = default) + +string RemoveFromBatch (HttpClient methodClient, RemoveFromBatchRequestBody removeFromBatchRequestBody, string batchId, CancellationToken cancellationToken = default) +``` + +Remove From Batch + +Remove a shipment or rate from a batch + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class RemoveFromBatchExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var removeFromBatchRequestBody = new RemoveFromBatchRequestBody(); + var batchId = "batchId_example"; + + try + { + // Remove From Batch + string result = await shipEngine.RemoveFromBatch(removeFromBatchRequestBody, batchId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.RemoveFromBatch: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **removeFromBatchRequestBody** | [**RemoveFromBatchRequestBody**](../../docs//models/RemoveFromBatchRequestBody.md) | | | +| **batchId** | **string** | Batch ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **UpdateBatch** +```csharp +string UpdateBatch (string batchId, CancellationToken cancellationToken = default) + +string UpdateBatch (HttpClient methodClient, string batchId, CancellationToken cancellationToken = default) +``` + +Update Batch By Id + +Update Batch By Id + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdateBatchExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var batchId = "batchId_example"; + + try + { + // Update Batch By Id + string result = await shipEngine.UpdateBatch(batchId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling BatchesApi.UpdateBatch: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **batchId** | **string** | Batch ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/apis/CarrierAccountsApi.md b/docs/apis/CarrierAccountsApi.md new file mode 100644 index 00000000..1f2b1a75 --- /dev/null +++ b/docs/apis/CarrierAccountsApi.md @@ -0,0 +1,243 @@ +# CarrierAccounts Methods + +| Method | Description | +|--------|-------------| +| [**ConnectCarrier**](CarrierAccountsApi.md#connectcarrier) | Connect a carrier account | +| [**DisconnectCarrier**](CarrierAccountsApi.md#disconnectcarrier) | Disconnect a carrier | +| [**GetCarrierSettings**](CarrierAccountsApi.md#getcarriersettings) | Get carrier settings | +| [**UpdateCarrierSettings**](CarrierAccountsApi.md#updatecarriersettings) | Update carrier settings | + + +# **ConnectCarrier** +```csharp +ConnectCarrierResponseBody ConnectCarrier (CarrierName carrierName, ConnectCarrierRequestBody connectCarrierRequestBody, CancellationToken cancellationToken = default) + +ConnectCarrierResponseBody ConnectCarrier (HttpClient methodClient, CarrierName carrierName, ConnectCarrierRequestBody connectCarrierRequestBody, CancellationToken cancellationToken = default) +``` + +Connect a carrier account + +Connect a carrier account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ConnectCarrierExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierName = dhl_express; + var connectCarrierRequestBody = new ConnectCarrierRequestBody(); + + try + { + // Connect a carrier account + ConnectCarrierResponseBody result = await shipEngine.ConnectCarrier(carrierName, connectCarrierRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarrierAccountsApi.ConnectCarrier: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierName** | **CarrierName** | The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`. | | +| **connectCarrierRequestBody** | [**ConnectCarrierRequestBody**](../../docs//models/ConnectCarrierRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ConnectCarrierResponseBody**](../models/ConnectCarrierResponseBody.md) + + +# **DisconnectCarrier** +```csharp +string DisconnectCarrier (CarrierName carrierName, string carrierId, CancellationToken cancellationToken = default) + +string DisconnectCarrier (HttpClient methodClient, CarrierName carrierName, string carrierId, CancellationToken cancellationToken = default) +``` + +Disconnect a carrier + +Disconnect a carrier + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DisconnectCarrierExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierName = dhl_express; + var carrierId = se-28529731; + + try + { + // Disconnect a carrier + string result = await shipEngine.DisconnectCarrier(carrierName, carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarrierAccountsApi.DisconnectCarrier: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierName** | **CarrierName** | The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`. | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **GetCarrierSettings** +```csharp +GetCarrierSettingsResponseBody GetCarrierSettings (CarrierNameWithSettings carrierName, string carrierId, CancellationToken cancellationToken = default) + +GetCarrierSettingsResponseBody GetCarrierSettings (HttpClient methodClient, CarrierNameWithSettings carrierName, string carrierId, CancellationToken cancellationToken = default) +``` + +Get carrier settings + +Get carrier settings + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetCarrierSettingsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierName = dhl_express; + var carrierId = se-28529731; + + try + { + // Get carrier settings + GetCarrierSettingsResponseBody result = await shipEngine.GetCarrierSettings(carrierName, carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarrierAccountsApi.GetCarrierSettings: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierName** | **CarrierNameWithSettings** | The carrier name, such as `ups`, `fedex`, or `dhl_express`. | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetCarrierSettingsResponseBody**](../models/GetCarrierSettingsResponseBody.md) + + +# **UpdateCarrierSettings** +```csharp +string UpdateCarrierSettings (CarrierNameWithSettings carrierName, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, string carrierId, CancellationToken cancellationToken = default) + +string UpdateCarrierSettings (HttpClient methodClient, CarrierNameWithSettings carrierName, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, string carrierId, CancellationToken cancellationToken = default) +``` + +Update carrier settings + +Update carrier settings + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdateCarrierSettingsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierName = dhl_express; + var updateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(); + var carrierId = se-28529731; + + try + { + // Update carrier settings + string result = await shipEngine.UpdateCarrierSettings(carrierName, updateCarrierSettingsRequestBody, carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarrierAccountsApi.UpdateCarrierSettings: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierName** | **CarrierNameWithSettings** | The carrier name, such as `ups`, `fedex`, or `dhl_express`. | | +| **updateCarrierSettingsRequestBody** | [**UpdateCarrierSettingsRequestBody**](../../docs//models/UpdateCarrierSettingsRequestBody.md) | | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/apis/CarriersApi.md b/docs/apis/CarriersApi.md new file mode 100644 index 00000000..56a38434 --- /dev/null +++ b/docs/apis/CarriersApi.md @@ -0,0 +1,404 @@ +# Carriers Methods + +| Method | Description | +|--------|-------------| +| [**AddFundsToCarrier**](CarriersApi.md#addfundstocarrier) | Add Funds To Carrier | +| [**DisconnectCarrierById**](CarriersApi.md#disconnectcarrierbyid) | Disconnect Carrier by ID | +| [**GetCarrierById**](CarriersApi.md#getcarrierbyid) | Get Carrier By ID | +| [**GetCarrierOptions**](CarriersApi.md#getcarrieroptions) | Get Carrier Options | +| [**ListCarrierPackageTypes**](CarriersApi.md#listcarrierpackagetypes) | List Carrier Package Types | +| [**ListCarrierServices**](CarriersApi.md#listcarrierservices) | List Carrier Services | +| [**ListCarriers**](CarriersApi.md#listcarriers) | List Carriers | + + +# **AddFundsToCarrier** +```csharp +AddFundsToCarrierResponseBody AddFundsToCarrier (AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, string carrierId, CancellationToken cancellationToken = default) + +AddFundsToCarrierResponseBody AddFundsToCarrier (HttpClient methodClient, AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, string carrierId, CancellationToken cancellationToken = default) +``` + +Add Funds To Carrier + +Add Funds To A Carrier + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class AddFundsToCarrierExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var addFundsToCarrierRequestBody = new AddFundsToCarrierRequestBody(); + var carrierId = se-28529731; + + try + { + // Add Funds To Carrier + AddFundsToCarrierResponseBody result = await shipEngine.AddFundsToCarrier(addFundsToCarrierRequestBody, carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarriersApi.AddFundsToCarrier: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **addFundsToCarrierRequestBody** | [**AddFundsToCarrierRequestBody**](../../docs//models/AddFundsToCarrierRequestBody.md) | | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**AddFundsToCarrierResponseBody**](../models/AddFundsToCarrierResponseBody.md) + + +# **DisconnectCarrierById** +```csharp +string DisconnectCarrierById (string carrierId, CancellationToken cancellationToken = default) + +string DisconnectCarrierById (HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default) +``` + +Disconnect Carrier by ID + +Disconnect a Carrier of the given ID from the account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DisconnectCarrierByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierId = se-28529731; + + try + { + // Disconnect Carrier by ID + string result = await shipEngine.DisconnectCarrierById(carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarriersApi.DisconnectCarrierById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **GetCarrierById** +```csharp +GetCarrierByIdResponseBody GetCarrierById (string carrierId, CancellationToken cancellationToken = default) + +GetCarrierByIdResponseBody GetCarrierById (HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default) +``` + +Get Carrier By ID + +Retrive carrier info by ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetCarrierByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierId = se-28529731; + + try + { + // Get Carrier By ID + GetCarrierByIdResponseBody result = await shipEngine.GetCarrierById(carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarriersApi.GetCarrierById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetCarrierByIdResponseBody**](../models/GetCarrierByIdResponseBody.md) + + +# **GetCarrierOptions** +```csharp +GetCarrierOptionsResponseBody GetCarrierOptions (string carrierId, CancellationToken cancellationToken = default) + +GetCarrierOptionsResponseBody GetCarrierOptions (HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default) +``` + +Get Carrier Options + +Get a list of the options available for the carrier + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetCarrierOptionsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierId = se-28529731; + + try + { + // Get Carrier Options + GetCarrierOptionsResponseBody result = await shipEngine.GetCarrierOptions(carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarriersApi.GetCarrierOptions: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetCarrierOptionsResponseBody**](../models/GetCarrierOptionsResponseBody.md) + + +# **ListCarrierPackageTypes** +```csharp +ListCarrierPackageTypesResponseBody ListCarrierPackageTypes (string carrierId, CancellationToken cancellationToken = default) + +ListCarrierPackageTypesResponseBody ListCarrierPackageTypes (HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default) +``` + +List Carrier Package Types + +List the package types associated with the carrier + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListCarrierPackageTypesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierId = se-28529731; + + try + { + // List Carrier Package Types + ListCarrierPackageTypesResponseBody result = await shipEngine.ListCarrierPackageTypes(carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarriersApi.ListCarrierPackageTypes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListCarrierPackageTypesResponseBody**](../models/ListCarrierPackageTypesResponseBody.md) + + +# **ListCarrierServices** +```csharp +ListCarrierServicesResponseBody ListCarrierServices (string carrierId, CancellationToken cancellationToken = default) + +ListCarrierServicesResponseBody ListCarrierServices (HttpClient methodClient, string carrierId, CancellationToken cancellationToken = default) +``` + +List Carrier Services + +List the services associated with the carrier ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListCarrierServicesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierId = se-28529731; + + try + { + // List Carrier Services + ListCarrierServicesResponseBody result = await shipEngine.ListCarrierServices(carrierId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarriersApi.ListCarrierServices: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierId** | **string** | Carrier ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListCarrierServicesResponseBody**](../models/ListCarrierServicesResponseBody.md) + + +# **ListCarriers** +```csharp +GetCarriersResponseBody ListCarriers (CancellationToken cancellationToken = default) + +GetCarriersResponseBody ListCarriers (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +List Carriers + +List all carriers that have been added to this account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListCarriersExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // List Carriers + GetCarriersResponseBody result = await shipEngine.ListCarriers(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling CarriersApi.ListCarriers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetCarriersResponseBody**](../models/GetCarriersResponseBody.md) + diff --git a/docs/apis/DownloadsApi.md b/docs/apis/DownloadsApi.md new file mode 100644 index 00000000..3f443509 --- /dev/null +++ b/docs/apis/DownloadsApi.md @@ -0,0 +1,70 @@ +# Downloads Methods + +| Method | Description | +|--------|-------------| +| [**DownloadFile**](DownloadsApi.md#downloadfile) | Download File | + + +# **DownloadFile** +```csharp +System.IO.Stream DownloadFile (string subdir, string filename, string dir, int rotation = null, string download = null, CancellationToken cancellationToken = default) + +System.IO.Stream DownloadFile (HttpClient methodClient, string subdir, string filename, string dir, int rotation = null, string download = null, CancellationToken cancellationToken = default) +``` + +Download File + +Get File + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DownloadFileExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var subdir = "subdir_example"; + var filename = "filename_example"; + var dir = "dir_example"; + var rotation = 56; + var download = "download_example"; + + try + { + // Download File + System.IO.Stream result = await shipEngine.DownloadFile(subdir, filename, dir, rotation, download); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling DownloadsApi.DownloadFile: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **subdir** | **string** | | | +| **filename** | **string** | | | +| **dir** | **string** | | | +| **rotation** | **int** | | [optional] | +| **download** | **string** | | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**System.IO.Stream** + diff --git a/docs/apis/InsuranceApi.md b/docs/apis/InsuranceApi.md new file mode 100644 index 00000000..61147e84 --- /dev/null +++ b/docs/apis/InsuranceApi.md @@ -0,0 +1,229 @@ +# Insurance Methods + +| Method | Description | +|--------|-------------| +| [**AddFundsToInsurance**](InsuranceApi.md#addfundstoinsurance) | Add Funds To Insurance | +| [**ConnectInsurer**](InsuranceApi.md#connectinsurer) | Connect a Shipsurance Account | +| [**DisconnectInsurer**](InsuranceApi.md#disconnectinsurer) | Disconnect a Shipsurance Account | +| [**GetInsuranceBalance**](InsuranceApi.md#getinsurancebalance) | Get Insurance Funds Balance | + + +# **AddFundsToInsurance** +```csharp +AddFundsToInsuranceResponseBody AddFundsToInsurance (AddFundsToInsuranceRequestBody addFundsToInsuranceRequestBody, CancellationToken cancellationToken = default) + +AddFundsToInsuranceResponseBody AddFundsToInsurance (HttpClient methodClient, 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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class AddFundsToInsuranceExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var addFundsToInsuranceRequestBody = new AddFundsToInsuranceRequestBody(); + + try + { + // Add Funds To Insurance + AddFundsToInsuranceResponseBody result = await shipEngine.AddFundsToInsurance(addFundsToInsuranceRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling InsuranceApi.AddFundsToInsurance: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **addFundsToInsuranceRequestBody** | [**AddFundsToInsuranceRequestBody**](../../docs//models/AddFundsToInsuranceRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**AddFundsToInsuranceResponseBody**](../models/AddFundsToInsuranceResponseBody.md) + + +# **ConnectInsurer** +```csharp +Object ConnectInsurer (ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default) + +Object ConnectInsurer (HttpClient methodClient, ConnectInsurerRequestBody connectInsurerRequestBody, CancellationToken cancellationToken = default) +``` + +Connect a Shipsurance Account + +Connect a Shipsurance Account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ConnectInsurerExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var connectInsurerRequestBody = new ConnectInsurerRequestBody(); + + try + { + // Connect a Shipsurance Account + Object result = await shipEngine.ConnectInsurer(connectInsurerRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling InsuranceApi.ConnectInsurer: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **connectInsurerRequestBody** | [**ConnectInsurerRequestBody**](../../docs//models/ConnectInsurerRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**Object** + + +# **DisconnectInsurer** +```csharp +Object DisconnectInsurer (CancellationToken cancellationToken = default) + +Object DisconnectInsurer (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +Disconnect a Shipsurance Account + +Disconnect a Shipsurance Account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DisconnectInsurerExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // Disconnect a Shipsurance Account + Object result = await shipEngine.DisconnectInsurer(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling InsuranceApi.DisconnectInsurer: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**Object** + + +# **GetInsuranceBalance** +```csharp +GetInsuranceBalanceResponseBody GetInsuranceBalance (CancellationToken cancellationToken = default) + +GetInsuranceBalanceResponseBody GetInsuranceBalance (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +Get Insurance Funds Balance + +Retrieve the balance of your Shipsurance account. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetInsuranceBalanceExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // Get Insurance Funds Balance + GetInsuranceBalanceResponseBody result = await shipEngine.GetInsuranceBalance(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling InsuranceApi.GetInsuranceBalance: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetInsuranceBalanceResponseBody**](../models/GetInsuranceBalanceResponseBody.md) + diff --git a/docs/apis/LabelsApi.md b/docs/apis/LabelsApi.md new file mode 100644 index 00000000..c5c302fa --- /dev/null +++ b/docs/apis/LabelsApi.md @@ -0,0 +1,554 @@ +# Labels Methods + +| Method | Description | +|--------|-------------| +| [**CreateLabel**](LabelsApi.md#createlabel) | Purchase Label | +| [**CreateLabelFromRate**](LabelsApi.md#createlabelfromrate) | Purchase Label with Rate ID | +| [**CreateLabelFromShipment**](LabelsApi.md#createlabelfromshipment) | Purchase Label with Shipment ID | +| [**CreateReturnLabel**](LabelsApi.md#createreturnlabel) | Create a return label | +| [**GetLabelByExternalShipmentId**](LabelsApi.md#getlabelbyexternalshipmentid) | Get Label By External Shipment ID | +| [**GetLabelById**](LabelsApi.md#getlabelbyid) | Get Label By ID | +| [**GetTrackingLogFromLabel**](LabelsApi.md#gettrackinglogfromlabel) | Get Label Tracking Information | +| [**ListLabels**](LabelsApi.md#listlabels) | List labels | +| [**VoidLabel**](LabelsApi.md#voidlabel) | Void a Label By ID | + + +# **CreateLabel** +```csharp +CreateLabelResponseBody CreateLabel (CreateLabelRequestBody createLabelRequestBody, CancellationToken cancellationToken = default) + +CreateLabelResponseBody CreateLabel (HttpClient methodClient, CreateLabelRequestBody createLabelRequestBody, CancellationToken cancellationToken = default) +``` + +Purchase Label + +Purchase and print a label for shipment + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateLabelExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createLabelRequestBody = new CreateLabelRequestBody(); + + try + { + // Purchase Label + CreateLabelResponseBody result = await shipEngine.CreateLabel(createLabelRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.CreateLabel: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createLabelRequestBody** | [**CreateLabelRequestBody**](../../docs//models/CreateLabelRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateLabelResponseBody**](../models/CreateLabelResponseBody.md) + + +# **CreateLabelFromRate** +```csharp +CreateLabelFromRateResponseBody CreateLabelFromRate (CreateLabelFromRateRequestBody createLabelFromRateRequestBody, string rateId, CancellationToken cancellationToken = default) + +CreateLabelFromRateResponseBody CreateLabelFromRate (HttpClient methodClient, CreateLabelFromRateRequestBody createLabelFromRateRequestBody, string rateId, CancellationToken cancellationToken = default) +``` + +Purchase Label with Rate ID + +When retrieving rates for shipments using the `/rates` endpoint, the returned information contains a `rate_id` property that can be used to generate a label without having to refill in the shipment information repeatedly. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateLabelFromRateExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createLabelFromRateRequestBody = new CreateLabelFromRateRequestBody(); + var rateId = "rateId_example"; + + try + { + // Purchase Label with Rate ID + CreateLabelFromRateResponseBody result = await shipEngine.CreateLabelFromRate(createLabelFromRateRequestBody, rateId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.CreateLabelFromRate: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createLabelFromRateRequestBody** | [**CreateLabelFromRateRequestBody**](../../docs//models/CreateLabelFromRateRequestBody.md) | | | +| **rateId** | **string** | Rate ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateLabelFromRateResponseBody**](../models/CreateLabelFromRateResponseBody.md) + + +# **CreateLabelFromShipment** +```csharp +CreateLabelFromShipmentResponseBody CreateLabelFromShipment (CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) + +CreateLabelFromShipmentResponseBody CreateLabelFromShipment (HttpClient methodClient, CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) +``` + +Purchase Label with Shipment ID + +Purchase a label using a shipment ID that has already been created with the desired address and package info. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateLabelFromShipmentExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createLabelFromShipmentRequestBody = new CreateLabelFromShipmentRequestBody(); + var shipmentId = "shipmentId_example"; + + try + { + // Purchase Label with Shipment ID + CreateLabelFromShipmentResponseBody result = await shipEngine.CreateLabelFromShipment(createLabelFromShipmentRequestBody, shipmentId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.CreateLabelFromShipment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createLabelFromShipmentRequestBody** | [**CreateLabelFromShipmentRequestBody**](../../docs//models/CreateLabelFromShipmentRequestBody.md) | | | +| **shipmentId** | **string** | Shipment ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateLabelFromShipmentResponseBody**](../models/CreateLabelFromShipmentResponseBody.md) + + +# **CreateReturnLabel** +```csharp +CreateReturnLabelResponseBody CreateReturnLabel (CreateReturnLabelRequestBody createReturnLabelRequestBody, string labelId, CancellationToken cancellationToken = default) + +CreateReturnLabelResponseBody CreateReturnLabel (HttpClient methodClient, CreateReturnLabelRequestBody createReturnLabelRequestBody, string labelId, CancellationToken cancellationToken = default) +``` + +Create a return label + +Create a return label + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateReturnLabelExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createReturnLabelRequestBody = new CreateReturnLabelRequestBody(); + var labelId = "labelId_example"; + + try + { + // Create a return label + CreateReturnLabelResponseBody result = await shipEngine.CreateReturnLabel(createReturnLabelRequestBody, labelId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.CreateReturnLabel: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createReturnLabelRequestBody** | [**CreateReturnLabelRequestBody**](../../docs//models/CreateReturnLabelRequestBody.md) | | | +| **labelId** | **string** | Label ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateReturnLabelResponseBody**](../models/CreateReturnLabelResponseBody.md) + + +# **GetLabelByExternalShipmentId** +```csharp +GetLabelByExternalShipmentIdResponseBody GetLabelByExternalShipmentId (string externalShipmentId, LabelDownloadType labelDownloadType = null, CancellationToken cancellationToken = default) + +GetLabelByExternalShipmentIdResponseBody GetLabelByExternalShipmentId (HttpClient methodClient, string externalShipmentId, LabelDownloadType labelDownloadType = null, CancellationToken cancellationToken = default) +``` + +Get Label By External Shipment ID + +Find a label by using the external shipment id that was used during label creation + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetLabelByExternalShipmentIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var externalShipmentId = 0bcb569d-1727-4ff9-ab49-b2fec0cee5ae; + var labelDownloadType = url; + + try + { + // Get Label By External Shipment ID + GetLabelByExternalShipmentIdResponseBody result = await shipEngine.GetLabelByExternalShipmentId(externalShipmentId, labelDownloadType); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.GetLabelByExternalShipmentId: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **externalShipmentId** | **string** | | | +| **labelDownloadType** | **LabelDownloadType** | | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetLabelByExternalShipmentIdResponseBody**](../models/GetLabelByExternalShipmentIdResponseBody.md) + + +# **GetLabelById** +```csharp +GetLabelByIdResponseBody GetLabelById (string labelId, LabelDownloadType labelDownloadType = null, CancellationToken cancellationToken = default) + +GetLabelByIdResponseBody GetLabelById (HttpClient methodClient, string labelId, LabelDownloadType labelDownloadType = null, CancellationToken cancellationToken = default) +``` + +Get Label By ID + +Retrieve information for individual labels. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetLabelByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var labelId = "labelId_example"; + var labelDownloadType = url; + + try + { + // Get Label By ID + GetLabelByIdResponseBody result = await shipEngine.GetLabelById(labelId, labelDownloadType); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.GetLabelById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **labelId** | **string** | Label ID | | +| **labelDownloadType** | **LabelDownloadType** | | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetLabelByIdResponseBody**](../models/GetLabelByIdResponseBody.md) + + +# **GetTrackingLogFromLabel** +```csharp +GetTrackingLogFromLabelResponseBody GetTrackingLogFromLabel (string labelId, CancellationToken cancellationToken = default) + +GetTrackingLogFromLabelResponseBody GetTrackingLogFromLabel (HttpClient methodClient, string labelId, CancellationToken cancellationToken = default) +``` + +Get Label Tracking Information + +Retrieve the label's tracking information + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetTrackingLogFromLabelExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var labelId = "labelId_example"; + + try + { + // Get Label Tracking Information + GetTrackingLogFromLabelResponseBody result = await shipEngine.GetTrackingLogFromLabel(labelId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.GetTrackingLogFromLabel: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **labelId** | **string** | Label ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetTrackingLogFromLabelResponseBody**](../models/GetTrackingLogFromLabelResponseBody.md) + + +# **ListLabels** +```csharp +ListLabelsResponseBody ListLabels (DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, LabelStatus labelStatus = null, SortDir sortDir = null, string serviceCode = null, string carrierId = null, string trackingNumber = null, string batchId = null, string rateId = null, string shipmentId = null, string warehouseId = null, int page = null, int pageSize = null, string sortBy = null, CancellationToken cancellationToken = default) + +ListLabelsResponseBody ListLabels (HttpClient methodClient, DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, LabelStatus labelStatus = null, SortDir sortDir = null, string serviceCode = null, string carrierId = null, string trackingNumber = null, string batchId = null, string rateId = null, string shipmentId = null, string warehouseId = null, int page = null, int pageSize = null, string sortBy = null, CancellationToken cancellationToken = default) +``` + +List labels + +This endpoint returns a list of labels that you've [created](https://www.shipengine.com/docs/labels/create-a-label/). You can optionally filter the results as well as control their sort order and the number of results returned at a time. By default, all labels are returned, 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want to get your UPS labels for your east coast warehouse you could query by both `warehouse_id` and `carrier_id` + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListLabelsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createdAtStart = 2019-03-12T19:24:13.657Z; + var createdAtEnd = 2019-03-12T19:24:13.657Z; + var labelStatus = (LabelStatus) "processing"; + var sortDir = (SortDir) "asc"; + var serviceCode = usps_first_class_mail; + var carrierId = "carrierId_example"; + var trackingNumber = 9405511899223197428490; + var batchId = "batchId_example"; + var rateId = "rateId_example"; + var shipmentId = "shipmentId_example"; + var warehouseId = "warehouseId_example"; + var page = 2; + var pageSize = 50; + var sortBy = "modified_at"; + + try + { + // List labels + ListLabelsResponseBody result = await shipEngine.ListLabels(createdAtStart, createdAtEnd, labelStatus, sortDir, serviceCode, carrierId, trackingNumber, batchId, rateId, shipmentId, warehouseId, page, pageSize, sortBy); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.ListLabels: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createdAtStart** | **DateTimeOffset** | Only return labels that were created on or after a specific date/time | [optional] | +| **createdAtEnd** | **DateTimeOffset** | Only return labels that were created on or before a specific date/time | [optional] | +| **labelStatus** | **LabelStatus** | Only return labels that are currently in the specified status | [optional] | +| **sortDir** | **SortDir** | Controls the sort order of the query. | [optional] | +| **serviceCode** | **string** | Only return labels for a specific [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) | [optional] | +| **carrierId** | **string** | Only return labels for a specific [carrier account](https://www.shipengine.com/docs/carriers/setup/) | [optional] | +| **trackingNumber** | **string** | Only return labels with a specific tracking number | [optional] | +| **batchId** | **string** | Only return labels that were created in a specific [batch](https://www.shipengine.com/docs/labels/bulk/) | [optional] | +| **rateId** | **string** | Rate ID | [optional] | +| **shipmentId** | **string** | Shipment ID | [optional] | +| **warehouseId** | **string** | Only return labels that originate from a specific [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) | [optional] | +| **page** | **int** | 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] | +| **pageSize** | **int** | The number of results to return per response. | [optional] [default to 25] | +| **sortBy** | **string** | Controls which field the query is sorted by. | [optional] [default to created_at] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListLabelsResponseBody**](../models/ListLabelsResponseBody.md) + + +# **VoidLabel** +```csharp +VoidLabelResponseBody VoidLabel (string labelId, CancellationToken cancellationToken = default) + +VoidLabelResponseBody VoidLabel (HttpClient methodClient, string labelId, CancellationToken cancellationToken = default) +``` + +Void a Label By ID + +Void a label by ID to get a refund. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class VoidLabelExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var labelId = "labelId_example"; + + try + { + // Void a Label By ID + VoidLabelResponseBody result = await shipEngine.VoidLabel(labelId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling LabelsApi.VoidLabel: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **labelId** | **string** | Label ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**VoidLabelResponseBody**](../models/VoidLabelResponseBody.md) + diff --git a/docs/apis/ManifestsApi.md b/docs/apis/ManifestsApi.md new file mode 100644 index 00000000..e5e15c63 --- /dev/null +++ b/docs/apis/ManifestsApi.md @@ -0,0 +1,249 @@ +# Manifests Methods + +| Method | Description | +|--------|-------------| +| [**CreateManifest**](ManifestsApi.md#createmanifest) | Create Manifest | +| [**GetManifestById**](ManifestsApi.md#getmanifestbyid) | Get Manifest By Id | +| [**GetManifestRequestById**](ManifestsApi.md#getmanifestrequestbyid) | Get Manifest Request By Id | +| [**ListManifests**](ManifestsApi.md#listmanifests) | List Manifests | + + +# **CreateManifest** +```csharp +CreateManifestResponseBody CreateManifest (CreateManifestRequestBody createManifestRequestBody, CancellationToken cancellationToken = default) + +CreateManifestResponseBody CreateManifest (HttpClient methodClient, CreateManifestRequestBody createManifestRequestBody, CancellationToken cancellationToken = default) +``` + +Create Manifest + +Each ShipEngine manifest is created for a specific warehouse, so you'll need to provide the warehouse_id rather than the ship_from address. You can create a warehouse for each location that you want to create manifests for. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateManifestExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createManifestRequestBody = new CreateManifestRequestBody(); + + try + { + // Create Manifest + CreateManifestResponseBody result = await shipEngine.CreateManifest(createManifestRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ManifestsApi.CreateManifest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createManifestRequestBody** | [**CreateManifestRequestBody**](../../docs//models/CreateManifestRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateManifestResponseBody**](../models/CreateManifestResponseBody.md) + + +# **GetManifestById** +```csharp +GetManifestByIdResponseBody GetManifestById (string manifestId, CancellationToken cancellationToken = default) + +GetManifestByIdResponseBody GetManifestById (HttpClient methodClient, string manifestId, CancellationToken cancellationToken = default) +``` + +Get Manifest By Id + +Get Manifest By Id + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetManifestByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var manifestId = "manifestId_example"; + + try + { + // Get Manifest By Id + GetManifestByIdResponseBody result = await shipEngine.GetManifestById(manifestId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ManifestsApi.GetManifestById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **manifestId** | **string** | The Manifest Id | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetManifestByIdResponseBody**](../models/GetManifestByIdResponseBody.md) + + +# **GetManifestRequestById** +```csharp +CreateManifestResponseBody GetManifestRequestById (string manifestRequestId, CancellationToken cancellationToken = default) + +CreateManifestResponseBody GetManifestRequestById (HttpClient methodClient, string manifestRequestId, CancellationToken cancellationToken = default) +``` + +Get Manifest Request By Id + +Get Manifest Request By Id + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetManifestRequestByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var manifestRequestId = "manifestRequestId_example"; + + try + { + // Get Manifest Request By Id + CreateManifestResponseBody result = await shipEngine.GetManifestRequestById(manifestRequestId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ManifestsApi.GetManifestRequestById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **manifestRequestId** | **string** | The Manifest Request Id | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateManifestResponseBody**](../models/CreateManifestResponseBody.md) + + +# **ListManifests** +```csharp +ListManifestsResponseBody ListManifests (DateTimeOffset shipDateStart = null, DateTimeOffset shipDateEnd = null, DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, List labelIds = null, string warehouseId = null, string carrierId = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) + +ListManifestsResponseBody ListManifests (HttpClient methodClient, DateTimeOffset shipDateStart = null, DateTimeOffset shipDateEnd = null, DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, List labelIds = null, string warehouseId = null, string carrierId = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) +``` + +List Manifests + +Similar to querying shipments, we allow you to query manifests since there will likely be a large number over a long period of time. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListManifestsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var shipDateStart = 2018-09-23T15:00:00.000Z; + var shipDateEnd = 2018-09-23T15:00:00.000Z; + var createdAtStart = 2019-03-12T19:24:13.657Z; + var createdAtEnd = 2019-03-12T19:24:13.657Z; + var labelIds = new List(); + var warehouseId = "warehouseId_example"; + var carrierId = "carrierId_example"; + var page = 2; + var pageSize = 50; + + try + { + // List Manifests + ListManifestsResponseBody result = await shipEngine.ListManifests(shipDateStart, shipDateEnd, createdAtStart, createdAtEnd, labelIds, warehouseId, carrierId, page, pageSize); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ManifestsApi.ListManifests: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **shipDateStart** | **DateTimeOffset** | ship date start range | [optional] | +| **shipDateEnd** | **DateTimeOffset** | ship date end range | [optional] | +| **createdAtStart** | **DateTimeOffset** | Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) | [optional] | +| **createdAtEnd** | **DateTimeOffset** | Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) | [optional] | +| **labelIds** | [**List<string>**](../../docs//models/string.md) | | [optional] | +| **warehouseId** | **string** | Warehouse ID | [optional] | +| **carrierId** | **string** | Carrier ID | [optional] | +| **page** | **int** | 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] | +| **pageSize** | **int** | The number of results to return per response. | [optional] [default to 25] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListManifestsResponseBody**](../models/ListManifestsResponseBody.md) + diff --git a/docs/apis/PackagePickupsApi.md b/docs/apis/PackagePickupsApi.md new file mode 100644 index 00000000..b5387d71 --- /dev/null +++ b/docs/apis/PackagePickupsApi.md @@ -0,0 +1,243 @@ +# PackagePickups Methods + +| Method | Description | +|--------|-------------| +| [**DeleteScheduledPickup**](PackagePickupsApi.md#deletescheduledpickup) | Delete a Scheduled Pickup | +| [**GetPickupById**](PackagePickupsApi.md#getpickupbyid) | Get Pickup By ID | +| [**ListScheduledPickups**](PackagePickupsApi.md#listscheduledpickups) | List Scheduled Pickups | +| [**SchedulePickup**](PackagePickupsApi.md#schedulepickup) | Schedule a Pickup | + + +# **DeleteScheduledPickup** +```csharp +DeletePickupByIdResponseBody DeleteScheduledPickup (string pickupId, CancellationToken cancellationToken = default) + +DeletePickupByIdResponseBody DeleteScheduledPickup (HttpClient methodClient, string pickupId, CancellationToken cancellationToken = default) +``` + +Delete a Scheduled Pickup + +Delete a previously-scheduled pickup by ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DeleteScheduledPickupExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var pickupId = "pickupId_example"; + + try + { + // Delete a Scheduled Pickup + DeletePickupByIdResponseBody result = await shipEngine.DeleteScheduledPickup(pickupId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackagePickupsApi.DeleteScheduledPickup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **pickupId** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**DeletePickupByIdResponseBody**](../models/DeletePickupByIdResponseBody.md) + + +# **GetPickupById** +```csharp +GetPickupByIdResponseBody GetPickupById (string pickupId, CancellationToken cancellationToken = default) + +GetPickupByIdResponseBody GetPickupById (HttpClient methodClient, string pickupId, CancellationToken cancellationToken = default) +``` + +Get Pickup By ID + +Get Pickup By ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetPickupByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var pickupId = "pickupId_example"; + + try + { + // Get Pickup By ID + GetPickupByIdResponseBody result = await shipEngine.GetPickupById(pickupId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackagePickupsApi.GetPickupById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **pickupId** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetPickupByIdResponseBody**](../models/GetPickupByIdResponseBody.md) + + +# **ListScheduledPickups** +```csharp +GetPickupsResponseBody ListScheduledPickups (DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, string carrierId = null, string warehouseId = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) + +GetPickupsResponseBody ListScheduledPickups (HttpClient methodClient, DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, string carrierId = null, string warehouseId = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) +``` + +List Scheduled Pickups + +List all pickups that have been scheduled for this carrier + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListScheduledPickupsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createdAtStart = 2019-03-12T19:24:13.657Z; + var createdAtEnd = 2019-03-12T19:24:13.657Z; + var carrierId = "carrierId_example"; + var warehouseId = "warehouseId_example"; + var page = 2; + var pageSize = 50; + + try + { + // List Scheduled Pickups + GetPickupsResponseBody result = await shipEngine.ListScheduledPickups(createdAtStart, createdAtEnd, carrierId, warehouseId, page, pageSize); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackagePickupsApi.ListScheduledPickups: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createdAtStart** | **DateTimeOffset** | Only return scheduled pickups that were created on or after a specific date/time | [optional] | +| **createdAtEnd** | **DateTimeOffset** | Only return scheduled pickups that were created on or before a specific date/time | [optional] | +| **carrierId** | **string** | Carrier ID | [optional] | +| **warehouseId** | **string** | Warehouse ID | [optional] | +| **page** | **int** | 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] | +| **pageSize** | **int** | The number of results to return per response. | [optional] [default to 25] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetPickupsResponseBody**](../models/GetPickupsResponseBody.md) + + +# **SchedulePickup** +```csharp +SchedulePickupResponseBody SchedulePickup (SchedulePickupRequestBody schedulePickupRequestBody, CancellationToken cancellationToken = default) + +SchedulePickupResponseBody SchedulePickup (HttpClient methodClient, SchedulePickupRequestBody schedulePickupRequestBody, CancellationToken cancellationToken = default) +``` + +Schedule a Pickup + +Schedule a package pickup with a carrier + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class SchedulePickupExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var schedulePickupRequestBody = new SchedulePickupRequestBody(); + + try + { + // Schedule a Pickup + SchedulePickupResponseBody result = await shipEngine.SchedulePickup(schedulePickupRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackagePickupsApi.SchedulePickup: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **schedulePickupRequestBody** | [**SchedulePickupRequestBody**](../../docs//models/SchedulePickupRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**SchedulePickupResponseBody**](../models/SchedulePickupResponseBody.md) + diff --git a/docs/apis/PackageTypesApi.md b/docs/apis/PackageTypesApi.md new file mode 100644 index 00000000..4c269d07 --- /dev/null +++ b/docs/apis/PackageTypesApi.md @@ -0,0 +1,290 @@ +# PackageTypes Methods + +| Method | Description | +|--------|-------------| +| [**CreatePackageType**](PackageTypesApi.md#createpackagetype) | Create Custom Package Type | +| [**DeletePackageType**](PackageTypesApi.md#deletepackagetype) | Delete A Custom Package By ID | +| [**GetPackageTypeById**](PackageTypesApi.md#getpackagetypebyid) | Get Custom Package Type By ID | +| [**ListPackageTypes**](PackageTypesApi.md#listpackagetypes) | List Custom Package Types | +| [**UpdatePackageType**](PackageTypesApi.md#updatepackagetype) | Update Custom Package Type By ID | + + +# **CreatePackageType** +```csharp +CreatePackageTypeResponseBody CreatePackageType (CreatePackageTypeRequestBody createPackageTypeRequestBody, CancellationToken cancellationToken = default) + +CreatePackageTypeResponseBody CreatePackageType (HttpClient methodClient, CreatePackageTypeRequestBody createPackageTypeRequestBody, CancellationToken cancellationToken = default) +``` + +Create Custom Package Type + +Create a custom package type to better assist in getting accurate rate estimates + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreatePackageTypeExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createPackageTypeRequestBody = new CreatePackageTypeRequestBody(); + + try + { + // Create Custom Package Type + CreatePackageTypeResponseBody result = await shipEngine.CreatePackageType(createPackageTypeRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackageTypesApi.CreatePackageType: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createPackageTypeRequestBody** | [**CreatePackageTypeRequestBody**](../../docs//models/CreatePackageTypeRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreatePackageTypeResponseBody**](../models/CreatePackageTypeResponseBody.md) + + +# **DeletePackageType** +```csharp +string DeletePackageType (string packageId, CancellationToken cancellationToken = default) + +string DeletePackageType (HttpClient methodClient, string packageId, CancellationToken cancellationToken = default) +``` + +Delete A Custom Package By ID + +Delete a custom package using the ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DeletePackageTypeExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var packageId = "packageId_example"; + + try + { + // Delete A Custom Package By ID + string result = await shipEngine.DeletePackageType(packageId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackageTypesApi.DeletePackageType: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **packageId** | **string** | Package ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **GetPackageTypeById** +```csharp +GetPackageTypeByIdResponseBody GetPackageTypeById (string packageId, CancellationToken cancellationToken = default) + +GetPackageTypeByIdResponseBody GetPackageTypeById (HttpClient methodClient, string packageId, CancellationToken cancellationToken = default) +``` + +Get Custom Package Type By ID + +Get Custom Package Type by ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetPackageTypeByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var packageId = "packageId_example"; + + try + { + // Get Custom Package Type By ID + GetPackageTypeByIdResponseBody result = await shipEngine.GetPackageTypeById(packageId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackageTypesApi.GetPackageTypeById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **packageId** | **string** | Package ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetPackageTypeByIdResponseBody**](../models/GetPackageTypeByIdResponseBody.md) + + +# **ListPackageTypes** +```csharp +ListPackageTypesResponseBody ListPackageTypes (CancellationToken cancellationToken = default) + +ListPackageTypesResponseBody ListPackageTypes (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +List Custom Package Types + +List the custom package types associated with the account + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListPackageTypesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // List Custom Package Types + ListPackageTypesResponseBody result = await shipEngine.ListPackageTypes(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackageTypesApi.ListPackageTypes: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListPackageTypesResponseBody**](../models/ListPackageTypesResponseBody.md) + + +# **UpdatePackageType** +```csharp +string UpdatePackageType (UpdatePackageTypeRequestBody updatePackageTypeRequestBody, string packageId, CancellationToken cancellationToken = default) + +string UpdatePackageType (HttpClient methodClient, UpdatePackageTypeRequestBody updatePackageTypeRequestBody, string packageId, CancellationToken cancellationToken = default) +``` + +Update Custom Package Type By ID + +Update the custom package type object by ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdatePackageTypeExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var updatePackageTypeRequestBody = new UpdatePackageTypeRequestBody(); + var packageId = "packageId_example"; + + try + { + // Update Custom Package Type By ID + string result = await shipEngine.UpdatePackageType(updatePackageTypeRequestBody, packageId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling PackageTypesApi.UpdatePackageType: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **updatePackageTypeRequestBody** | [**UpdatePackageTypeRequestBody**](../../docs//models/UpdatePackageTypeRequestBody.md) | | | +| **packageId** | **string** | Package ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/apis/RatesApi.md b/docs/apis/RatesApi.md new file mode 100644 index 00000000..60f105da --- /dev/null +++ b/docs/apis/RatesApi.md @@ -0,0 +1,233 @@ +# Rates Methods + +| Method | Description | +|--------|-------------| +| [**CalculateRates**](RatesApi.md#calculaterates) | Get Shipping Rates | +| [**CompareBulkRates**](RatesApi.md#comparebulkrates) | Get Bulk Rates | +| [**EstimateRates**](RatesApi.md#estimaterates) | Estimate Rates | +| [**GetRateById**](RatesApi.md#getratebyid) | Get Rate By ID | + + +# **CalculateRates** +```csharp +CalculateRatesResponseBody CalculateRates (CalculateRatesRequestBody calculateRatesRequestBody, CancellationToken cancellationToken = default) + +CalculateRatesResponseBody CalculateRates (HttpClient methodClient, CalculateRatesRequestBody calculateRatesRequestBody, CancellationToken cancellationToken = default) +``` + +Get Shipping Rates + +It's not uncommon that you want to give your customer the choice between whether they want to ship the fastest, cheapest, or the most trusted route. Most companies don't solely ship things using a single shipping option; so we provide functionality to show you all your options! + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CalculateRatesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var calculateRatesRequestBody = new CalculateRatesRequestBody(); + + try + { + // Get Shipping Rates + CalculateRatesResponseBody result = await shipEngine.CalculateRates(calculateRatesRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling RatesApi.CalculateRates: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **calculateRatesRequestBody** | [**CalculateRatesRequestBody**](../../docs//models/CalculateRatesRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CalculateRatesResponseBody**](../models/CalculateRatesResponseBody.md) + + +# **CompareBulkRates** +```csharp +List<BulkRate> CompareBulkRates (CompareBulkRatesRequestBody compareBulkRatesRequestBody, CancellationToken cancellationToken = default) + +List<BulkRate> CompareBulkRates (HttpClient methodClient, CompareBulkRatesRequestBody compareBulkRatesRequestBody, CancellationToken cancellationToken = default) +``` + +Get Bulk Rates + +Get Bulk Shipment Rates + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CompareBulkRatesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var compareBulkRatesRequestBody = new CompareBulkRatesRequestBody(); + + try + { + // Get Bulk Rates + List result = await shipEngine.CompareBulkRates(compareBulkRatesRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling RatesApi.CompareBulkRates: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **compareBulkRatesRequestBody** | [**CompareBulkRatesRequestBody**](../../docs//models/CompareBulkRatesRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**List<BulkRate>**](../models/BulkRate.md) + + +# **EstimateRates** +```csharp +List<RateEstimate> EstimateRates (EstimateRatesRequestBody estimateRatesRequestBody, CancellationToken cancellationToken = default) + +List<RateEstimate> EstimateRates (HttpClient methodClient, EstimateRatesRequestBody estimateRatesRequestBody, CancellationToken cancellationToken = default) +``` + +Estimate Rates + +Get Rate Estimates + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class EstimateRatesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var estimateRatesRequestBody = new EstimateRatesRequestBody(); + + try + { + // Estimate Rates + List result = await shipEngine.EstimateRates(estimateRatesRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling RatesApi.EstimateRates: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **estimateRatesRequestBody** | [**EstimateRatesRequestBody**](../../docs//models/EstimateRatesRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**List<RateEstimate>**](../models/RateEstimate.md) + + +# **GetRateById** +```csharp +GetRateByIdResponseBody GetRateById (string rateId, CancellationToken cancellationToken = default) + +GetRateByIdResponseBody GetRateById (HttpClient methodClient, string rateId, CancellationToken cancellationToken = default) +``` + +Get Rate By ID + +Retrieve a previously queried rate by its ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetRateByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var rateId = "rateId_example"; + + try + { + // Get Rate By ID + GetRateByIdResponseBody result = await shipEngine.GetRateById(rateId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling RatesApi.GetRateById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **rateId** | **string** | Rate ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetRateByIdResponseBody**](../models/GetRateByIdResponseBody.md) + diff --git a/docs/apis/ServicePointsApi.md b/docs/apis/ServicePointsApi.md new file mode 100644 index 00000000..78ef682c --- /dev/null +++ b/docs/apis/ServicePointsApi.md @@ -0,0 +1,123 @@ +# ServicePoints Methods + +| Method | Description | +|--------|-------------| +| [**ServicePointsGetById**](ServicePointsApi.md#servicepointsgetbyid) | Get Service Point By ID | +| [**ServicePointsList**](ServicePointsApi.md#servicepointslist) | List Service Points | + + +# **ServicePointsGetById** +```csharp +GetServicePointByIdResponseBody ServicePointsGetById (string carrierCode, string countryCode, string servicePointId, CancellationToken cancellationToken = default) + +GetServicePointByIdResponseBody ServicePointsGetById (HttpClient methodClient, string carrierCode, string countryCode, string servicePointId, CancellationToken cancellationToken = default) +``` + +Get Service Point By ID + +Returns a carrier service point by using the service_point_id + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ServicePointsGetByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierCode = stamps_com; + var countryCode = CA; + var servicePointId = 614940; + + try + { + // Get Service Point By ID + GetServicePointByIdResponseBody result = await shipEngine.ServicePointsGetById(carrierCode, countryCode, servicePointId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ServicePointsApi.ServicePointsGetById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierCode** | **string** | Carrier code | | +| **countryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | | +| **servicePointId** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetServicePointByIdResponseBody**](../models/GetServicePointByIdResponseBody.md) + + +# **ServicePointsList** +```csharp +ListServicePointsResponseBody ServicePointsList (GetServicePointsRequest getServicePointsRequest, CancellationToken cancellationToken = default) + +ListServicePointsResponseBody ServicePointsList (HttpClient methodClient, GetServicePointsRequest getServicePointsRequest, CancellationToken cancellationToken = default) +``` + +List Service Points + +List carrier service points by location + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ServicePointsListExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var getServicePointsRequest = new GetServicePointsRequest(); + + try + { + // List Service Points + ListServicePointsResponseBody result = await shipEngine.ServicePointsList(getServicePointsRequest); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ServicePointsApi.ServicePointsList: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **getServicePointsRequest** | [**GetServicePointsRequest**](../../docs//models/GetServicePointsRequest.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListServicePointsResponseBody**](../models/ListServicePointsResponseBody.md) + diff --git a/docs/apis/ShipmentsApi.md b/docs/apis/ShipmentsApi.md new file mode 100644 index 00000000..2885dac2 --- /dev/null +++ b/docs/apis/ShipmentsApi.md @@ -0,0 +1,718 @@ +# Shipments Methods + +| Method | Description | +|--------|-------------| +| [**CancelShipments**](ShipmentsApi.md#cancelshipments) | Cancel a Shipment | +| [**CreateShipments**](ShipmentsApi.md#createshipments) | Create Shipments | +| [**GetShipmentByExternalId**](ShipmentsApi.md#getshipmentbyexternalid) | Get Shipment By External ID | +| [**GetShipmentById**](ShipmentsApi.md#getshipmentbyid) | Get Shipment By ID | +| [**ListShipmentRates**](ShipmentsApi.md#listshipmentrates) | Get Shipment Rates | +| [**ListShipments**](ShipmentsApi.md#listshipments) | List Shipments | +| [**ParseShipment**](ShipmentsApi.md#parseshipment) | Parse shipping info | +| [**ShipmentsListTags**](ShipmentsApi.md#shipmentslisttags) | Get Shipment Tags | +| [**ShipmentsUpdateTags**](ShipmentsApi.md#shipmentsupdatetags) | Update Shipments Tags | +| [**TagShipment**](ShipmentsApi.md#tagshipment) | Add Tag to Shipment | +| [**UntagShipment**](ShipmentsApi.md#untagshipment) | Remove Tag from Shipment | +| [**UpdateShipment**](ShipmentsApi.md#updateshipment) | Update Shipment By ID | + + +# **CancelShipments** +```csharp +string CancelShipments (string shipmentId, CancellationToken cancellationToken = default) + +string CancelShipments (HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default) +``` + +Cancel a Shipment + +Mark a shipment cancelled, if it is no longer needed or being used by your organized. Any label associated with the shipment needs to be voided first An example use case would be if a batch label creation job is going to run at a set time and only queries `pending` shipments. Marking a shipment as cancelled would remove it from this process + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CancelShipmentsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var shipmentId = "shipmentId_example"; + + try + { + // Cancel a Shipment + string result = await shipEngine.CancelShipments(shipmentId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.CancelShipments: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **shipmentId** | **string** | Shipment ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **CreateShipments** +```csharp +CreateShipmentsResponseBody CreateShipments (CreateShipmentsRequestBody createShipmentsRequestBody, CancellationToken cancellationToken = default) + +CreateShipmentsResponseBody CreateShipments (HttpClient methodClient, CreateShipmentsRequestBody createShipmentsRequestBody, CancellationToken cancellationToken = default) +``` + +Create Shipments + +Create one or multiple shipments. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateShipmentsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createShipmentsRequestBody = new CreateShipmentsRequestBody(); + + try + { + // Create Shipments + CreateShipmentsResponseBody result = await shipEngine.CreateShipments(createShipmentsRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.CreateShipments: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createShipmentsRequestBody** | [**CreateShipmentsRequestBody**](../../docs//models/CreateShipmentsRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateShipmentsResponseBody**](../models/CreateShipmentsResponseBody.md) + + +# **GetShipmentByExternalId** +```csharp +GetShipmentByExternalIdResponseBody GetShipmentByExternalId (string externalShipmentId, CancellationToken cancellationToken = default) + +GetShipmentByExternalIdResponseBody GetShipmentByExternalId (HttpClient methodClient, string externalShipmentId, CancellationToken cancellationToken = default) +``` + +Get Shipment By External ID + +Query Shipments created using your own custom ID convention using this endpint + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetShipmentByExternalIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var externalShipmentId = 0bcb569d-1727-4ff9-ab49-b2fec0cee5ae; + + try + { + // Get Shipment By External ID + GetShipmentByExternalIdResponseBody result = await shipEngine.GetShipmentByExternalId(externalShipmentId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.GetShipmentByExternalId: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **externalShipmentId** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetShipmentByExternalIdResponseBody**](../models/GetShipmentByExternalIdResponseBody.md) + + +# **GetShipmentById** +```csharp +GetShipmentByIdResponseBody GetShipmentById (string shipmentId, CancellationToken cancellationToken = default) + +GetShipmentByIdResponseBody GetShipmentById (HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default) +``` + +Get Shipment By ID + +Get an individual shipment based on its ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetShipmentByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var shipmentId = "shipmentId_example"; + + try + { + // Get Shipment By ID + GetShipmentByIdResponseBody result = await shipEngine.GetShipmentById(shipmentId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.GetShipmentById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **shipmentId** | **string** | Shipment ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetShipmentByIdResponseBody**](../models/GetShipmentByIdResponseBody.md) + + +# **ListShipmentRates** +```csharp +ListShipmentRatesResponseBody ListShipmentRates (string shipmentId, DateTimeOffset createdAtStart = null, CancellationToken cancellationToken = default) + +ListShipmentRatesResponseBody ListShipmentRates (HttpClient methodClient, string shipmentId, DateTimeOffset createdAtStart = null, CancellationToken cancellationToken = default) +``` + +Get Shipment Rates + +Get Rates for the shipment information associated with the shipment ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListShipmentRatesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var shipmentId = "shipmentId_example"; + var createdAtStart = 2019-03-12T19:24:13.657Z; + + try + { + // Get Shipment Rates + ListShipmentRatesResponseBody result = await shipEngine.ListShipmentRates(shipmentId, createdAtStart); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.ListShipmentRates: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **shipmentId** | **string** | Shipment ID | | +| **createdAtStart** | **DateTimeOffset** | Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListShipmentRatesResponseBody**](../models/ListShipmentRatesResponseBody.md) + + +# **ListShipments** +```csharp +ListShipmentsResponseBody ListShipments (DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, DateTimeOffset modifiedAtStart = null, DateTimeOffset modifiedAtEnd = null, ShipmentStatus shipmentStatus = null, ShipmentsSortBy sortBy = null, SortDir sortDir = null, string batchId = null, string tag = null, string salesOrderId = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) + +ListShipmentsResponseBody ListShipments (HttpClient methodClient, DateTimeOffset createdAtStart = null, DateTimeOffset createdAtEnd = null, DateTimeOffset modifiedAtStart = null, DateTimeOffset modifiedAtEnd = null, ShipmentStatus shipmentStatus = null, ShipmentsSortBy sortBy = null, SortDir sortDir = null, string batchId = null, string tag = null, string salesOrderId = null, int page = null, int pageSize = null, CancellationToken cancellationToken = default) +``` + +List Shipments + +Get list of Shipments + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListShipmentsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createdAtStart = 2019-03-12T19:24:13.657Z; + var createdAtEnd = 2019-03-12T19:24:13.657Z; + var modifiedAtStart = 2019-03-12T19:24:13.657Z; + var modifiedAtEnd = 2019-03-12T19:24:13.657Z; + var shipmentStatus = (ShipmentStatus) "pending"; + var sortBy = modified_at; + var sortDir = (SortDir) "asc"; + var batchId = "batchId_example"; + var tag = Letters_to_santa; + var salesOrderId = "salesOrderId_example"; + var page = 2; + var pageSize = 50; + + try + { + // List Shipments + ListShipmentsResponseBody result = await shipEngine.ListShipments(createdAtStart, createdAtEnd, modifiedAtStart, modifiedAtEnd, shipmentStatus, sortBy, sortDir, batchId, tag, salesOrderId, page, pageSize); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.ListShipments: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createdAtStart** | **DateTimeOffset** | Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time) | [optional] | +| **createdAtEnd** | **DateTimeOffset** | Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time) | [optional] | +| **modifiedAtStart** | **DateTimeOffset** | Used to create a filter for when a resource was modified (ex. A shipment that was modified after a certain time) | [optional] | +| **modifiedAtEnd** | **DateTimeOffset** | Used to create a filter for when a resource was modified (ex. A shipment that was modified before a certain time) | [optional] | +| **shipmentStatus** | **ShipmentStatus** | | [optional] | +| **sortBy** | **ShipmentsSortBy** | | [optional] | +| **sortDir** | **SortDir** | Controls the sort order of the query. | [optional] | +| **batchId** | **string** | Batch ID | [optional] | +| **tag** | **string** | Search for shipments based on the custom tag added to the shipment object | [optional] | +| **salesOrderId** | **string** | Sales Order ID | [optional] | +| **page** | **int** | 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] | +| **pageSize** | **int** | The number of results to return per response. | [optional] [default to 25] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListShipmentsResponseBody**](../models/ListShipmentsResponseBody.md) + + +# **ParseShipment** +```csharp +ParseShipmentResponseBody ParseShipment (ParseShipmentRequestBody parseShipmentRequestBody, CancellationToken cancellationToken = default) + +ParseShipmentResponseBody ParseShipment (HttpClient methodClient, ParseShipmentRequestBody parseShipmentRequestBody, CancellationToken cancellationToken = default) +``` + +Parse shipping info + +The shipment-recognition API makes it easy for you to extract shipping data from unstructured text, including people's names, addresses, package weights and dimensions, insurance and delivery requirements, and more. Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's shipment-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed shipment data is returned in the same structure that's used for other ShipEngine APIs, so you can easily use the parsed data to create a shipping label. > **Note:** Shipment recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ParseShipmentExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var parseShipmentRequestBody = new ParseShipmentRequestBody(); + + try + { + // Parse shipping info + ParseShipmentResponseBody result = await shipEngine.ParseShipment(parseShipmentRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.ParseShipment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **parseShipmentRequestBody** | [**ParseShipmentRequestBody**](../../docs//models/ParseShipmentRequestBody.md) | The only required field is `text`, which is the text to be parsed. You can optionally also provide a `shipment` containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ParseShipmentResponseBody**](../models/ParseShipmentResponseBody.md) + + +# **ShipmentsListTags** +```csharp +TagShipmentResponseBody ShipmentsListTags (string shipmentId, CancellationToken cancellationToken = default) + +TagShipmentResponseBody ShipmentsListTags (HttpClient methodClient, string shipmentId, CancellationToken cancellationToken = default) +``` + +Get Shipment Tags + +Get Shipment tags based on its ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ShipmentsListTagsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var shipmentId = "shipmentId_example"; + + try + { + // Get Shipment Tags + TagShipmentResponseBody result = await shipEngine.ShipmentsListTags(shipmentId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.ShipmentsListTags: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **shipmentId** | **string** | Shipment ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**TagShipmentResponseBody**](../models/TagShipmentResponseBody.md) + + +# **ShipmentsUpdateTags** +```csharp +void ShipmentsUpdateTags (UpdateShipmentsTagsRequestBody updateShipmentsTagsRequestBody, CancellationToken cancellationToken = default) + +void ShipmentsUpdateTags (HttpClient methodClient, UpdateShipmentsTagsRequestBody updateShipmentsTagsRequestBody, CancellationToken cancellationToken = default) +``` + +Update Shipments Tags + +Update Shipments Tags + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ShipmentsUpdateTagsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var updateShipmentsTagsRequestBody = new UpdateShipmentsTagsRequestBody(); + + try + { + // Update Shipments Tags + shipEngine.ShipmentsUpdateTags(updateShipmentsTagsRequestBody); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.ShipmentsUpdateTags: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **updateShipmentsTagsRequestBody** | [**UpdateShipmentsTagsRequestBody**](../../docs//models/UpdateShipmentsTagsRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +void (empty response body) + + +# **TagShipment** +```csharp +TagShipmentResponseBody TagShipment (string shipmentId, string tagName, CancellationToken cancellationToken = default) + +TagShipmentResponseBody TagShipment (HttpClient methodClient, string shipmentId, string tagName, CancellationToken cancellationToken = default) +``` + +Add Tag to Shipment + +Add a tag to the shipment object + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class TagShipmentExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var shipmentId = "shipmentId_example"; + var tagName = "tagName_example"; + + try + { + // Add Tag to Shipment + TagShipmentResponseBody result = await shipEngine.TagShipment(shipmentId, tagName); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.TagShipment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **shipmentId** | **string** | Shipment ID | | +| **tagName** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**TagShipmentResponseBody**](../models/TagShipmentResponseBody.md) + + +# **UntagShipment** +```csharp +string UntagShipment (string shipmentId, string tagName, CancellationToken cancellationToken = default) + +string UntagShipment (HttpClient methodClient, string shipmentId, string tagName, CancellationToken cancellationToken = default) +``` + +Remove Tag from Shipment + +Remove an existing tag from the Shipment object + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UntagShipmentExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var shipmentId = "shipmentId_example"; + var tagName = "tagName_example"; + + try + { + // Remove Tag from Shipment + string result = await shipEngine.UntagShipment(shipmentId, tagName); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.UntagShipment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **shipmentId** | **string** | Shipment ID | | +| **tagName** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **UpdateShipment** +```csharp +UpdateShipmentResponseBody UpdateShipment (UpdateShipmentRequestBody updateShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) + +UpdateShipmentResponseBody UpdateShipment (HttpClient methodClient, UpdateShipmentRequestBody updateShipmentRequestBody, string shipmentId, CancellationToken cancellationToken = default) +``` + +Update Shipment By ID + +Update a shipment object based on its ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdateShipmentExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var updateShipmentRequestBody = new UpdateShipmentRequestBody(); + var shipmentId = "shipmentId_example"; + + try + { + // Update Shipment By ID + UpdateShipmentResponseBody result = await shipEngine.UpdateShipment(updateShipmentRequestBody, shipmentId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling ShipmentsApi.UpdateShipment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **updateShipmentRequestBody** | [**UpdateShipmentRequestBody**](../../docs//models/UpdateShipmentRequestBody.md) | | | +| **shipmentId** | **string** | Shipment ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**UpdateShipmentResponseBody**](../models/UpdateShipmentResponseBody.md) + diff --git a/docs/apis/TagsApi.md b/docs/apis/TagsApi.md new file mode 100644 index 00000000..5e9041e0 --- /dev/null +++ b/docs/apis/TagsApi.md @@ -0,0 +1,233 @@ +# Tags Methods + +| Method | Description | +|--------|-------------| +| [**CreateTag**](TagsApi.md#createtag) | Create a New Tag | +| [**DeleteTag**](TagsApi.md#deletetag) | Delete Tag | +| [**ListTags**](TagsApi.md#listtags) | Get Tags | +| [**RenameTag**](TagsApi.md#renametag) | Update Tag Name | + + +# **CreateTag** +```csharp +CreateTagResponseBody CreateTag (string tagName, CancellationToken cancellationToken = default) + +CreateTagResponseBody CreateTag (HttpClient methodClient, string tagName, CancellationToken cancellationToken = default) +``` + +Create a New Tag + +Create a new Tag for customizing how you track your shipments + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateTagExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var tagName = "tagName_example"; + + try + { + // Create a New Tag + CreateTagResponseBody result = await shipEngine.CreateTag(tagName); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TagsApi.CreateTag: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **tagName** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateTagResponseBody**](../models/CreateTagResponseBody.md) + + +# **DeleteTag** +```csharp +string DeleteTag (string tagName, CancellationToken cancellationToken = default) + +string DeleteTag (HttpClient methodClient, string tagName, CancellationToken cancellationToken = default) +``` + +Delete Tag + +Delete a tag that is no longer needed + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DeleteTagExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var tagName = "tagName_example"; + + try + { + // Delete Tag + string result = await shipEngine.DeleteTag(tagName); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TagsApi.DeleteTag: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **tagName** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **ListTags** +```csharp +ListTagsResponseBody ListTags (CancellationToken cancellationToken = default) + +ListTagsResponseBody ListTags (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +Get Tags + +Get a list of all tags associated with an account. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListTagsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // Get Tags + ListTagsResponseBody result = await shipEngine.ListTags(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TagsApi.ListTags: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListTagsResponseBody**](../models/ListTagsResponseBody.md) + + +# **RenameTag** +```csharp +string RenameTag (string tagName, string newTagName, CancellationToken cancellationToken = default) + +string RenameTag (HttpClient methodClient, string tagName, string newTagName, CancellationToken cancellationToken = default) +``` + +Update Tag Name + +Change a tag name while still keeping the relevant shipments attached to it + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class RenameTagExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var tagName = "tagName_example"; + var newTagName = "newTagName_example"; + + try + { + // Update Tag Name + string result = await shipEngine.RenameTag(tagName, newTagName); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TagsApi.RenameTag: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **tagName** | **string** | | | +| **newTagName** | **string** | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/apis/TokensApi.md b/docs/apis/TokensApi.md new file mode 100644 index 00000000..44a80275 --- /dev/null +++ b/docs/apis/TokensApi.md @@ -0,0 +1,62 @@ +# Tokens Methods + +| Method | Description | +|--------|-------------| +| [**TokensGetEphemeralToken**](TokensApi.md#tokensgetephemeraltoken) | Get Ephemeral Token | + + +# **TokensGetEphemeralToken** +```csharp +TokensGetEphemeralTokenResponseBodyYaml TokensGetEphemeralToken (Redirect redirect = null, CancellationToken cancellationToken = default) + +TokensGetEphemeralTokenResponseBodyYaml TokensGetEphemeralToken (HttpClient methodClient, Redirect redirect = null, CancellationToken cancellationToken = default) +``` + +Get Ephemeral Token + +This endpoint returns a token that can be passed to an application for authorized access. The lifetime of this token is 10 seconds. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class TokensGetEphemeralTokenExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var redirect = (Redirect) "shipengine-dashboard"; + + try + { + // Get Ephemeral Token + TokensGetEphemeralTokenResponseBodyYaml result = await shipEngine.TokensGetEphemeralToken(redirect); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TokensApi.TokensGetEphemeralToken: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **redirect** | **Redirect** | Include a redirect url to the application formatted with the ephemeral token. | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**TokensGetEphemeralTokenResponseBodyYaml**](../models/TokensGetEphemeralTokenResponseBodyYaml.md) + diff --git a/docs/apis/TrackingApi.md b/docs/apis/TrackingApi.md new file mode 100644 index 00000000..68421037 --- /dev/null +++ b/docs/apis/TrackingApi.md @@ -0,0 +1,182 @@ +# Tracking Methods + +| Method | Description | +|--------|-------------| +| [**GetTrackingLog**](TrackingApi.md#gettrackinglog) | Get Tracking Information | +| [**StartTracking**](TrackingApi.md#starttracking) | Start Tracking a Package | +| [**StopTracking**](TrackingApi.md#stoptracking) | Stop Tracking a Package | + + +# **GetTrackingLog** +```csharp +GetTrackingLogResponseBody GetTrackingLog (string carrierCode = null, string trackingNumber = null, CancellationToken cancellationToken = default) + +GetTrackingLogResponseBody GetTrackingLog (HttpClient methodClient, string carrierCode = null, string trackingNumber = null, CancellationToken cancellationToken = default) +``` + +Get Tracking Information + +Retrieve package tracking information + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetTrackingLogExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierCode = stamps_com; + var trackingNumber = 9405511899223197428490; + + try + { + // Get Tracking Information + GetTrackingLogResponseBody result = await shipEngine.GetTrackingLog(carrierCode, trackingNumber); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TrackingApi.GetTrackingLog: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] | +| **trackingNumber** | **string** | The tracking number associated with a shipment | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetTrackingLogResponseBody**](../models/GetTrackingLogResponseBody.md) + + +# **StartTracking** +```csharp +string StartTracking (string carrierCode = null, string trackingNumber = null, CancellationToken cancellationToken = default) + +string StartTracking (HttpClient methodClient, string carrierCode = null, string trackingNumber = null, CancellationToken cancellationToken = default) +``` + +Start Tracking a Package + +Allows you to subscribe to tracking updates for a package. You specify the carrier_code and tracking_number of the package, and receive notifications via webhooks whenever the shipping status changes. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class StartTrackingExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierCode = stamps_com; + var trackingNumber = 9405511899223197428490; + + try + { + // Start Tracking a Package + string result = await shipEngine.StartTracking(carrierCode, trackingNumber); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TrackingApi.StartTracking: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] | +| **trackingNumber** | **string** | The tracking number associated with a shipment | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **StopTracking** +```csharp +string StopTracking (string carrierCode = null, string trackingNumber = null, CancellationToken cancellationToken = default) + +string StopTracking (HttpClient methodClient, string carrierCode = null, string trackingNumber = null, CancellationToken cancellationToken = default) +``` + +Stop Tracking a Package + +Unsubscribe from tracking updates for a package. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class StopTrackingExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var carrierCode = stamps_com; + var trackingNumber = 9405511899223197428490; + + try + { + // Stop Tracking a Package + string result = await shipEngine.StopTracking(carrierCode, trackingNumber); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling TrackingApi.StopTracking: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **carrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] | +| **trackingNumber** | **string** | The tracking number associated with a shipment | [optional] | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/apis/WarehousesApi.md b/docs/apis/WarehousesApi.md new file mode 100644 index 00000000..07ddd9d9 --- /dev/null +++ b/docs/apis/WarehousesApi.md @@ -0,0 +1,349 @@ +# Warehouses Methods + +| Method | Description | +|--------|-------------| +| [**CreateWarehouse**](WarehousesApi.md#createwarehouse) | Create Warehouse | +| [**DeleteWarehouse**](WarehousesApi.md#deletewarehouse) | Delete Warehouse By ID | +| [**GetWarehouseById**](WarehousesApi.md#getwarehousebyid) | Get Warehouse By Id | +| [**ListWarehouses**](WarehousesApi.md#listwarehouses) | List Warehouses | +| [**UpdateWarehouse**](WarehousesApi.md#updatewarehouse) | Update Warehouse By Id | +| [**UpdateWarehouseSettings**](WarehousesApi.md#updatewarehousesettings) | Update Warehouse Settings | + + +# **CreateWarehouse** +```csharp +CreateWarehouseResponseBody CreateWarehouse (CreateWarehouseRequestBody createWarehouseRequestBody, CancellationToken cancellationToken = default) + +CreateWarehouseResponseBody CreateWarehouse (HttpClient methodClient, CreateWarehouseRequestBody createWarehouseRequestBody, CancellationToken cancellationToken = default) +``` + +Create Warehouse + +Create a warehouse location that you can use to create shipping items by simply passing in the generated warehouse id. If the return address is not supplied in the request body then it is assumed that the origin address is the return address as well + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateWarehouseExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createWarehouseRequestBody = new CreateWarehouseRequestBody(); + + try + { + // Create Warehouse + CreateWarehouseResponseBody result = await shipEngine.CreateWarehouse(createWarehouseRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WarehousesApi.CreateWarehouse: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createWarehouseRequestBody** | [**CreateWarehouseRequestBody**](../../docs//models/CreateWarehouseRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateWarehouseResponseBody**](../models/CreateWarehouseResponseBody.md) + + +# **DeleteWarehouse** +```csharp +string DeleteWarehouse (string warehouseId, CancellationToken cancellationToken = default) + +string DeleteWarehouse (HttpClient methodClient, string warehouseId, CancellationToken cancellationToken = default) +``` + +Delete Warehouse By ID + +Delete a warehouse by ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DeleteWarehouseExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var warehouseId = "warehouseId_example"; + + try + { + // Delete Warehouse By ID + string result = await shipEngine.DeleteWarehouse(warehouseId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WarehousesApi.DeleteWarehouse: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **warehouseId** | **string** | Warehouse ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **GetWarehouseById** +```csharp +GetWarehouseByIdResponseBody GetWarehouseById (string warehouseId, CancellationToken cancellationToken = default) + +GetWarehouseByIdResponseBody GetWarehouseById (HttpClient methodClient, string warehouseId, CancellationToken cancellationToken = default) +``` + +Get Warehouse By Id + +Retrieve warehouse data based on the warehouse ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetWarehouseByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var warehouseId = "warehouseId_example"; + + try + { + // Get Warehouse By Id + GetWarehouseByIdResponseBody result = await shipEngine.GetWarehouseById(warehouseId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WarehousesApi.GetWarehouseById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **warehouseId** | **string** | Warehouse ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetWarehouseByIdResponseBody**](../models/GetWarehouseByIdResponseBody.md) + + +# **ListWarehouses** +```csharp +ListWarehousesResponseBody ListWarehouses (CancellationToken cancellationToken = default) + +ListWarehousesResponseBody ListWarehouses (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +List Warehouses + +Retrieve a list of warehouses associated with this account. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListWarehousesExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // List Warehouses + ListWarehousesResponseBody result = await shipEngine.ListWarehouses(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WarehousesApi.ListWarehouses: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**ListWarehousesResponseBody**](../models/ListWarehousesResponseBody.md) + + +# **UpdateWarehouse** +```csharp +string UpdateWarehouse (UpdateWarehouseRequestBody updateWarehouseRequestBody, string warehouseId, CancellationToken cancellationToken = default) + +string UpdateWarehouse (HttpClient methodClient, UpdateWarehouseRequestBody updateWarehouseRequestBody, string warehouseId, CancellationToken cancellationToken = default) +``` + +Update Warehouse By Id + +Update Warehouse object information + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdateWarehouseExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var updateWarehouseRequestBody = new UpdateWarehouseRequestBody(); + var warehouseId = "warehouseId_example"; + + try + { + // Update Warehouse By Id + string result = await shipEngine.UpdateWarehouse(updateWarehouseRequestBody, warehouseId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WarehousesApi.UpdateWarehouse: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **updateWarehouseRequestBody** | [**UpdateWarehouseRequestBody**](../../docs//models/UpdateWarehouseRequestBody.md) | | | +| **warehouseId** | **string** | Warehouse ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **UpdateWarehouseSettings** +```csharp +string UpdateWarehouseSettings (UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, string warehouseId, CancellationToken cancellationToken = default) + +string UpdateWarehouseSettings (HttpClient methodClient, UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, string warehouseId, CancellationToken cancellationToken = default) +``` + +Update Warehouse Settings + +Update Warehouse settings object information + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdateWarehouseSettingsExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var updateWarehouseSettingsRequestBody = new UpdateWarehouseSettingsRequestBody(); + var warehouseId = "warehouseId_example"; + + try + { + // Update Warehouse Settings + string result = await shipEngine.UpdateWarehouseSettings(updateWarehouseSettingsRequestBody, warehouseId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WarehousesApi.UpdateWarehouseSettings: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **updateWarehouseSettingsRequestBody** | [**UpdateWarehouseSettingsRequestBody**](../../docs//models/UpdateWarehouseSettingsRequestBody.md) | | | +| **warehouseId** | **string** | Warehouse ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/apis/WebhooksApi.md b/docs/apis/WebhooksApi.md new file mode 100644 index 00000000..8638f7b8 --- /dev/null +++ b/docs/apis/WebhooksApi.md @@ -0,0 +1,290 @@ +# Webhooks Methods + +| Method | Description | +|--------|-------------| +| [**CreateWebhook**](WebhooksApi.md#createwebhook) | Create a Webhook | +| [**DeleteWebhook**](WebhooksApi.md#deletewebhook) | Delete Webhook By ID | +| [**GetWebhookById**](WebhooksApi.md#getwebhookbyid) | Get Webhook By ID | +| [**ListWebhooks**](WebhooksApi.md#listwebhooks) | List Webhooks | +| [**UpdateWebhook**](WebhooksApi.md#updatewebhook) | Update a Webhook | + + +# **CreateWebhook** +```csharp +CreateWebhookResponseBody CreateWebhook (CreateWebhookRequestBody createWebhookRequestBody, CancellationToken cancellationToken = default) + +CreateWebhookResponseBody CreateWebhook (HttpClient methodClient, CreateWebhookRequestBody createWebhookRequestBody, CancellationToken cancellationToken = default) +``` + +Create a Webhook + +Create a webook for specific events in the environment. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class CreateWebhookExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var createWebhookRequestBody = new CreateWebhookRequestBody(); + + try + { + // Create a Webhook + CreateWebhookResponseBody result = await shipEngine.CreateWebhook(createWebhookRequestBody); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WebhooksApi.CreateWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **createWebhookRequestBody** | [**CreateWebhookRequestBody**](../../docs//models/CreateWebhookRequestBody.md) | | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**CreateWebhookResponseBody**](../models/CreateWebhookResponseBody.md) + + +# **DeleteWebhook** +```csharp +string DeleteWebhook (string webhookId, CancellationToken cancellationToken = default) + +string DeleteWebhook (HttpClient methodClient, string webhookId, CancellationToken cancellationToken = default) +``` + +Delete Webhook By ID + +Delete a webhook + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class DeleteWebhookExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var webhookId = "webhookId_example"; + + try + { + // Delete Webhook By ID + string result = await shipEngine.DeleteWebhook(webhookId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WebhooksApi.DeleteWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **webhookId** | **string** | Webhook ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + + +# **GetWebhookById** +```csharp +GetWebhookByIdResponseBody GetWebhookById (string webhookId, CancellationToken cancellationToken = default) + +GetWebhookByIdResponseBody GetWebhookById (HttpClient methodClient, string webhookId, CancellationToken cancellationToken = default) +``` + +Get Webhook By ID + +Retrieve individual webhook by an ID + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class GetWebhookByIdExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var webhookId = "webhookId_example"; + + try + { + // Get Webhook By ID + GetWebhookByIdResponseBody result = await shipEngine.GetWebhookById(webhookId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WebhooksApi.GetWebhookById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **webhookId** | **string** | Webhook ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**GetWebhookByIdResponseBody**](../models/GetWebhookByIdResponseBody.md) + + +# **ListWebhooks** +```csharp +List<Webhook> ListWebhooks (CancellationToken cancellationToken = default) + +List<Webhook> ListWebhooks (HttpClient methodClient, CancellationToken cancellationToken = default) +``` + +List Webhooks + +List all webhooks currently enabled for the account. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class ListWebhooksExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + + try + { + // List Webhooks + List result = await shipEngine.ListWebhooks(); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WebhooksApi.ListWebhooks: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +[**List<Webhook>**](../models/Webhook.md) + + +# **UpdateWebhook** +```csharp +string UpdateWebhook (UpdateWebhookRequestBody updateWebhookRequestBody, string webhookId, CancellationToken cancellationToken = default) + +string UpdateWebhook (HttpClient methodClient, UpdateWebhookRequestBody updateWebhookRequestBody, string webhookId, CancellationToken cancellationToken = default) +``` + +Update a Webhook + +Update the webhook url property + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using ShipEngineSDK; +using ShipEngineSDK.Model; + +namespace Example +{ + public class UpdateWebhookExample + { + public static async Task Main() + { + var shipEngine = new ShipEngine("api_key"); + var updateWebhookRequestBody = new UpdateWebhookRequestBody(); + var webhookId = "webhookId_example"; + + try + { + // Update a Webhook + string result = await shipEngine.UpdateWebhook(updateWebhookRequestBody, webhookId); + Debug.WriteLine(result); + } + catch (ShipEngineException e) + { + Debug.Print("Exception when calling WebhooksApi.UpdateWebhook: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | +| **updateWebhookRequestBody** | [**UpdateWebhookRequestBody**](../../docs//models/UpdateWebhookRequestBody.md) | | | +| **webhookId** | **string** | Webhook ID | | +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | + +### Return type + +**string** + diff --git a/docs/CreateLabelFromRate.md b/docs/legacy/CreateLabelFromRate.md similarity index 100% rename from docs/CreateLabelFromRate.md rename to docs/legacy/CreateLabelFromRate.md diff --git a/docs/CreateLabelFromShipmentDetails.md b/docs/legacy/CreateLabelFromShipmentDetails.md similarity index 100% rename from docs/CreateLabelFromShipmentDetails.md rename to docs/legacy/CreateLabelFromShipmentDetails.md diff --git a/docs/CreateManifest.md b/docs/legacy/CreateManifest.md similarity index 100% rename from docs/CreateManifest.md rename to docs/legacy/CreateManifest.md diff --git a/docs/GetRatesWithShipmentDetails.md b/docs/legacy/GetRatesWithShipmentDetails.md similarity index 100% rename from docs/GetRatesWithShipmentDetails.md rename to docs/legacy/GetRatesWithShipmentDetails.md diff --git a/docs/ListCarriers.md b/docs/legacy/ListCarriers.md similarity index 100% rename from docs/ListCarriers.md rename to docs/legacy/ListCarriers.md diff --git a/docs/TrackUsingCarrierCodeAndTrackingNumber.md b/docs/legacy/TrackUsingCarrierCodeAndTrackingNumber.md similarity index 100% rename from docs/TrackUsingCarrierCodeAndTrackingNumber.md rename to docs/legacy/TrackUsingCarrierCodeAndTrackingNumber.md diff --git a/docs/TrackUsingLabelID.md b/docs/legacy/TrackUsingLabelID.md similarity index 100% rename from docs/TrackUsingLabelID.md rename to docs/legacy/TrackUsingLabelID.md diff --git a/docs/ValidateAddresses.md b/docs/legacy/ValidateAddresses.md similarity index 100% rename from docs/ValidateAddresses.md rename to docs/legacy/ValidateAddresses.md diff --git a/docs/VoidLabelWithLabelId.md b/docs/legacy/VoidLabelWithLabelId.md similarity index 100% rename from docs/VoidLabelWithLabelId.md rename to docs/legacy/VoidLabelWithLabelId.md diff --git a/docs/models/AccountSettings.md b/docs/models/AccountSettings.md new file mode 100644 index 00000000..bc3938cd --- /dev/null +++ b/docs/models/AccountSettings.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.AccountSettings +A ShipEngine account settings response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultLabelLayout** | **DefaultLabelLayout** | | [optional] + diff --git a/docs/models/AccountSettingsImages.md b/docs/models/AccountSettingsImages.md new file mode 100644 index 00000000..0532d36b --- /dev/null +++ b/docs/models/AccountSettingsImages.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.AccountSettingsImages +A ShipEngine account images body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **DateTimeOffset** | The date and time that the image was created in ShipEngine. | [optional] [readonly] +**ImageContentType** | **string** | The image type | [optional] +**ImageData** | **string** | A base64 encoded string representation of the image. | [optional] +**IsDefault** | **bool** | Indicates whether this image is set as default. | [optional] +**LabelImageId** | **string** | A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. | [optional] [readonly] +**ModifiedAt** | **DateTimeOffset** | The date and time that the image was modified in ShipEngine. | [optional] [readonly] +**Name** | **string** | A human readable name for the image. | [optional] + diff --git a/docs/models/AddFundsToCarrierRequestBody.md b/docs/models/AddFundsToCarrierRequestBody.md new file mode 100644 index 00000000..8c14280d --- /dev/null +++ b/docs/models/AddFundsToCarrierRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AddFundsToCarrierRequestBody +An add funds to carrier request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **decimal** | The monetary amount, in the specified currency. | +**Currency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | + diff --git a/docs/models/AddFundsToCarrierResponseBody.md b/docs/models/AddFundsToCarrierResponseBody.md new file mode 100644 index 00000000..ea8647e1 --- /dev/null +++ b/docs/models/AddFundsToCarrierResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.AddFundsToCarrierResponseBody +The current balance of the requested carrier account + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Balance** | [**MonetaryValue**](MonetaryValue.md) | The current balance of the account | [readonly] + diff --git a/docs/models/AddFundsToInsuranceRequestBody.md b/docs/models/AddFundsToInsuranceRequestBody.md new file mode 100644 index 00000000..6eeb6222 --- /dev/null +++ b/docs/models/AddFundsToInsuranceRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AddFundsToInsuranceRequestBody +An add funds to insurance request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **decimal** | The monetary amount, in the specified currency. | +**Currency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | + diff --git a/docs/models/AddFundsToInsuranceResponseBody.md b/docs/models/AddFundsToInsuranceResponseBody.md new file mode 100644 index 00000000..836554e4 --- /dev/null +++ b/docs/models/AddFundsToInsuranceResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AddFundsToInsuranceResponseBody +Add funds to insurance response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **decimal** | The monetary amount, in the specified currency. | +**Currency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | + diff --git a/docs/models/AddToBatchRequestBody.md b/docs/models/AddToBatchRequestBody.md new file mode 100644 index 00000000..7dd8aee0 --- /dev/null +++ b/docs/models/AddToBatchRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AddToBatchRequestBody +An add to batch request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RateIds** | **List<string>** | Array of Rate IDs to be modifed on the batch | [optional] +**ShipmentIds** | **List<string>** | The Shipment Ids to be modified on the batch | [optional] + diff --git a/docs/models/Address.md b/docs/models/Address.md new file mode 100644 index 00000000..3a74628f --- /dev/null +++ b/docs/models/Address.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.Address +Any residential or business mailing address, anywhere in the world. > **Note:** Either `name` or `company_name` must be set. Both may be specified, if relevant. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | +**CityLocality** | **string** | The name of the city or locality | +**Name** | **string** | The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. | +**PostalCode** | **string** | postal code | +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | +**AddressLine2** | **string** | The second line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressLine3** | **string** | The third line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressResidentialIndicator** | **AddressResidentialIndicator** | Indicates whether this is a residential address. | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**CountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**Email** | **string** | Email for the address owner. | [optional] +**Phone** | **string** | The phone number of a contact person at this address. The format of this phone number varies depending on the country. | [optional] + diff --git a/docs/models/AddressResidentialIndicator.md b/docs/models/AddressResidentialIndicator.md new file mode 100644 index 00000000..76e32d1b --- /dev/null +++ b/docs/models/AddressResidentialIndicator.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.AddressResidentialIndicator +Indicates whether an address is residential. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/AddressToValidate.md b/docs/models/AddressToValidate.md new file mode 100644 index 00000000..0d99a543 --- /dev/null +++ b/docs/models/AddressToValidate.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.AddressToValidate +Any residential or business mailing address, anywhere in the world. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | +**CityLocality** | **string** | The name of the city or locality | +**CountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | +**AddressLine2** | **string** | The second line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressLine3** | **string** | The third line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressResidentialIndicator** | **AddressResidentialIndicator** | Indicates whether this is a residential address. | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**Email** | **string** | Email for the address owner. | [optional] +**Name** | **string** | The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. | [optional] +**Phone** | **string** | The phone number of a contact person at this address. The format of this phone number varies depending on the country. | [optional] +**PostalCode** | **string** | postal code | [optional] + diff --git a/docs/models/AddressValidatingShipment.md b/docs/models/AddressValidatingShipment.md new file mode 100644 index 00000000..997446a7 --- /dev/null +++ b/docs/models/AddressValidatingShipment.md @@ -0,0 +1,36 @@ +# ShipEngineSDK.Model.AddressValidatingShipment +An address validating shipment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | [optional] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [optional] [readonly] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | [optional] +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [optional] [readonly] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | [optional] +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | [optional] +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [optional] [readonly] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [optional] [readonly] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | [optional] + diff --git a/docs/models/AddressValidationCode.md b/docs/models/AddressValidationCode.md new file mode 100644 index 00000000..117771b0 --- /dev/null +++ b/docs/models/AddressValidationCode.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.AddressValidationCode +The error codes that can be returned by the address validation API + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/AddressValidationDetailCode.md b/docs/models/AddressValidationDetailCode.md new file mode 100644 index 00000000..4fd32647 --- /dev/null +++ b/docs/models/AddressValidationDetailCode.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.AddressValidationDetailCode +The detailed error codes that can be returned by the address validation API + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/AddressValidationMessageType.md b/docs/models/AddressValidationMessageType.md new file mode 100644 index 00000000..e60ed337 --- /dev/null +++ b/docs/models/AddressValidationMessageType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.AddressValidationMessageType +The different types of messages that can be returned by the address validation API + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/AddressValidationResult.md b/docs/models/AddressValidationResult.md new file mode 100644 index 00000000..4c823adf --- /dev/null +++ b/docs/models/AddressValidationResult.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.AddressValidationResult +An address validation result + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**List<ResponseMessage>**](ResponseMessage.md) | The list of messages that were generated during the address validation request. | [readonly] +**OriginalAddress** | [**Address**](Address.md) | The original address that was sent for validation | +**Status** | **AddressValidationStatus** | | +**MatchedAddress** | [**Address**](Address.md) | The matched address found by the Shipengine API | [readonly] + diff --git a/docs/models/AddressValidationStatus.md b/docs/models/AddressValidationStatus.md new file mode 100644 index 00000000..8183eca6 --- /dev/null +++ b/docs/models/AddressValidationStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.AddressValidationStatus +The possible address validation status values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/AdvancedShipmentOptions.md b/docs/models/AdvancedShipmentOptions.md new file mode 100644 index 00000000..bd0c4db8 --- /dev/null +++ b/docs/models/AdvancedShipmentOptions.md @@ -0,0 +1,35 @@ +# ShipEngineSDK.Model.AdvancedShipmentOptions +Advanced shipment options + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalHandling** | **bool** | Indicate to the carrier that this shipment requires additional handling. | [optional] +**BillToAccount** | **string** | This field is used to [bill shipping costs to a third party](https://www.shipengine.com/docs/shipping/bill-to-third-party/). This field must be used in conjunction with the `bill_to_country_code`, `bill_to_party`, and `bill_to_postal_code` fields. | [optional] +**BillToCountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the third-party that is responsible for shipping costs. | [optional] +**BillToParty** | **BillToParty** | Indicates whether to bill shipping costs to the recipient or to a third-party. When billing to a third-party, the `bill_to_account`, `bill_to_country_code`, and `bill_to_postal_code` fields must also be set. | [optional] +**BillToPostalCode** | **string** | The postal code of the third-party that is responsible for shipping costs. | [optional] +**CertificateNumber** | **string** | certificate number. | [optional] +**CollectOnDelivery** | [**CollectOnDelivery**](CollectOnDelivery.md) | | [optional] +**ContainsAlcohol** | **bool** | Indicates that the shipment contains alcohol. | [optional] [default to false] +**CustomField1** | **string** | An arbitrary field that can be used to store information about the shipment. | [optional] +**CustomField2** | **string** | An arbitrary field that can be used to store information about the shipment. | [optional] +**CustomField3** | **string** | An arbitrary field that can be used to store information about the shipment. | [optional] +**DangerousGoods** | **bool** | Indicates if the Dangerous goods are present in the shipment | [optional] [default to false] +**DangerousGoodsContact** | [**AdvancedShipmentOptionsDangerousGoodsContact**](AdvancedShipmentOptionsDangerousGoodsContact.md) | | [optional] +**DeliveredDutyPaid** | **bool** | Indicates that the shipper is paying the international delivery duties for this shipment. This option is supported by UPS, FedEx, and DHL Express. | [optional] [default to false] +**DryIce** | **bool** | Indicates if the shipment contain dry ice | [optional] [default to false] +**DryIceWeight** | [**Weight**](Weight.md) | The weight of the dry ice in the shipment | [optional] +**FedexFreight** | [**AdvancedShipmentOptionsFedexFreight**](AdvancedShipmentOptionsFedexFreight.md) | | [optional] +**FreightClass** | **string** | The National Motor Freight Traffic Association [freight class](http://www.nmfta.org/pages/nmfc?AspxAutoDetectCookieSupport=1), such as \"77.5\", \"110\", or \"250\". | [optional] +**InvoiceNumber** | **string** | invoice number. | [optional] +**LicenseNumber** | **string** | license number. | [optional] +**NonMachinable** | **bool** | Indicates that the package cannot be processed automatically because it is too large or irregularly shaped. This is primarily for USPS shipments. See [Section 1.2 of the USPS parcel standards](https://pe.usps.com/text/dmm300/101.htm#ep1047495) for details. | [optional] [default to false] +**OriginType** | **OriginType** | | [optional] +**SaturdayDelivery** | **bool** | Enables Saturday delivery, if supported by the carrier. | [optional] [default to false] +**ShipperRelease** | **bool** | | [optional] +**ThirdPartyConsignee** | **bool** | Third Party Consignee option is a value-added service that allows the shipper to supply goods without commercial invoices being attached | [optional] [default to false] +**UseUpsGroundFreightPricing** | **bool** | Whether to use [UPS Ground Freight pricing](https://www.shipengine.com/docs/shipping/ups-ground-freight/). If enabled, then a `freight_class` must also be specified. | [optional] +**WindsorFrameworkDetails** | [**AdvancedShipmentOptionsWindsorFrameworkDetails**](AdvancedShipmentOptionsWindsorFrameworkDetails.md) | | [optional] + diff --git a/docs/models/AdvancedShipmentOptionsDangerousGoodsContact.md b/docs/models/AdvancedShipmentOptionsDangerousGoodsContact.md new file mode 100644 index 00000000..36dbbe6b --- /dev/null +++ b/docs/models/AdvancedShipmentOptionsDangerousGoodsContact.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact +Contact information for Dangerous goods + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the contact | [optional] +**Phone** | **string** | Phone number of the contact | [optional] + diff --git a/docs/models/AdvancedShipmentOptionsFedexFreight.md b/docs/models/AdvancedShipmentOptionsFedexFreight.md new file mode 100644 index 00000000..e1e57df7 --- /dev/null +++ b/docs/models/AdvancedShipmentOptionsFedexFreight.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight +Provide details for the Fedex freight service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BookingConfirmation** | **string** | | [optional] +**ShipperLoadAndCount** | **string** | | [optional] + diff --git a/docs/models/AdvancedShipmentOptionsWindsorFrameworkDetails.md b/docs/models/AdvancedShipmentOptionsWindsorFrameworkDetails.md new file mode 100644 index 00000000..cc921168 --- /dev/null +++ b/docs/models/AdvancedShipmentOptionsWindsorFrameworkDetails.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AdvancedShipmentOptionsWindsorFrameworkDetails +The Windsor framework is a new regulation in the UK that simplifies customs procedures for goods moved from the UK mainland to Northern Ireland. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MovementIndicator** | **string** | An indicator that will tell the carrier and HMRC the type of movement for the shipment. | [optional] +**NotAtRisk** | **bool** | An indicator that allows a shipper to declare the shipment as not-at-risk. | [optional] + diff --git a/docs/models/AllowedIncoterms.md b/docs/models/AllowedIncoterms.md new file mode 100644 index 00000000..b8a1f211 --- /dev/null +++ b/docs/models/AllowedIncoterms.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.AllowedIncoterms + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/AlternativeIdentifier.md b/docs/models/AlternativeIdentifier.md new file mode 100644 index 00000000..aab4de65 --- /dev/null +++ b/docs/models/AlternativeIdentifier.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.AlternativeIdentifier +Additional information some carriers may provide by which to identify a given label in their system. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of alternative_identifier that corresponds to the value. | [optional] +**Value** | **string** | The value of the alternative_identifier. | [optional] + diff --git a/docs/models/AlternativeIdentifiers.md b/docs/models/AlternativeIdentifiers.md new file mode 100644 index 00000000..55a61ed6 --- /dev/null +++ b/docs/models/AlternativeIdentifiers.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.AlternativeIdentifiers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VarAlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Alternative identifiers associated with this package. | [optional] [readonly] + diff --git a/docs/models/AncillaryServiceEndorsement.md b/docs/models/AncillaryServiceEndorsement.md new file mode 100644 index 00000000..6026e15a --- /dev/null +++ b/docs/models/AncillaryServiceEndorsement.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.AncillaryServiceEndorsement +[Ancillary service endorsements](https://pe.usps.com/text/qsg300/Q507.htm) are used by mailers to request an addressee's new address and to provide the carrier with instructions on how to handle packages that are undeliverable as addressed. | Ancillary Service Endorsement | Description |- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | `none` | No ancillary service is requested. Depending on the carrier servive, the package may be forwarded, returned, or discarded. | `return_service_requested` | The package is returned to the sender. If possible, notification of the new address is is included with the returned package. | `forwarding_service_requested` | Forward the package to the new address, if possible; otherwise, return it to the sender. | `address_service_requested` | Forward the package to the new address, if possible; otherwise, return it to the sender. This is similar to `forwarding_service_requested`, but different restrictions and charges may apply. | `change_service_requested` | The package is discarded. If possible, notification of the new address is sent to the sender. | `leave_if_no_response` | + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/Batch.md b/docs/models/Batch.md new file mode 100644 index 00000000..39e875c0 --- /dev/null +++ b/docs/models/Batch.md @@ -0,0 +1,29 @@ +# ShipEngineSDK.Model.Batch +Batches are an advanced feature of ShipEngine designed for users who need to generate hundreds or thousands of labels at a time. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchErrorsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch errors endpoint | [readonly] +**BatchId** | **string** | A string that uniquely identifies the batch | [readonly] +**BatchLabelsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch labels query | +**BatchNumber** | **string** | The batch number. | [readonly] +**BatchShipmentsUrl** | [**OptionalLink**](OptionalLink.md) | The batch shipments endpoint | +**Completed** | **int** | The number of labels generated in the batch | [readonly] +**Count** | **int** | The total of errors, warnings, and completed properties | [readonly] +**CreatedAt** | **DateTimeOffset** | The date and time the batch was created in ShipEngine | [readonly] +**Errors** | **int** | The number of errors that occurred while generating the batch | [readonly] +**FormDownload** | [**OptionalLink**](OptionalLink.md) | The form download for any customs that are needed | [readonly] +**Forms** | **int** | The number of forms for customs that are available for download | [readonly] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | The label download for the batch | [readonly] +**LabelFormat** | **LabelFormat** | | [readonly] +**LabelLayout** | **LabelLayout** | label layout | [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [readonly] +**ProcessErrors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**Status** | **BatchStatus** | | [readonly] +**Warnings** | **int** | The number of warnings that occurred while generating the batch | [readonly] +**BatchNotes** | **string** | Custom notes you can add for each created batch | [readonly] [default to ""] +**ExternalBatchId** | **string** | A string that uniquely identifies the external batch | [readonly] +**ProcessedAt** | **DateTimeOffset** | The date and time the batch was processed in ShipEngine | [readonly] + diff --git a/docs/models/BatchResponseError.md b/docs/models/BatchResponseError.md new file mode 100644 index 00000000..eb2809a4 --- /dev/null +++ b/docs/models/BatchResponseError.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.BatchResponseError +A batch response error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | Error message associated with the shipment. | [optional] [readonly] +**ExternalShipmentId** | **string** | An external shipment id associated with the shipment | [optional] [readonly] +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [optional] [readonly] + diff --git a/docs/models/BatchStatus.md b/docs/models/BatchStatus.md new file mode 100644 index 00000000..e6e921e0 --- /dev/null +++ b/docs/models/BatchStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.BatchStatus +The possible batch status values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/BatchesSortBy.md b/docs/models/BatchesSortBy.md new file mode 100644 index 00000000..34e83ed6 --- /dev/null +++ b/docs/models/BatchesSortBy.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.BatchesSortBy +The possible batches sort by values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/BillToParty.md b/docs/models/BillToParty.md new file mode 100644 index 00000000..99f167c5 --- /dev/null +++ b/docs/models/BillToParty.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.BillToParty +The possible bill to party values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/BulkRate.md b/docs/models/BulkRate.md new file mode 100644 index 00000000..b3cceab9 --- /dev/null +++ b/docs/models/BulkRate.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.BulkRate +A bulk rate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [readonly] +**Errors** | [**List<Error>**](Error.md) | An array of errors that were returned while retrieving the bulk rate | [readonly] +**RateRequestId** | **string** | A string that uniquely identifies the rate request | [readonly] +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**Status** | **RateResponseStatus** | | [readonly] + diff --git a/docs/models/CalculateRatesRequestBody.md b/docs/models/CalculateRatesRequestBody.md new file mode 100644 index 00000000..f6bf988d --- /dev/null +++ b/docs/models/CalculateRatesRequestBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.CalculateRatesRequestBody +A rate shipment request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RateOptions** | [**RateRequestBody**](RateRequestBody.md) | The rate options | [optional] + diff --git a/docs/models/CalculateRatesResponseBody.md b/docs/models/CalculateRatesResponseBody.md new file mode 100644 index 00000000..fabd9823 --- /dev/null +++ b/docs/models/CalculateRatesResponseBody.md @@ -0,0 +1,36 @@ +# ShipEngineSDK.Model.CalculateRatesResponseBody +A rate shipment response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [readonly] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [readonly] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | +**RateResponse** | [**RatesInformation**](RatesInformation.md) | The rates response | +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [readonly] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [readonly] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [readonly] +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | [optional] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | [optional] +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | [optional] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | [optional] + diff --git a/docs/models/Carrier.md b/docs/models/Carrier.md new file mode 100644 index 00000000..c2f9cc0d --- /dev/null +++ b/docs/models/Carrier.md @@ -0,0 +1,23 @@ +# ShipEngineSDK.Model.Carrier +A carrier object that represents a provider such as UPS, USPS, DHL, etc that has been tied to the current account. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | The account number that the carrier is connected to. | [optional] [readonly] +**Balance** | **decimal** | Current available balance | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | A string that uniquely identifies the carrier. | [optional] [readonly] +**DisabledByBillingPlan** | **bool** | The carrier is disabled by the current ShipEngine account's billing plan. | [optional] [readonly] +**FriendlyName** | **string** | Screen readable name | [optional] [readonly] +**FundingSourceId** | **string** | Funding source ID for the carrier | [optional] [readonly] +**HasMultiPackageSupportingServices** | **bool** | Carrier supports multiple packages per shipment | [optional] [readonly] +**Nickname** | **string** | Nickname given to the account when initially setting up the carrier. | [optional] [readonly] +**Options** | [**List<CarrierAdvancedOption>**](CarrierAdvancedOption.md) | A list of options that are available to that carrier | [optional] [readonly] +**Packages** | [**List<PackageType>**](PackageType.md) | A list of package types that are supported by the carrier | [optional] [readonly] +**Primary** | **bool** | Is this the primary carrier that is used by default when no carrier is specified in label/shipment creation | [optional] [readonly] +**RequiresFundedAmount** | **bool** | Indicates whether the carrier requires funding to use its services | [optional] [readonly] +**Services** | [**List<Service>**](Service.md) | A list of services that are offered by the carrier | [optional] [readonly] +**SupportsLabelMessages** | **bool** | The carrier supports adding custom label messages to an order. | [optional] [readonly] + diff --git a/docs/models/CarrierAdvancedOption.md b/docs/models/CarrierAdvancedOption.md new file mode 100644 index 00000000..6b297a7b --- /dev/null +++ b/docs/models/CarrierAdvancedOption.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.CarrierAdvancedOption +Advanced options that are specific to the carrier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultValue** | **string** | Default value of option | [optional] [readonly] +**Description** | **string** | Description of option | [optional] [readonly] +**Name** | **string** | Name of advanced option | [optional] [readonly] + diff --git a/docs/models/CarrierName.md b/docs/models/CarrierName.md new file mode 100644 index 00000000..2b03dafe --- /dev/null +++ b/docs/models/CarrierName.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.CarrierName +The shipping carriers that are supported by ShipEngine + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/CarrierNameWithSettings.md b/docs/models/CarrierNameWithSettings.md new file mode 100644 index 00000000..0f219b89 --- /dev/null +++ b/docs/models/CarrierNameWithSettings.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.CarrierNameWithSettings +The shipping carriers for which ShipEngine supports carrier settings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/CollectOnDelivery.md b/docs/models/CollectOnDelivery.md new file mode 100644 index 00000000..39566631 --- /dev/null +++ b/docs/models/CollectOnDelivery.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.CollectOnDelivery +Defer payment until package is delivered, instead of when it is ordered. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PaymentAmount** | [**PaymentAmount**](PaymentAmount.md) | | [optional] +**PaymentType** | **CollectOnDeliveryPaymentType** | | [optional] + diff --git a/docs/models/CollectOnDeliveryPaymentType.md b/docs/models/CollectOnDeliveryPaymentType.md new file mode 100644 index 00000000..8de01901 --- /dev/null +++ b/docs/models/CollectOnDeliveryPaymentType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.CollectOnDeliveryPaymentType +Types of payment that are supported + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/CompareBulkRatesRequestBody.md b/docs/models/CompareBulkRatesRequestBody.md new file mode 100644 index 00000000..a3fd9334 --- /dev/null +++ b/docs/models/CompareBulkRatesRequestBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.CompareBulkRatesRequestBody +A rate shipments request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RateOptions** | [**RateRequestBody**](RateRequestBody.md) | The rate options | + diff --git a/docs/models/ConnectAccessWorldwideRequestBody.md b/docs/models/ConnectAccessWorldwideRequestBody.md new file mode 100644 index 00000000..d1b49f7c --- /dev/null +++ b/docs/models/ConnectAccessWorldwideRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody +An Access Worldwide account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | The nickname associated with the carrier connection | +**Password** | **string** | Access Worldwide Password | +**Username** | **string** | Access Worldwide Username | + diff --git a/docs/models/ConnectAmazonBuyShippingRequestBody.md b/docs/models/ConnectAmazonBuyShippingRequestBody.md new file mode 100644 index 00000000..4e7911eb --- /dev/null +++ b/docs/models/ConnectAmazonBuyShippingRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody +An Amazon account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | An email address. | +**MerchantSellerId** | **string** | | +**MwsAuthToken** | **string** | | +**Nickname** | **string** | Nickname to be associated with the account connection | + diff --git a/docs/models/ConnectAmazonShippingUk.md b/docs/models/ConnectAmazonShippingUk.md new file mode 100644 index 00000000..438340ac --- /dev/null +++ b/docs/models/ConnectAmazonShippingUk.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ConnectAmazonShippingUk +An Amazon Shipping UK account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthCode** | **string** | Amazon UK Shipping auth code. | +**Nickname** | **string** | The nickname associated with the carrier connection | + diff --git a/docs/models/ConnectApcRequestBody.md b/docs/models/ConnectApcRequestBody.md new file mode 100644 index 00000000..a529eba5 --- /dev/null +++ b/docs/models/ConnectApcRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectApcRequestBody +An APC account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | The nickname for the APC account | +**Password** | **string** | The password for the APC account | +**Username** | **string** | The username for the APC account | + diff --git a/docs/models/ConnectAsendiaRequestBody.md b/docs/models/ConnectAsendiaRequestBody.md new file mode 100644 index 00000000..f0879c10 --- /dev/null +++ b/docs/models/ConnectAsendiaRequestBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.ConnectAsendiaRequestBody +An Asendia account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Asendia account number | +**ApiKey** | **string** | Asendia api_key | +**Nickname** | **string** | The nickname of the Asendia account | +**Password** | **string** | Asendia password | +**ProcessingLocation** | **string** | Asendia processing location, one of: 'MIA', 'JFK', 'ORD', 'PHL', 'SFO', 'LAX', 'SLC', 'TOR', 'BUF', 'CAL' | +**Username** | **string** | Asendia username | +**SubAccountNumber** | **string** | Asendia sub account number | [optional] + diff --git a/docs/models/ConnectAustraliaPostRequestBody.md b/docs/models/ConnectAustraliaPostRequestBody.md new file mode 100644 index 00000000..05e26666 --- /dev/null +++ b/docs/models/ConnectAustraliaPostRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ConnectAustraliaPostRequestBody +An Australia Post account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**ApiKey** | **string** | API key | +**ApiSecret** | **string** | API secret | +**Nickname** | **string** | Nickname | + diff --git a/docs/models/ConnectCanadaPostRequestBody.md b/docs/models/ConnectCanadaPostRequestBody.md new file mode 100644 index 00000000..36dc9825 --- /dev/null +++ b/docs/models/ConnectCanadaPostRequestBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ConnectCanadaPostRequestBody +A Canada Post account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Canada Post Account Number | +**ApiKey** | **string** | Canada Post Account API Key | +**ApiSecret** | **string** | Canada Post Account API Secret | +**ContractId** | **string** | Canada Post Account Contract ID | +**Nickname** | **string** | Nickname | + diff --git a/docs/models/ConnectCarrierRequestBody.md b/docs/models/ConnectCarrierRequestBody.md new file mode 100644 index 00000000..bfa45f5c --- /dev/null +++ b/docs/models/ConnectCarrierRequestBody.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.ConnectCarrierRequestBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ConnectCarrierResponseBody.md b/docs/models/ConnectCarrierResponseBody.md new file mode 100644 index 00000000..3f5dbf4c --- /dev/null +++ b/docs/models/ConnectCarrierResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ConnectCarrierResponseBody +A connect account response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | A string that uniquely identifies the carrier | + diff --git a/docs/models/ConnectDhlEcommerceRequestBody.md b/docs/models/ConnectDhlEcommerceRequestBody.md new file mode 100644 index 00000000..496fd0eb --- /dev/null +++ b/docs/models/ConnectDhlEcommerceRequestBody.md @@ -0,0 +1,23 @@ +# ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody +A DHL Ecommerce account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | **string** | The client id | +**DistributionCenter** | **string** | The distribution center | +**Nickname** | **string** | A nickname to help you identify this account | +**Password** | **string** | The account password | +**PickupNumber** | **string** | The pickup number | +**Username** | **string** | The account username | +**AccountNumber** | **string** | Account number | [optional] +**AncillaryEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**ApiKey** | **string** | The DHL E-Commerce API key. This field is optional, but if not set you will not be able to get rates for this account. | [optional] +**ApiSecret** | **string** | The DHL E-Commerce API secret. This field is optional, but if not set you will not be able to get rates for this account. | [optional] +**FtpPassword** | **string** | FTP password | [optional] +**FtpUsername** | **string** | FTP username | [optional] +**RegistrationId** | **string** | | [optional] +**SoftwareName** | **string** | | [optional] +**SoldTo** | **string** | Sold To field | [optional] + diff --git a/docs/models/ConnectDhlExpressAuRequestBody.md b/docs/models/ConnectDhlExpressAuRequestBody.md new file mode 100644 index 00000000..3882bbfe --- /dev/null +++ b/docs/models/ConnectDhlExpressAuRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody +A DHL Express AU account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Nickname** | **string** | Nickname | + diff --git a/docs/models/ConnectDhlExpressCaRequestBody.md b/docs/models/ConnectDhlExpressCaRequestBody.md new file mode 100644 index 00000000..88e4a7b5 --- /dev/null +++ b/docs/models/ConnectDhlExpressCaRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody +A DHL Express CA account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Nickname** | **string** | Nickname | + diff --git a/docs/models/ConnectDhlExpressRequestBody.md b/docs/models/ConnectDhlExpressRequestBody.md new file mode 100644 index 00000000..62808f9c --- /dev/null +++ b/docs/models/ConnectDhlExpressRequestBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ConnectDhlExpressRequestBody +A DHL express account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Nickname** | **string** | Nickname | +**CountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**Password** | **string** | Required if site id is provided | [optional] +**SiteId** | **string** | Required if password is provided | [optional] + diff --git a/docs/models/ConnectDhlExpressUkRequestBody.md b/docs/models/ConnectDhlExpressUkRequestBody.md new file mode 100644 index 00000000..f01b33d2 --- /dev/null +++ b/docs/models/ConnectDhlExpressUkRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody +A DHL Express UK account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Nickname** | **string** | Nickname | +**Password** | **string** | Password | +**SiteId** | **string** | A string that uniquely identifies the site | + diff --git a/docs/models/ConnectDpdRequestBody.md b/docs/models/ConnectDpdRequestBody.md new file mode 100644 index 00000000..6db1ed51 --- /dev/null +++ b/docs/models/ConnectDpdRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectDpdRequestBody +A DPD account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Nickname** | **string** | Nickname | +**Password** | **string** | Password | + diff --git a/docs/models/ConnectEndiciaRequestBody.md b/docs/models/ConnectEndiciaRequestBody.md new file mode 100644 index 00000000..b0d5738e --- /dev/null +++ b/docs/models/ConnectEndiciaRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectEndiciaRequestBody +An Endicia account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Account** | **string** | Account | +**Nickname** | **string** | Nickname | +**Passphrase** | **string** | Passphrase | + diff --git a/docs/models/ConnectFedexRequestBody.md b/docs/models/ConnectFedexRequestBody.md new file mode 100644 index 00000000..cd87f03b --- /dev/null +++ b/docs/models/ConnectFedexRequestBody.md @@ -0,0 +1,23 @@ +# ShipEngineSDK.Model.ConnectFedexRequestBody +A Fedex account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Address1** | **string** | Address | +**AgreeToEula** | **bool** | Boolean signaling agreement to the Fedex End User License Agreement | +**City** | **string** | The city | +**CountryCode** | **string** | Country code | +**Email** | **string** | The email address | +**FirstName** | **string** | First name | +**LastName** | **string** | Last name | +**Nickname** | **string** | Nickname | +**Phone** | **string** | Phone number | +**PostalCode** | **string** | Postal Code | +**State** | **string** | State | +**Address2** | **string** | Address | [optional] +**Company** | **string** | The company | [optional] +**MeterNumber** | **string** | Meter number | [optional] + diff --git a/docs/models/ConnectFedexUkRequestBody.md b/docs/models/ConnectFedexUkRequestBody.md new file mode 100644 index 00000000..0d1db8cf --- /dev/null +++ b/docs/models/ConnectFedexUkRequestBody.md @@ -0,0 +1,23 @@ +# ShipEngineSDK.Model.ConnectFedexUkRequestBody +A Fedex UK account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Address1** | **string** | Address | +**AgreeToEula** | **bool** | Boolean signaling agreement to the Fedex End User License Agreement | +**City** | **string** | The city | +**CountryCode** | **string** | Country code | +**Email** | **string** | The email address | +**FirstName** | **string** | First name | +**LastName** | **string** | Last name | +**Nickname** | **string** | Nickname | +**Phone** | **string** | Phone number | +**PostalCode** | **string** | Postal Code | +**State** | **string** | State | +**Address2** | **string** | Address | [optional] +**Company** | **string** | The company | [optional] +**MeterNumber** | **string** | Meter number | [optional] + diff --git a/docs/models/ConnectFirstmileRequestBody.md b/docs/models/ConnectFirstmileRequestBody.md new file mode 100644 index 00000000..e75ead8e --- /dev/null +++ b/docs/models/ConnectFirstmileRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ConnectFirstmileRequestBody +A First Mile account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailerId** | **string** | A string that uniquely identifies the mailer | +**Nickname** | **string** | Nickname | +**Password** | **string** | Password | +**ProfileName** | **string** | Profile name | [optional] + diff --git a/docs/models/ConnectImexRequestBody.md b/docs/models/ConnectImexRequestBody.md new file mode 100644 index 00000000..b3ae56d7 --- /dev/null +++ b/docs/models/ConnectImexRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectImexRequestBody +An Imex account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | Nickname | +**Password** | **string** | Password | +**Username** | **string** | Username | + diff --git a/docs/models/ConnectInsurerRequestBody.md b/docs/models/ConnectInsurerRequestBody.md new file mode 100644 index 00000000..2ec59ff3 --- /dev/null +++ b/docs/models/ConnectInsurerRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ConnectInsurerRequestBody +A create shipsurance connection request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | An email address. | +**PolicyId** | **string** | | + diff --git a/docs/models/ConnectLasershipRequestBody.md b/docs/models/ConnectLasershipRequestBody.md new file mode 100644 index 00000000..93f48799 --- /dev/null +++ b/docs/models/ConnectLasershipRequestBody.md @@ -0,0 +1,34 @@ +# ShipEngineSDK.Model.ConnectLasershipRequestBody +A Lasership account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **String** | Address | +**City** | **String** | City | +**CustomerBranch** | **string** | Customer Branch | +**LasershipCriticalEntryTime** | **String** | Critical Entry Time (local time) | +**LasershipCriticalPullTime** | **String** | Critical Pull Time (local time) | +**Nickname** | **string** | Nickname | +**PostalCode** | **String** | PostalCode | +**State** | **String** | State | +**WebServicesId** | **string** | Web Service ID (WSID) | +**WebServicesKey** | **string** | Web Service Key (WSKey) | +**Address2** | **String** | Address2 | [optional] +**AttrAlcohol** | **Boolean** | Set this to true if your shipments will always contain Alcohol | [optional] +**AttrControlledSubstance** | **Boolean** | Set this to true if your shipments will always contain Controlled Substances | [optional] +**AttrDryIce** | **Boolean** | Set this to true if your shipments will always contain DryIce | [optional] +**AttrExplosive** | **Boolean** | Set this to true if your shipments will always contain Explosives | [optional] +**AttrHazmat** | **Boolean** | Set this to true if your shipments will always contain Hazmat | [optional] +**AttrNoRTS** | **Boolean** | Set this to true if your shipments will always use \"No Return To Sender\" | [optional] +**AttrPerishable** | **Boolean** | Set this to true if your shipments will always be Perishable | [optional] +**AttrRefrigerated** | **Boolean** | Set this to true if your shipments will always require Refrigeration | [optional] +**AttrTwoPersons** | **Boolean** | Set this to true if your shipments will always require Two Persons | [optional] +**Country** | **String** | Country | [optional] +**DeclarePieceAttributesSeparatelyForEveryShipment** | **Boolean** | Declare piece attributes separately for every shipment, overrides individual attribute below. | [optional] +**Email** | **String** | Email | [optional] +**FacilityCode** | **String** | Facility Code | [optional] +**Instructions** | **String** | Instructions | [optional] +**Phone** | **String** | Phone | [optional] + diff --git a/docs/models/ConnectNewgisticsRequestBody.md b/docs/models/ConnectNewgisticsRequestBody.md new file mode 100644 index 00000000..89cef297 --- /dev/null +++ b/docs/models/ConnectNewgisticsRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ConnectNewgisticsRequestBody +A Newgistics account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InductionSite** | **string** | Induction site | +**Nickname** | **string** | Nickname | +**MailerId** | **int** | Mailer id | [optional] +**MerchantId** | **int** | Merchant id | [optional] + diff --git a/docs/models/ConnectOntracRequestBody.md b/docs/models/ConnectOntracRequestBody.md new file mode 100644 index 00000000..aa079a22 --- /dev/null +++ b/docs/models/ConnectOntracRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectOntracRequestBody +An Ontrac account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**Nickname** | **string** | Nickname | +**Password** | **string** | Password | + diff --git a/docs/models/ConnectPurolatorRequestBody.md b/docs/models/ConnectPurolatorRequestBody.md new file mode 100644 index 00000000..62709e5d --- /dev/null +++ b/docs/models/ConnectPurolatorRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectPurolatorRequestBody +A Purolator account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**ActivationKey** | **string** | Activation key | +**Nickname** | **string** | Nickname | + diff --git a/docs/models/ConnectRoyalMailRequestBody.md b/docs/models/ConnectRoyalMailRequestBody.md new file mode 100644 index 00000000..439fb6db --- /dev/null +++ b/docs/models/ConnectRoyalMailRequestBody.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.ConnectRoyalMailRequestBody +A Royal Mail account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | Account number | +**City** | **string** | City | +**ContactName** | **string** | Contact name | +**Nickname** | **string** | Nickname | +**PostalCode** | **string** | Postal code | +**CompanyName** | **string** | Company name | [optional] +**Email** | **string** | The email address | [optional] +**ObaEmail** | **string** | The oba email address | [optional] +**Phone** | **string** | Phone | [optional] +**StreetLine1** | **string** | Street line1 | [optional] +**StreetLine2** | **string** | Street line2 | [optional] +**StreetLine3** | **string** | Street line3 | [optional] + diff --git a/docs/models/ConnectRrDonnelleyRequestBody.md b/docs/models/ConnectRrDonnelleyRequestBody.md new file mode 100644 index 00000000..a894d913 --- /dev/null +++ b/docs/models/ConnectRrDonnelleyRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody +A RR Donnelley account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | Nickname | +**Password** | **string** | Password | +**Username** | **string** | Username | + diff --git a/docs/models/ConnectSekoRequestBody.md b/docs/models/ConnectSekoRequestBody.md new file mode 100644 index 00000000..b91cce6d --- /dev/null +++ b/docs/models/ConnectSekoRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ConnectSekoRequestBody +A SEKO account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | Seko Account Access Key | +**Nickname** | **string** | Nickname | + diff --git a/docs/models/ConnectSendleRequestBody.md b/docs/models/ConnectSendleRequestBody.md new file mode 100644 index 00000000..5c3278de --- /dev/null +++ b/docs/models/ConnectSendleRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectSendleRequestBody +A Sendle account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | API key | +**Nickname** | **string** | Nickname | +**SendleId** | **string** | A string that uniquely identifies the sendle | + diff --git a/docs/models/ConnectStampsRequestBody.md b/docs/models/ConnectStampsRequestBody.md new file mode 100644 index 00000000..78622a5f --- /dev/null +++ b/docs/models/ConnectStampsRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ConnectStampsRequestBody +A Stamps account information request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | Nickname | +**Password** | **string** | Password | +**Username** | **string** | Username | + diff --git a/docs/models/ConnectUpsRequestBody.md b/docs/models/ConnectUpsRequestBody.md new file mode 100644 index 00000000..3887d0d1 --- /dev/null +++ b/docs/models/ConnectUpsRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ConnectUpsRequestBody +A UPS account information request body. The location header from this call should be used to redirect to UPS for sign in. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountCountryCode** | **string** | Account Country Code | +**AccountNumber** | **string** | Account number | +**AccountPostalCode** | **string** | Account Postal Code | +**Nickname** | **string** | Nickname | + diff --git a/docs/models/ContactDetails.md b/docs/models/ContactDetails.md new file mode 100644 index 00000000..cc0f63ed --- /dev/null +++ b/docs/models/ContactDetails.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ContactDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | An email address. | +**Name** | **string** | | +**Phone** | **string** | Phone number associated | + diff --git a/docs/models/CreateAccountSettingsImageRequestBody.md b/docs/models/CreateAccountSettingsImageRequestBody.md new file mode 100644 index 00000000..bc11d308 --- /dev/null +++ b/docs/models/CreateAccountSettingsImageRequestBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody +A ShipEngine account settings images request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ImageContentType** | **string** | The image type | +**ImageData** | **string** | A base64 encoded string representation of the image. | +**Name** | **string** | A human readable name for the image. | +**CreatedAt** | **DateTimeOffset** | The date and time that the image was created in ShipEngine. | [optional] [readonly] +**IsDefault** | **bool** | Indicates whether this image is set as default. | [optional] +**LabelImageId** | **string** | A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. | [optional] [readonly] +**ModifiedAt** | **DateTimeOffset** | The date and time that the image was modified in ShipEngine. | [optional] [readonly] + diff --git a/docs/models/CreateAndProcessBatchRequestBody.md b/docs/models/CreateAndProcessBatchRequestBody.md new file mode 100644 index 00000000..8c505503 --- /dev/null +++ b/docs/models/CreateAndProcessBatchRequestBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.CreateAndProcessBatchRequestBody +A create and process batch request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchNotes** | **string** | Add custom messages for a particular batch | [optional] +**ExternalBatchId** | **string** | A string that uniquely identifies the external batch | [optional] +**ProcessLabels** | [**CreateAndProcessBatchRequestBodyProcessLabels**](CreateAndProcessBatchRequestBodyProcessLabels.md) | | [optional] +**RateIds** | **List<string>** | Array of rate IDs used in the batch | [optional] +**ShipmentIds** | **List<string>** | Array of shipment IDs used in the batch | [optional] + diff --git a/docs/models/CreateAndProcessBatchRequestBodyProcessLabels.md b/docs/models/CreateAndProcessBatchRequestBodyProcessLabels.md new file mode 100644 index 00000000..b8cd6196 --- /dev/null +++ b/docs/models/CreateAndProcessBatchRequestBodyProcessLabels.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels +The information used to process the batch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreateBatchAndProcessLabels** | **bool** | When 'true', the batch will be enqueued for processing | [optional] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**LabelFormat** | **LabelFormat** | | [optional] +**LabelLayout** | **LabelLayout** | | [optional] [default to "4x6"] +**ShipDate** | **DateTimeOffset** | The Ship date the batch is being processed for | [optional] + diff --git a/docs/models/CreateAndValidateShipment.md b/docs/models/CreateAndValidateShipment.md new file mode 100644 index 00000000..64ae8fde --- /dev/null +++ b/docs/models/CreateAndValidateShipment.md @@ -0,0 +1,37 @@ +# ShipEngineSDK.Model.CreateAndValidateShipment +A create and validate shipment resource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressValidation** | [**AddressValidationResult**](AddressValidationResult.md) | The address validation | [optional] +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | [optional] +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | [optional] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [optional] [readonly] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | [optional] +**Errors** | **List<string>** | An array of errors that occurred while creating shipment. | [optional] [readonly] +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [optional] [readonly] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | [optional] +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | [optional] +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | [optional] +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [optional] [readonly] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [optional] [readonly] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [optional] [readonly] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [optional] [readonly] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | [optional] + diff --git a/docs/models/CreateBatchRequest.md b/docs/models/CreateBatchRequest.md new file mode 100644 index 00000000..ad5cee1a --- /dev/null +++ b/docs/models/CreateBatchRequest.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.CreateBatchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/CreateBatchRequestBody.md b/docs/models/CreateBatchRequestBody.md new file mode 100644 index 00000000..677e275d --- /dev/null +++ b/docs/models/CreateBatchRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.CreateBatchRequestBody +A create batch request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchNotes** | **string** | Add custom messages for a particular batch | [optional] +**ExternalBatchId** | **string** | A string that uniquely identifies the external batch | [optional] +**RateIds** | **List<string>** | Array of rate IDs used in the batch | [optional] +**ShipmentIds** | **List<string>** | Array of shipment IDs used in the batch | [optional] + diff --git a/docs/models/CreateBatchResponseBody.md b/docs/models/CreateBatchResponseBody.md new file mode 100644 index 00000000..8a4f6e87 --- /dev/null +++ b/docs/models/CreateBatchResponseBody.md @@ -0,0 +1,29 @@ +# ShipEngineSDK.Model.CreateBatchResponseBody +A create batch response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchErrorsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch errors endpoint | [readonly] +**BatchId** | **string** | A string that uniquely identifies the batch | [readonly] +**BatchLabelsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch labels query | +**BatchNumber** | **string** | The batch number. | [readonly] +**BatchShipmentsUrl** | [**OptionalLink**](OptionalLink.md) | The batch shipments endpoint | +**Completed** | **int** | The number of labels generated in the batch | [readonly] +**Count** | **int** | The total of errors, warnings, and completed properties | [readonly] +**CreatedAt** | **DateTimeOffset** | The date and time the batch was created in ShipEngine | [readonly] +**Errors** | **int** | The number of errors that occurred while generating the batch | [readonly] +**FormDownload** | [**OptionalLink**](OptionalLink.md) | The form download for any customs that are needed | [readonly] +**Forms** | **int** | The number of forms for customs that are available for download | [readonly] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | The label download for the batch | [readonly] +**LabelFormat** | **LabelFormat** | | [readonly] +**LabelLayout** | **LabelLayout** | label layout | [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [readonly] +**ProcessErrors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**Status** | **BatchStatus** | | [readonly] +**Warnings** | **int** | The number of warnings that occurred while generating the batch | [readonly] +**BatchNotes** | **string** | Custom notes you can add for each created batch | [readonly] [default to ""] +**ExternalBatchId** | **string** | A string that uniquely identifies the external batch | [readonly] +**ProcessedAt** | **DateTimeOffset** | The date and time the batch was processed in ShipEngine | [readonly] + diff --git a/docs/models/CreateLabelFromRateRequestBody.md b/docs/models/CreateLabelFromRateRequestBody.md new file mode 100644 index 00000000..4fff7ad4 --- /dev/null +++ b/docs/models/CreateLabelFromRateRequestBody.md @@ -0,0 +1,16 @@ +# ShipEngineSDK.Model.CreateLabelFromRateRequestBody +A purchase label without shipment request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomField1** | **string** | Optional - Value will be saved in the shipment's advanced_options > custom_field1 | [optional] +**CustomField2** | **string** | Optional - Value will be saved in the shipment's advanced_options > custom_field2 | [optional] +**CustomField3** | **string** | Optional - Value will be saved in the shipment's advanced_options > custom_field3 | [optional] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | | [optional] +**LabelLayout** | **LabelLayout** | | [optional] +**ValidateAddress** | **ValidateAddress** | | [optional] + diff --git a/docs/models/CreateLabelFromRateResponseBody.md b/docs/models/CreateLabelFromRateResponseBody.md new file mode 100644 index 00000000..809cb55d --- /dev/null +++ b/docs/models/CreateLabelFromRateResponseBody.md @@ -0,0 +1,47 @@ +# ShipEngineSDK.Model.CreateLabelFromRateResponseBody +A create label from rate response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Additional information some carriers may provide by which to identify a given label in their system. | [optional] [readonly] +**BatchId** | **string** | If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the label was created in ShipEngine. | [optional] [readonly] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**FormDownload** | [**Link**](Link.md) | The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. | [optional] [readonly] +**InsuranceClaim** | [**Link**](Link.md) | The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. | [optional] [readonly] +**InsuranceCost** | [**MonetaryValue**](MonetaryValue.md) | The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. | [optional] [readonly] +**IsInternational** | **bool** | Indicates whether this is an international shipment. That is, the originating country and destination country are different. | [optional] [readonly] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | | [optional] [readonly] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelId** | **string** | A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. | [optional] [readonly] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] [readonly] +**Packages** | [**List<LabelPackagesInner>**](LabelPackagesInner.md) | The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] [readonly] +**Shipment** | [**Shipment**](Shipment.md) | The shipment information used to generate the label | [optional] +**ShipmentCost** | [**MonetaryValue**](MonetaryValue.md) | The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. | [optional] [readonly] +**ShipmentId** | **string** | The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) | [optional] [readonly] +**Status** | **LabelStatus** | | [optional] [readonly] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**Trackable** | **bool** | Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. Tracking number formats vary across carriers. | [optional] [readonly] +**TrackingStatus** | **TrackingStatus** | The current status of the package, such as `in_transit` or `delivered` | [optional] [readonly] +**TrackingUrl** | **string** | The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**Voided** | **bool** | Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) | [optional] [readonly] +**VoidedAt** | **DateTimeOffset** | The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided | [optional] [readonly] + diff --git a/docs/models/CreateLabelFromShipmentRequestBody.md b/docs/models/CreateLabelFromShipmentRequestBody.md new file mode 100644 index 00000000..a54c8161 --- /dev/null +++ b/docs/models/CreateLabelFromShipmentRequestBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody +A purchase label without shipment request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | | [optional] +**LabelLayout** | **LabelLayout** | | [optional] +**ValidateAddress** | **ValidateAddress** | | [optional] + diff --git a/docs/models/CreateLabelFromShipmentResponseBody.md b/docs/models/CreateLabelFromShipmentResponseBody.md new file mode 100644 index 00000000..1d4ec3d2 --- /dev/null +++ b/docs/models/CreateLabelFromShipmentResponseBody.md @@ -0,0 +1,47 @@ +# ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody +A create label from shipment response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Additional information some carriers may provide by which to identify a given label in their system. | [optional] [readonly] +**BatchId** | **string** | If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the label was created in ShipEngine. | [optional] [readonly] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**FormDownload** | [**Link**](Link.md) | The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. | [optional] [readonly] +**InsuranceClaim** | [**Link**](Link.md) | The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. | [optional] [readonly] +**InsuranceCost** | [**MonetaryValue**](MonetaryValue.md) | The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. | [optional] [readonly] +**IsInternational** | **bool** | Indicates whether this is an international shipment. That is, the originating country and destination country are different. | [optional] [readonly] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | | [optional] [readonly] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelId** | **string** | A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. | [optional] [readonly] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] [readonly] +**Packages** | [**List<LabelPackagesInner>**](LabelPackagesInner.md) | The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] [readonly] +**Shipment** | [**Shipment**](Shipment.md) | The shipment information used to generate the label | [optional] +**ShipmentCost** | [**MonetaryValue**](MonetaryValue.md) | The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. | [optional] [readonly] +**ShipmentId** | **string** | The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) | [optional] [readonly] +**Status** | **LabelStatus** | | [optional] [readonly] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**Trackable** | **bool** | Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. Tracking number formats vary across carriers. | [optional] [readonly] +**TrackingStatus** | **TrackingStatus** | The current status of the package, such as `in_transit` or `delivered` | [optional] [readonly] +**TrackingUrl** | **string** | The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**Voided** | **bool** | Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) | [optional] [readonly] +**VoidedAt** | **DateTimeOffset** | The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided | [optional] [readonly] + diff --git a/docs/models/CreateLabelRequestBody.md b/docs/models/CreateLabelRequestBody.md new file mode 100644 index 00000000..98987dbc --- /dev/null +++ b/docs/models/CreateLabelRequestBody.md @@ -0,0 +1,22 @@ +# ShipEngineSDK.Model.CreateLabelRequestBody +A purchase label request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Shipment** | [**ShipmentRequest**](ShipmentRequest.md) | The shipment information used to generate the label | +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**ShipFromServicePointId** | **string** | A unique identifier for a carrier drop off point where a merchant plans to deliver packages. This will take precedence over a shipment's ship from address. | [optional] +**ShipToServicePointId** | **string** | A unique identifier for a carrier service point where the shipment will be delivered by the carrier. This will take precedence over a shipment's ship to address. | [optional] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**ValidateAddress** | **ValidateAddress** | | [optional] + diff --git a/docs/models/CreateLabelResponseBody.md b/docs/models/CreateLabelResponseBody.md new file mode 100644 index 00000000..1e5f4ff6 --- /dev/null +++ b/docs/models/CreateLabelResponseBody.md @@ -0,0 +1,47 @@ +# ShipEngineSDK.Model.CreateLabelResponseBody +A create label response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. | [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [readonly] +**CarrierId** | **string** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [readonly] +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | +**CreatedAt** | **DateTimeOffset** | The date and time that the label was created in ShipEngine. | [readonly] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | +**InsuranceCost** | [**MonetaryValue**](MonetaryValue.md) | The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. | [readonly] +**IsInternational** | **bool** | Indicates whether this is an international shipment. That is, the originating country and destination country are different. | [readonly] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | | [readonly] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | +**LabelId** | **string** | A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. | [readonly] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [readonly] +**Packages** | [**List<LabelPackagesInner>**](LabelPackagesInner.md) | The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. | [readonly] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [readonly] +**ShipDate** | **DateTimeOffset** | The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [readonly] +**ShipmentCost** | [**MonetaryValue**](MonetaryValue.md) | The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. | [readonly] +**ShipmentId** | **string** | The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) | [readonly] +**Status** | **LabelStatus** | | [readonly] +**Trackable** | **bool** | Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. | [readonly] +**TrackingNumber** | **string** | The tracking number for the package. Tracking number formats vary across carriers. | [readonly] +**TrackingStatus** | **TrackingStatus** | The current status of the package, such as `in_transit` or `delivered` | [readonly] +**Voided** | **bool** | Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) | [readonly] +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Additional information some carriers may provide by which to identify a given label in their system. | [optional] [readonly] +**FormDownload** | [**Link**](Link.md) | The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. | [readonly] +**InsuranceClaim** | [**Link**](Link.md) | The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. | [readonly] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | +**Shipment** | [**Shipment**](Shipment.md) | The shipment information used to generate the label | [optional] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**TrackingUrl** | **string** | The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**VoidedAt** | **DateTimeOffset** | The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided | [optional] [readonly] + diff --git a/docs/models/CreateManifestByObjectRequestBody.md b/docs/models/CreateManifestByObjectRequestBody.md new file mode 100644 index 00000000..7782cca1 --- /dev/null +++ b/docs/models/CreateManifestByObjectRequestBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.CreateManifestByObjectRequestBody +A create manifest request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | A string that uniquely identifies the carrier | +**ShipDate** | **DateTimeOffset** | The ship date that the shipment will be sent out on | +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | +**ExcludedLabelIds** | **List<string>** | The list of label ids to exclude from the manifest | [optional] +**LabelIds** | **List<string>** | The list of label ids to include for the manifest | [optional] + diff --git a/docs/models/CreateManifestLabelIdsRequestBody.md b/docs/models/CreateManifestLabelIdsRequestBody.md new file mode 100644 index 00000000..a8b34989 --- /dev/null +++ b/docs/models/CreateManifestLabelIdsRequestBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody +A create manifest request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LabelIds** | **List<string>** | The list of label ids to include in the manifest | + diff --git a/docs/models/CreateManifestRequestBody.md b/docs/models/CreateManifestRequestBody.md new file mode 100644 index 00000000..94ef174d --- /dev/null +++ b/docs/models/CreateManifestRequestBody.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.CreateManifestRequestBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/CreateManifestResponseBody.md b/docs/models/CreateManifestResponseBody.md new file mode 100644 index 00000000..6cc3fd95 --- /dev/null +++ b/docs/models/CreateManifestResponseBody.md @@ -0,0 +1,22 @@ +# ShipEngineSDK.Model.CreateManifestResponseBody +A create manifest response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | A string that uniquely identifies the carrier | +**CreatedAt** | **DateTimeOffset** | The date-time that the manifest was created | +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**FormId** | **string** | A string that uniquely identifies the form | +**ManifestDownload** | [**ManifestDownload**](ManifestDownload.md) | | +**ManifestId** | **string** | A string that uniquely identifies the manifest | +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | +**ShipDate** | **DateTimeOffset** | The date-time that the manifests shipments will be picked up | +**Shipments** | **int** | The number of shipments that are included in this manifest | [readonly] +**SubmissionId** | **string** | A string that uniquely identifies the submission | +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | +**LabelIds** | **List<string>** | An array of the label ids used in this manifest. | [optional] [readonly] +**ManifestRequests** | [**List<ManifestRequest>**](ManifestRequest.md) | Resulting manifest requests with statuses | [optional] +**Manifests** | [**List<Manifest>**](Manifest.md) | Resulting Manifests | [optional] + diff --git a/docs/models/CreatePackageTypeRequestBody.md b/docs/models/CreatePackageTypeRequestBody.md new file mode 100644 index 00000000..c232c2a8 --- /dev/null +++ b/docs/models/CreatePackageTypeRequestBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.CreatePackageTypeRequestBody +A create package type request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**PackageCode** | **string** | A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. | +**Description** | **string** | Provides a helpful description for the custom package. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The custom dimensions for the package. | [optional] +**PackageId** | **string** | A string that uniquely identifies the package. | [optional] + diff --git a/docs/models/CreatePackageTypeResponseBody.md b/docs/models/CreatePackageTypeResponseBody.md new file mode 100644 index 00000000..7004ec0f --- /dev/null +++ b/docs/models/CreatePackageTypeResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.CreatePackageTypeResponseBody +A create package type response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**PackageCode** | **string** | A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. | +**Description** | **string** | Provides a helpful description for the custom package. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The custom dimensions for the package. | [optional] +**PackageId** | **string** | A string that uniquely identifies the package. | [optional] + diff --git a/docs/models/CreateReturnLabelRequestBody.md b/docs/models/CreateReturnLabelRequestBody.md new file mode 100644 index 00000000..50d5c946 --- /dev/null +++ b/docs/models/CreateReturnLabelRequestBody.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.CreateReturnLabelRequestBody +A create return label request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] + diff --git a/docs/models/CreateReturnLabelResponseBody.md b/docs/models/CreateReturnLabelResponseBody.md new file mode 100644 index 00000000..59cadf6a --- /dev/null +++ b/docs/models/CreateReturnLabelResponseBody.md @@ -0,0 +1,47 @@ +# ShipEngineSDK.Model.CreateReturnLabelResponseBody +A create return label response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Additional information some carriers may provide by which to identify a given label in their system. | [optional] [readonly] +**BatchId** | **string** | If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the label was created in ShipEngine. | [optional] [readonly] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**FormDownload** | [**Link**](Link.md) | The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. | [optional] [readonly] +**InsuranceClaim** | [**Link**](Link.md) | The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. | [optional] [readonly] +**InsuranceCost** | [**MonetaryValue**](MonetaryValue.md) | The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. | [optional] [readonly] +**IsInternational** | **bool** | Indicates whether this is an international shipment. That is, the originating country and destination country are different. | [optional] [readonly] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | | [optional] [readonly] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelId** | **string** | A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. | [optional] [readonly] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] [readonly] +**Packages** | [**List<LabelPackagesInner>**](LabelPackagesInner.md) | The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] [readonly] +**Shipment** | [**Shipment**](Shipment.md) | The shipment information used to generate the label | [optional] +**ShipmentCost** | [**MonetaryValue**](MonetaryValue.md) | The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. | [optional] [readonly] +**ShipmentId** | **string** | The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) | [optional] [readonly] +**Status** | **LabelStatus** | | [optional] [readonly] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**Trackable** | **bool** | Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. Tracking number formats vary across carriers. | [optional] [readonly] +**TrackingStatus** | **TrackingStatus** | The current status of the package, such as `in_transit` or `delivered` | [optional] [readonly] +**TrackingUrl** | **string** | The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**Voided** | **bool** | Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) | [optional] [readonly] +**VoidedAt** | **DateTimeOffset** | The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided | [optional] [readonly] + diff --git a/docs/models/CreateShipmentResponseBodyFields.md b/docs/models/CreateShipmentResponseBodyFields.md new file mode 100644 index 00000000..6468b8f0 --- /dev/null +++ b/docs/models/CreateShipmentResponseBodyFields.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.CreateShipmentResponseBodyFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressValidation** | [**AddressValidationResult**](AddressValidationResult.md) | The address validation | [optional] +**Errors** | **List<string>** | An array of errors that occurred while creating shipment. | [optional] [readonly] + diff --git a/docs/models/CreateShipmentsRequestBody.md b/docs/models/CreateShipmentsRequestBody.md new file mode 100644 index 00000000..bb415132 --- /dev/null +++ b/docs/models/CreateShipmentsRequestBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.CreateShipmentsRequestBody +A create shipments request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Shipments** | [**List<AddressValidatingShipment>**](AddressValidatingShipment.md) | An array of shipments to be created. | + diff --git a/docs/models/CreateShipmentsResponseBody.md b/docs/models/CreateShipmentsResponseBody.md new file mode 100644 index 00000000..c9aa6243 --- /dev/null +++ b/docs/models/CreateShipmentsResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.CreateShipmentsResponseBody +A create shipments response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Shipments** | [**List<CreateAndValidateShipment>**](CreateAndValidateShipment.md) | An array of shipments that were created. | +**HasErrors** | **bool** | Indicates if errors occured while creating the shipments | [default to false] + diff --git a/docs/models/CreateTagResponseBody.md b/docs/models/CreateTagResponseBody.md new file mode 100644 index 00000000..7f7990a3 --- /dev/null +++ b/docs/models/CreateTagResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.CreateTagResponseBody +Response body for creating tags + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The tag name. | + diff --git a/docs/models/CreateWarehouseRequestBody.md b/docs/models/CreateWarehouseRequestBody.md new file mode 100644 index 00000000..0e5b549d --- /dev/null +++ b/docs/models/CreateWarehouseRequestBody.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.CreateWarehouseRequestBody +A create warehouse request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the warehouse | +**OriginAddress** | [**Address**](Address.md) | The origin address of the warehouse | +**CreatedAt** | **DateTimeOffset** | Timestamp that indicates when the warehouse was created | [optional] [readonly] +**IsDefault** | **bool** | Designates which single warehouse is the default on the account | [optional] [default to false] +**ReturnAddress** | [**Address**](Address.md) | The return address associated with the warehouse | [optional] +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [optional] [readonly] + diff --git a/docs/models/CreateWarehouseResponseBody.md b/docs/models/CreateWarehouseResponseBody.md new file mode 100644 index 00000000..83f0353c --- /dev/null +++ b/docs/models/CreateWarehouseResponseBody.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.CreateWarehouseResponseBody +A create warehouse response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **DateTimeOffset** | Timestamp that indicates when the warehouse was created | [readonly] +**Name** | **string** | Name of the warehouse | +**OriginAddress** | [**Address**](Address.md) | The origin address of the warehouse | +**ReturnAddress** | [**Address**](Address.md) | The return address associated with the warehouse | +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [readonly] +**IsDefault** | **bool** | Designates which single warehouse is the default on the account | [optional] [default to false] + diff --git a/docs/models/CreateWebhookRequestBody.md b/docs/models/CreateWebhookRequestBody.md new file mode 100644 index 00000000..223fb53e --- /dev/null +++ b/docs/models/CreateWebhookRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.CreateWebhookRequestBody +A create webhook request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Event** | **WebhookEvent** | | +**Url** | **string** | The url that the webhook sends the request to | +**Headers** | [**List<WebhookHeader>**](WebhookHeader.md) | Array of custom webhook headers | [optional] + diff --git a/docs/models/CreateWebhookResponseBody.md b/docs/models/CreateWebhookResponseBody.md new file mode 100644 index 00000000..dbf1bce5 --- /dev/null +++ b/docs/models/CreateWebhookResponseBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.CreateWebhookResponseBody +A webhook response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Event** | **WebhookEvent** | | +**Url** | **string** | The url that the webhook sends the request to | +**WebhookId** | **string** | A string that uniquely identifies the webhook | [readonly] +**Headers** | [**List<WebhookHeader>**](WebhookHeader.md) | Array of custom webhook headers | [optional] + diff --git a/docs/models/CustomsItem.md b/docs/models/CustomsItem.md new file mode 100644 index 00000000..297e93e3 --- /dev/null +++ b/docs/models/CustomsItem.md @@ -0,0 +1,19 @@ +# ShipEngineSDK.Model.CustomsItem +The customs declaration for a single item in the shipment. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomsItemId** | **string** | A string that uniquely identifies the customs item | [readonly] +**CountryOfOrigin** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated | [optional] +**Description** | **string** | A description of the item | [optional] +**HarmonizedTariffCode** | **string** | The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item. | [optional] +**Quantity** | **int** | The quantity of this item in the shipment. | [optional] [default to 0] +**Sku** | **string** | The SKU (Stock Keeping Unit) of the customs item | [optional] +**SkuDescription** | **string** | Description of the Custom Item's SKU | [optional] +**UnitOfMeasure** | **string** | | [optional] +**Value** | **decimal** | The monetary amount, in the specified currency. | [optional] +**ValueCurrency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | [optional] +**Weight** | [**Weight**](Weight.md) | The item weight | [optional] + diff --git a/docs/models/DangerousAmount.md b/docs/models/DangerousAmount.md new file mode 100644 index 00000000..5cbe9a09 --- /dev/null +++ b/docs/models/DangerousAmount.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.DangerousAmount +This model represents the amount of the dangerous goods.. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **decimal** | The amount of dangerous goods. | [optional] [default to 0M] +**Unit** | **string** | The unit of dangerous goods. | [optional] + diff --git a/docs/models/DangerousGoods.md b/docs/models/DangerousGoods.md new file mode 100644 index 00000000..a6d9c03e --- /dev/null +++ b/docs/models/DangerousGoods.md @@ -0,0 +1,27 @@ +# ShipEngineSDK.Model.DangerousGoods +Dangerous goods attribute associated with the product + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalDescription** | **string** | Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier | [optional] +**DangerousAmount** | [**DangerousAmount**](DangerousAmount.md) | This model represents the amount of the dangerous goods. | [optional] +**IdNumber** | **string** | UN number to identify the dangerous goods. | [optional] +**PackagingGroup** | **PackagingGroup** | | [optional] +**PackagingInstruction** | **string** | The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container. | [optional] +**PackagingInstructionSection** | **PackagingInstructionSection** | | [optional] +**PackagingType** | **string** | The type of exterior packaging used to contain the dangerous good. | [optional] +**ProductClass** | **string** | Dangerous goods product class based on regulation. | [optional] +**ProductClassSubsidiary** | **string** | A secondary of product class for substances presenting more than one particular hazard | [optional] +**Quantity** | **int** | Quantity of dangerous goods. | [optional] [default to 0] +**Radioactive** | **bool** | Indication if the substance is radioactive. | [optional] +**RegulationAuthority** | **string** | Name of the regulatory authority. | [optional] +**RegulationLevel** | **RegulationLevel** | | [optional] +**ReportableQuantity** | **bool** | Indication if the substance needs to be reported to regulatory authority based on the quantity. | [optional] +**ShippingName** | **string** | Trade description of the dangerous goods. | [optional] +**TechnicalName** | **string** | Recognized Technical or chemical name of dangerous goods. | [optional] +**TransportCategory** | **string** | Transport category assign to dangerous goods for the transport purpose. | [optional] +**TransportMean** | **TransportMean** | | [optional] +**TunnelCode** | **string** | Defines which types of tunnels the shipment is allowed to go through | [optional] + diff --git a/docs/models/DefaultLabelLayout.md b/docs/models/DefaultLabelLayout.md new file mode 100644 index 00000000..ddddd504 --- /dev/null +++ b/docs/models/DefaultLabelLayout.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.DefaultLabelLayout +The possible default label layout values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/DeletePickupByIdResponseBody.md b/docs/models/DeletePickupByIdResponseBody.md new file mode 100644 index 00000000..bb6d4d15 --- /dev/null +++ b/docs/models/DeletePickupByIdResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.DeletePickupByIdResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**PickupId** | **string** | Pickup Resource ID | +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | + diff --git a/docs/models/DeleteScheduledPickupResponseBody.md b/docs/models/DeleteScheduledPickupResponseBody.md new file mode 100644 index 00000000..6c4d7890 --- /dev/null +++ b/docs/models/DeleteScheduledPickupResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.DeleteScheduledPickupResponseBody +A delete scheduled pickup response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PickupId** | **string** | Pickup Resource ID | + diff --git a/docs/models/DeliveryConfirmation.md b/docs/models/DeliveryConfirmation.md new file mode 100644 index 00000000..49002f11 --- /dev/null +++ b/docs/models/DeliveryConfirmation.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.DeliveryConfirmation +The possible delivery confirmation values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/DeprecatedManifest.md b/docs/models/DeprecatedManifest.md new file mode 100644 index 00000000..ddff748b --- /dev/null +++ b/docs/models/DeprecatedManifest.md @@ -0,0 +1,18 @@ +# ShipEngineSDK.Model.DeprecatedManifest +Deprecated manifest resource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | A string that uniquely identifies the carrier | [optional] +**CreatedAt** | **DateTimeOffset** | The date-time that the manifest was created | [optional] +**FormId** | **string** | A string that uniquely identifies the form | [optional] +**LabelIds** | **List<string>** | An array of the label ids used in this manifest. | [optional] [readonly] +**ManifestDownload** | [**ManifestDownload**](ManifestDownload.md) | | [optional] +**ManifestId** | **string** | A string that uniquely identifies the manifest | [optional] +**ShipDate** | **DateTimeOffset** | The date-time that the manifests shipments will be picked up | [optional] +**Shipments** | **int** | The number of shipments that are included in this manifest | [optional] [readonly] +**SubmissionId** | **string** | A string that uniquely identifies the submission | [optional] +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [optional] + diff --git a/docs/models/DhlExpressAccountSettings.md b/docs/models/DhlExpressAccountSettings.md new file mode 100644 index 00000000..acd4d9c6 --- /dev/null +++ b/docs/models/DhlExpressAccountSettings.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.DhlExpressAccountSettings +A DHL Express account settings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsPrimaryAccount** | **bool** | Indicates if this is primary account | [optional] +**Nickname** | **string** | Account nickname | [optional] +**ShouldHideAccountNumberOnArchiveDoc** | **bool** | Indicates if the account number should be hidden on the archive documentation | [optional] + diff --git a/docs/models/DhlExpressSettingsResponseBody.md b/docs/models/DhlExpressSettingsResponseBody.md new file mode 100644 index 00000000..ac466617 --- /dev/null +++ b/docs/models/DhlExpressSettingsResponseBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.DhlExpressSettingsResponseBody +A DHL Express response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsPrimaryAccount** | **bool** | Indicates if this is primary account | [optional] +**Nickname** | **string** | Account nickname | [optional] +**ShouldHideAccountNumberOnArchiveDoc** | **bool** | Indicates if the account number should be hidden on the archive documentation | [optional] + diff --git a/docs/models/DimensionUnit.md b/docs/models/DimensionUnit.md new file mode 100644 index 00000000..40748f28 --- /dev/null +++ b/docs/models/DimensionUnit.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.DimensionUnit +The dimension units that are supported by ShipEngine. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/Dimensions.md b/docs/models/Dimensions.md new file mode 100644 index 00000000..ab1656ef --- /dev/null +++ b/docs/models/Dimensions.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.Dimensions +The dimensions of a package + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Unit** | **DimensionUnit** | | +**Height** | **decimal** | The height of the package, in the specified unit | [default to 0M] +**Length** | **decimal** | The length of the package, in the specified unit | [default to 0M] +**Width** | **decimal** | The width of the package, in the specified unit | [default to 0M] + diff --git a/docs/models/DisplayScheme.md b/docs/models/DisplayScheme.md new file mode 100644 index 00000000..712e40bc --- /dev/null +++ b/docs/models/DisplayScheme.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.DisplayScheme +The display format that the label should be shown in. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/Error.md b/docs/models/Error.md new file mode 100644 index 00000000..41246cdf --- /dev/null +++ b/docs/models/Error.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.Error +The error structure that gets returned with almost all failed API calls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ErrorCode** | **ErrorCode** | | +**ErrorSource** | **ErrorSource** | | +**ErrorType** | **ErrorType** | | +**Message** | **string** | An error message associated with the failed API call | [readonly] +**CarrierCode** | **string** | The name of the [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) that generated the error, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | A string that uniquely identifies the carrier that generated the error. | [optional] [readonly] +**FieldName** | **string** | The name of the field that caused the error | [optional] [readonly] + diff --git a/docs/models/ErrorCode.md b/docs/models/ErrorCode.md new file mode 100644 index 00000000..776071e9 --- /dev/null +++ b/docs/models/ErrorCode.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ErrorCode +The error code specified for the failed API Call + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ErrorResponseBody.md b/docs/models/ErrorResponseBody.md new file mode 100644 index 00000000..f75ba94b --- /dev/null +++ b/docs/models/ErrorResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ErrorResponseBody +An error response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | + diff --git a/docs/models/ErrorSource.md b/docs/models/ErrorSource.md new file mode 100644 index 00000000..ae4b5511 --- /dev/null +++ b/docs/models/ErrorSource.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ErrorSource +The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipEngine API itself. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ErrorType.md b/docs/models/ErrorType.md new file mode 100644 index 00000000..931a47f5 --- /dev/null +++ b/docs/models/ErrorType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ErrorType +The type of error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ErrorWithLabelIdResponseBody.md b/docs/models/ErrorWithLabelIdResponseBody.md new file mode 100644 index 00000000..9457170c --- /dev/null +++ b/docs/models/ErrorWithLabelIdResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ErrorWithLabelIdResponseBody +An error response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | + diff --git a/docs/models/EstimateRatesRequestBody.md b/docs/models/EstimateRatesRequestBody.md new file mode 100644 index 00000000..8eb9fcfa --- /dev/null +++ b/docs/models/EstimateRatesRequestBody.md @@ -0,0 +1,21 @@ +# ShipEngineSDK.Model.EstimateRatesRequestBody +A rate estimate request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromCityLocality** | **string** | from postal code | +**FromCountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | +**FromPostalCode** | **string** | postal code | +**FromStateProvince** | **string** | From state province | +**ShipDate** | **DateTimeOffset** | ship date | +**ToCityLocality** | **string** | The city locality the package is being shipped to | +**ToCountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | +**ToPostalCode** | **string** | postal code | +**ToStateProvince** | **string** | To state province | +**Weight** | [**Weight**](Weight.md) | The weight of the package | +**AddressResidentialIndicator** | **AddressResidentialIndicator** | | [optional] +**Confirmation** | **DeliveryConfirmation** | | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The dimensions of the package | [optional] + diff --git a/docs/models/FedexAccountSettings.md b/docs/models/FedexAccountSettings.md new file mode 100644 index 00000000..3cf86ed5 --- /dev/null +++ b/docs/models/FedexAccountSettings.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.FedexAccountSettings +A Fedex account settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsPrimaryAccount** | **bool** | | [optional] +**LetterheadImage** | **string** | | [optional] +**Nickname** | **string** | Account nickname | [optional] +**PickupType** | **FedexPickupType** | | [optional] +**SignatureImage** | **string** | | [optional] +**SmartPostEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**SmartPostHub** | **SmartPostHub** | | [optional] + diff --git a/docs/models/FedexAccountSettingsRequestBody.md b/docs/models/FedexAccountSettingsRequestBody.md new file mode 100644 index 00000000..27409d65 --- /dev/null +++ b/docs/models/FedexAccountSettingsRequestBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.FedexAccountSettingsRequestBody +A Fedex account settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsPrimaryAccount** | **bool** | | [optional] +**LetterheadImage** | **string** | | [optional] +**Nickname** | **string** | Account nickname | [optional] +**PickupType** | **FedexPickupType** | | [optional] +**SignatureImage** | **string** | | [optional] +**SmartPostEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**SmartPostHub** | **SmartPostHub** | | [optional] + diff --git a/docs/models/FedexPickupType.md b/docs/models/FedexPickupType.md new file mode 100644 index 00000000..e1cbe43c --- /dev/null +++ b/docs/models/FedexPickupType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.FedexPickupType +Tax identifier type for customs declaration |Pickup Type |Description |- -- -- -- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`none` | Not specified |`regular_pickup` | You already have a daily pickup scheduled with FedEx |`request_courier` | You will call FedEx to request a courier |`drop_box` | You will drop-off packages in a FedEx drop box |`business_service_center` | You will drop-off packages at an authorized FedEx business service center |`station` | You will drop-off the package at a FedEx Station + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/FedexSettingsResponseBody.md b/docs/models/FedexSettingsResponseBody.md new file mode 100644 index 00000000..ae3bf739 --- /dev/null +++ b/docs/models/FedexSettingsResponseBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.FedexSettingsResponseBody +A Fedex settings response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsPrimaryAccount** | **bool** | | [optional] +**LetterheadImage** | **string** | | [optional] +**Nickname** | **string** | Account nickname | [optional] +**PickupType** | **FedexPickupType** | | [optional] +**SignatureImage** | **string** | | [optional] +**SmartPostEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**SmartPostHub** | **SmartPostHub** | | [optional] + diff --git a/docs/models/GetAccountSettingsImagesResponseBody.md b/docs/models/GetAccountSettingsImagesResponseBody.md new file mode 100644 index 00000000..b36b1ba3 --- /dev/null +++ b/docs/models/GetAccountSettingsImagesResponseBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody +A get account images by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **DateTimeOffset** | The date and time that the image was created in ShipEngine. | [optional] [readonly] +**ImageContentType** | **string** | The image type | [optional] +**ImageData** | **string** | A base64 encoded string representation of the image. | [optional] +**IsDefault** | **bool** | Indicates whether this image is set as default. | [optional] +**LabelImageId** | **string** | A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. | [optional] [readonly] +**ModifiedAt** | **DateTimeOffset** | The date and time that the image was modified in ShipEngine. | [optional] [readonly] +**Name** | **string** | A human readable name for the image. | [optional] + diff --git a/docs/models/GetAccountSettingsResponseBody.md b/docs/models/GetAccountSettingsResponseBody.md new file mode 100644 index 00000000..1d85fbbf --- /dev/null +++ b/docs/models/GetAccountSettingsResponseBody.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.GetAccountSettingsResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultLabelLayout** | **DefaultLabelLayout** | | [optional] + diff --git a/docs/models/GetBatchByExternalIdResponseBody.md b/docs/models/GetBatchByExternalIdResponseBody.md new file mode 100644 index 00000000..eaf60a8b --- /dev/null +++ b/docs/models/GetBatchByExternalIdResponseBody.md @@ -0,0 +1,29 @@ +# ShipEngineSDK.Model.GetBatchByExternalIdResponseBody +A get batch by external id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchErrorsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch errors endpoint | [readonly] +**BatchId** | **string** | A string that uniquely identifies the batch | [readonly] +**BatchLabelsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch labels query | +**BatchNumber** | **string** | The batch number. | [readonly] +**BatchShipmentsUrl** | [**OptionalLink**](OptionalLink.md) | The batch shipments endpoint | +**Completed** | **int** | The number of labels generated in the batch | [readonly] +**Count** | **int** | The total of errors, warnings, and completed properties | [readonly] +**CreatedAt** | **DateTimeOffset** | The date and time the batch was created in ShipEngine | [readonly] +**Errors** | **int** | The number of errors that occurred while generating the batch | [readonly] +**FormDownload** | [**OptionalLink**](OptionalLink.md) | The form download for any customs that are needed | [readonly] +**Forms** | **int** | The number of forms for customs that are available for download | [readonly] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | The label download for the batch | [readonly] +**LabelFormat** | **LabelFormat** | | [readonly] +**LabelLayout** | **LabelLayout** | label layout | [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [readonly] +**ProcessErrors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**Status** | **BatchStatus** | | [readonly] +**Warnings** | **int** | The number of warnings that occurred while generating the batch | [readonly] +**BatchNotes** | **string** | Custom notes you can add for each created batch | [readonly] [default to ""] +**ExternalBatchId** | **string** | A string that uniquely identifies the external batch | [readonly] +**ProcessedAt** | **DateTimeOffset** | The date and time the batch was processed in ShipEngine | [readonly] + diff --git a/docs/models/GetBatchByIdResponseBody.md b/docs/models/GetBatchByIdResponseBody.md new file mode 100644 index 00000000..86ed34c9 --- /dev/null +++ b/docs/models/GetBatchByIdResponseBody.md @@ -0,0 +1,29 @@ +# ShipEngineSDK.Model.GetBatchByIdResponseBody +A get batch by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchErrorsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch errors endpoint | [readonly] +**BatchId** | **string** | A string that uniquely identifies the batch | [readonly] +**BatchLabelsUrl** | [**OptionalLink**](OptionalLink.md) | Link to batch labels query | +**BatchNumber** | **string** | The batch number. | [readonly] +**BatchShipmentsUrl** | [**OptionalLink**](OptionalLink.md) | The batch shipments endpoint | +**Completed** | **int** | The number of labels generated in the batch | [readonly] +**Count** | **int** | The total of errors, warnings, and completed properties | [readonly] +**CreatedAt** | **DateTimeOffset** | The date and time the batch was created in ShipEngine | [readonly] +**Errors** | **int** | The number of errors that occurred while generating the batch | [readonly] +**FormDownload** | [**OptionalLink**](OptionalLink.md) | The form download for any customs that are needed | [readonly] +**Forms** | **int** | The number of forms for customs that are available for download | [readonly] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | The label download for the batch | [readonly] +**LabelFormat** | **LabelFormat** | | [readonly] +**LabelLayout** | **LabelLayout** | label layout | [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [readonly] +**ProcessErrors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**Status** | **BatchStatus** | | [readonly] +**Warnings** | **int** | The number of warnings that occurred while generating the batch | [readonly] +**BatchNotes** | **string** | Custom notes you can add for each created batch | [readonly] [default to ""] +**ExternalBatchId** | **string** | A string that uniquely identifies the external batch | [readonly] +**ProcessedAt** | **DateTimeOffset** | The date and time the batch was processed in ShipEngine | [readonly] + diff --git a/docs/models/GetCarrierByIdResponseBody.md b/docs/models/GetCarrierByIdResponseBody.md new file mode 100644 index 00000000..077f31cf --- /dev/null +++ b/docs/models/GetCarrierByIdResponseBody.md @@ -0,0 +1,23 @@ +# ShipEngineSDK.Model.GetCarrierByIdResponseBody +A get carrier by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountNumber** | **string** | The account number that the carrier is connected to. | [optional] [readonly] +**Balance** | **decimal** | Current available balance | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | A string that uniquely identifies the carrier. | [optional] [readonly] +**DisabledByBillingPlan** | **bool** | The carrier is disabled by the current ShipEngine account's billing plan. | [optional] [readonly] +**FriendlyName** | **string** | Screen readable name | [optional] [readonly] +**FundingSourceId** | **string** | Funding source ID for the carrier | [optional] [readonly] +**HasMultiPackageSupportingServices** | **bool** | Carrier supports multiple packages per shipment | [optional] [readonly] +**Nickname** | **string** | Nickname given to the account when initially setting up the carrier. | [optional] [readonly] +**Options** | [**List<CarrierAdvancedOption>**](CarrierAdvancedOption.md) | A list of options that are available to that carrier | [optional] [readonly] +**Packages** | [**List<PackageType>**](PackageType.md) | A list of package types that are supported by the carrier | [optional] [readonly] +**Primary** | **bool** | Is this the primary carrier that is used by default when no carrier is specified in label/shipment creation | [optional] [readonly] +**RequiresFundedAmount** | **bool** | Indicates whether the carrier requires funding to use its services | [optional] [readonly] +**Services** | [**List<Service>**](Service.md) | A list of services that are offered by the carrier | [optional] [readonly] +**SupportsLabelMessages** | **bool** | The carrier supports adding custom label messages to an order. | [optional] [readonly] + diff --git a/docs/models/GetCarrierOptionsResponseBody.md b/docs/models/GetCarrierOptionsResponseBody.md new file mode 100644 index 00000000..056bfcdb --- /dev/null +++ b/docs/models/GetCarrierOptionsResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.GetCarrierOptionsResponseBody +A carrier list options response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Options** | [**List<CarrierAdvancedOption>**](CarrierAdvancedOption.md) | AN array of carrier options | [optional] [readonly] + diff --git a/docs/models/GetCarrierSettingsResponseBody.md b/docs/models/GetCarrierSettingsResponseBody.md new file mode 100644 index 00000000..09397118 --- /dev/null +++ b/docs/models/GetCarrierSettingsResponseBody.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.GetCarrierSettingsResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/GetCarriersResponseBody.md b/docs/models/GetCarriersResponseBody.md new file mode 100644 index 00000000..08891970 --- /dev/null +++ b/docs/models/GetCarriersResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.GetCarriersResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Carriers** | [**List<Carrier>**](Carrier.md) | The carrier response body | [readonly] +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | + diff --git a/docs/models/GetInsuranceBalanceResponseBody.md b/docs/models/GetInsuranceBalanceResponseBody.md new file mode 100644 index 00000000..a54866e3 --- /dev/null +++ b/docs/models/GetInsuranceBalanceResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.GetInsuranceBalanceResponseBody +A get insurance balance response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **decimal** | The monetary amount, in the specified currency. | +**Currency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | + diff --git a/docs/models/GetLabelByExternalShipmentIdResponseBody.md b/docs/models/GetLabelByExternalShipmentIdResponseBody.md new file mode 100644 index 00000000..71950a4b --- /dev/null +++ b/docs/models/GetLabelByExternalShipmentIdResponseBody.md @@ -0,0 +1,47 @@ +# ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody +A get label by external shipment id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Additional information some carriers may provide by which to identify a given label in their system. | [optional] [readonly] +**BatchId** | **string** | If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the label was created in ShipEngine. | [optional] [readonly] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**FormDownload** | [**Link**](Link.md) | The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. | [optional] [readonly] +**InsuranceClaim** | [**Link**](Link.md) | The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. | [optional] [readonly] +**InsuranceCost** | [**MonetaryValue**](MonetaryValue.md) | The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. | [optional] [readonly] +**IsInternational** | **bool** | Indicates whether this is an international shipment. That is, the originating country and destination country are different. | [optional] [readonly] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | | [optional] [readonly] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelId** | **string** | A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. | [optional] [readonly] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] [readonly] +**Packages** | [**List<LabelPackagesInner>**](LabelPackagesInner.md) | The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] [readonly] +**Shipment** | [**Shipment**](Shipment.md) | The shipment information used to generate the label | [optional] +**ShipmentCost** | [**MonetaryValue**](MonetaryValue.md) | The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. | [optional] [readonly] +**ShipmentId** | **string** | The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) | [optional] [readonly] +**Status** | **LabelStatus** | | [optional] [readonly] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**Trackable** | **bool** | Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. Tracking number formats vary across carriers. | [optional] [readonly] +**TrackingStatus** | **TrackingStatus** | The current status of the package, such as `in_transit` or `delivered` | [optional] [readonly] +**TrackingUrl** | **string** | The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**Voided** | **bool** | Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) | [optional] [readonly] +**VoidedAt** | **DateTimeOffset** | The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided | [optional] [readonly] + diff --git a/docs/models/GetLabelByIdResponseBody.md b/docs/models/GetLabelByIdResponseBody.md new file mode 100644 index 00000000..4b4fb7ed --- /dev/null +++ b/docs/models/GetLabelByIdResponseBody.md @@ -0,0 +1,47 @@ +# ShipEngineSDK.Model.GetLabelByIdResponseBody +A get label by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Additional information some carriers may provide by which to identify a given label in their system. | [optional] [readonly] +**BatchId** | **string** | If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the label was created in ShipEngine. | [optional] [readonly] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**FormDownload** | [**Link**](Link.md) | The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. | [optional] [readonly] +**InsuranceClaim** | [**Link**](Link.md) | The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. | [optional] [readonly] +**InsuranceCost** | [**MonetaryValue**](MonetaryValue.md) | The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. | [optional] [readonly] +**IsInternational** | **bool** | Indicates whether this is an international shipment. That is, the originating country and destination country are different. | [optional] [readonly] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | | [optional] [readonly] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelId** | **string** | A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. | [optional] [readonly] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] [readonly] +**Packages** | [**List<LabelPackagesInner>**](LabelPackagesInner.md) | The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] [readonly] +**Shipment** | [**Shipment**](Shipment.md) | The shipment information used to generate the label | [optional] +**ShipmentCost** | [**MonetaryValue**](MonetaryValue.md) | The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. | [optional] [readonly] +**ShipmentId** | **string** | The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) | [optional] [readonly] +**Status** | **LabelStatus** | | [optional] [readonly] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**Trackable** | **bool** | Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. Tracking number formats vary across carriers. | [optional] [readonly] +**TrackingStatus** | **TrackingStatus** | The current status of the package, such as `in_transit` or `delivered` | [optional] [readonly] +**TrackingUrl** | **string** | The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**Voided** | **bool** | Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) | [optional] [readonly] +**VoidedAt** | **DateTimeOffset** | The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided | [optional] [readonly] + diff --git a/docs/models/GetManifestByIdResponseBody.md b/docs/models/GetManifestByIdResponseBody.md new file mode 100644 index 00000000..aa0c721e --- /dev/null +++ b/docs/models/GetManifestByIdResponseBody.md @@ -0,0 +1,18 @@ +# ShipEngineSDK.Model.GetManifestByIdResponseBody +A get manifest by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | A string that uniquely identifies the carrier | [readonly] +**CreatedAt** | **DateTimeOffset** | The date-time that the manifest was created | [readonly] +**FormId** | **string** | A string that uniquely identifies the form | [readonly] +**LabelIds** | **List<string>** | An array of the label ids used in this manifest. | [readonly] +**ManifestDownload** | [**ManifestDownload**](ManifestDownload.md) | | [readonly] +**ManifestId** | **string** | A string that uniquely identifies the manifest | [readonly] +**ShipDate** | **DateTimeOffset** | The date-time that the manifests shipments will be picked up | [readonly] +**Shipments** | **int** | The number of shipments that are included in this manifest | [readonly] +**SubmissionId** | **string** | A string that uniquely identifies the submission | [readonly] +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [readonly] + diff --git a/docs/models/GetPackageTypeByIdResponseBody.md b/docs/models/GetPackageTypeByIdResponseBody.md new file mode 100644 index 00000000..a92dad24 --- /dev/null +++ b/docs/models/GetPackageTypeByIdResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.GetPackageTypeByIdResponseBody +A get package type by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**PackageCode** | **string** | A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. | +**Description** | **string** | Provides a helpful description for the custom package. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The custom dimensions for the package. | [optional] +**PackageId** | **string** | A string that uniquely identifies the package. | [optional] + diff --git a/docs/models/GetPickupByIdResponseBody.md b/docs/models/GetPickupByIdResponseBody.md new file mode 100644 index 00000000..17867951 --- /dev/null +++ b/docs/models/GetPickupByIdResponseBody.md @@ -0,0 +1,21 @@ +# ShipEngineSDK.Model.GetPickupByIdResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | The carrier_id associated with the pickup | [readonly] +**ContactDetails** | [**ContactDetails**](ContactDetails.md) | | +**CreatedAt** | **DateTimeOffset** | The date and time that the pickup was created in ShipEngine. | [readonly] +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**LabelIds** | **List<string>** | Label IDs that will be included in the pickup request | +**PickupAddress** | [**Address**](Address.md) | | [readonly] +**PickupId** | **string** | Pickup Resource ID | [readonly] +**PickupWindow** | [**PickupWindow**](PickupWindow.md) | | +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | +**WarehouseId** | **string** | The warehouse_id associated with the pickup | [readonly] +**CancelledAt** | **DateTimeOffset** | The date and time that the pickup was cancelled in ShipEngine. | [optional] [readonly] +**ConfirmationNumber** | **string** | The carrier confirmation number for the scheduled pickup. | [readonly] +**PickupNotes** | **string** | Used by some carriers to give special instructions for a package pickup | [optional] +**PickupWindows** | [**List<PickupWindows>**](PickupWindows.md) | An array of available pickup windows. Carriers can return multiple times that they will pickup packages. | [optional] [readonly] + diff --git a/docs/models/GetPickupsResponseBody.md b/docs/models/GetPickupsResponseBody.md new file mode 100644 index 00000000..b7a140f3 --- /dev/null +++ b/docs/models/GetPickupsResponseBody.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.GetPickupsResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**Links** | [**PaginationLink**](PaginationLink.md) | Helpful links to other pages of results | [readonly] +**Page** | **int** | Current page of the list pickups results | [readonly] +**Pages** | **int** | Total number of pages for list pickups results | [readonly] +**Pickups** | [**List<Pickup>**](Pickup.md) | An array of pickups associated with the user's account. | +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | +**Total** | **long** | The total number of pickups returned | [readonly] + diff --git a/docs/models/GetRateByIdResponseBody.md b/docs/models/GetRateByIdResponseBody.md new file mode 100644 index 00000000..62e1ea9a --- /dev/null +++ b/docs/models/GetRateByIdResponseBody.md @@ -0,0 +1,35 @@ +# ShipEngineSDK.Model.GetRateByIdResponseBody +A rate response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierCode** | **string** | carrier code | [readonly] +**CarrierFriendlyName** | **string** | carrier friendly name | [readonly] +**CarrierId** | **string** | A string that uniquely identifies the carrier | [readonly] +**CarrierNickname** | **string** | carrier nickname | [readonly] +**ConfirmationAmount** | [**MonetaryValue**](MonetaryValue.md) | The confirmation amount. Should be added with shipping_amount, insurance_amount and other_amount to calculate the total purchase price. | [readonly] +**ErrorMessages** | **List<string>** | The error messages | [readonly] +**GuaranteedService** | **bool** | Indicates if the rate is guaranteed. | [readonly] +**InsuranceAmount** | [**MonetaryValue**](MonetaryValue.md) | The insurance amount. Should be added with shipping_amount, confirmation_amount and other_amount to calculate the total purchase price. | [readonly] +**NegotiatedRate** | **bool** | Indicates if the rates been negotiated | [readonly] +**OtherAmount** | [**MonetaryValue**](MonetaryValue.md) | Any other charges associated with this rate. Should be added with shipping_amount, insurance_amount and confirmation_amount to calculate the total purchase price. | [readonly] +**RateId** | **string** | A string that uniquely identifies the rate | [readonly] +**RateType** | **RateType** | | [readonly] +**ServiceCode** | **string** | service code for the rate | [readonly] +**ServiceType** | **string** | service type | [readonly] +**ShippingAmount** | [**MonetaryValue**](MonetaryValue.md) | The shipping amount. Should be added with confirmation_amount, insurance_amount and other_amount to calculate the total purchase price. | [readonly] +**Trackable** | **bool** | Indicates if rate is trackable | [readonly] +**ValidationStatus** | **ValidationStatus** | | [readonly] +**WarningMessages** | **List<string>** | The warning messages | [readonly] +**CarrierDeliveryDays** | **string** | The carrier delivery days | [optional] [readonly] +**DeliveryDays** | **int** | The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday | [optional] [readonly] +**EstimatedDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. | [optional] [readonly] +**PackageType** | **string** | package type that this rate was estimated for | [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with this rate. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | ship date | [optional] [readonly] +**TaxAmount** | [**MonetaryValue**](MonetaryValue.md) | Tariff and additional taxes associated with an international shipment. | [optional] [readonly] +**Zone** | **int** | Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location | [readonly] + diff --git a/docs/models/GetServicePointByIdResponseBody.md b/docs/models/GetServicePointByIdResponseBody.md new file mode 100644 index 00000000..cfab0704 --- /dev/null +++ b/docs/models/GetServicePointByIdResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.GetServicePointByIdResponseBody +A get service point by ID response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ServicePoint** | [**GetServicePointByIdResponseBodyServicePoint**](GetServicePointByIdResponseBodyServicePoint.md) | | [optional] + diff --git a/docs/models/GetServicePointByIdResponseBodyServicePoint.md b/docs/models/GetServicePointByIdResponseBodyServicePoint.md new file mode 100644 index 00000000..0eca8a95 --- /dev/null +++ b/docs/models/GetServicePointByIdResponseBodyServicePoint.md @@ -0,0 +1,22 @@ +# ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | [optional] +**CarrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] +**CityLocality** | **string** | The name of the city or locality | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**CountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**Features** | **List<GetServicePointByIdResponseBodyServicePoint.FeaturesEnum>** | Service features | [optional] +**HoursOfOperation** | [**ListServicePointsResponseBodyServicePointsInnerHoursOfOperation**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.md) | | [optional] +**Lat** | **double** | The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html | [optional] +**Long** | **double** | The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html | [optional] +**PhoneNumber** | **string** | Phone number associated | [optional] +**PostalCode** | **string** | postal code | [optional] +**ServiceCodes** | **List<string>** | | [optional] +**ServicePointId** | **string** | A unique identifier for a carrier drop off point. | [optional] +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | [optional] +**Type** | **string** | Service point type | [optional] [default to TypeEnum.Pudo] + diff --git a/docs/models/GetServicePointsRequest.md b/docs/models/GetServicePointsRequest.md new file mode 100644 index 00000000..71b86ff9 --- /dev/null +++ b/docs/models/GetServicePointsRequest.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.GetServicePointsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/GetServicePointsRequestBody.md b/docs/models/GetServicePointsRequestBody.md new file mode 100644 index 00000000..5c1d4ebf --- /dev/null +++ b/docs/models/GetServicePointsRequestBody.md @@ -0,0 +1,16 @@ +# ShipEngineSDK.Model.GetServicePointsRequestBody +A get service points request body. Caller must provide exactly one of address_query, address, or lat / long pair. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Providers** | [**List<GetServicePointsRequestBodyProvidersInner>**](GetServicePointsRequestBodyProvidersInner.md) | An array of shipping service providers and service codes | +**Address** | [**GetServicePointsRequestBodyAddress**](GetServicePointsRequestBodyAddress.md) | | [optional] +**AddressQuery** | **string** | Unstructured text to search for service points by. | [optional] +**Lat** | **double** | The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html | [optional] +**Long** | **double** | The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html | [optional] +**MaxResults** | **int** | The maximum number of service points to return | [optional] +**Radius** | **int** | Search radius in kilometers | [optional] +**Shipment** | [**GetServicePointsRequestBodyShipment**](GetServicePointsRequestBodyShipment.md) | | [optional] + diff --git a/docs/models/GetServicePointsRequestBodyAddress.md b/docs/models/GetServicePointsRequestBodyAddress.md new file mode 100644 index 00000000..8abc77eb --- /dev/null +++ b/docs/models/GetServicePointsRequestBodyAddress.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.GetServicePointsRequestBodyAddress +Structured address to search by. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | [optional] +**AddressLine2** | **string** | | [optional] +**AddressLine3** | **string** | | [optional] +**CityLocality** | **string** | The name of the city or locality | [optional] +**PostalCode** | **string** | postal code | [optional] +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | [optional] + diff --git a/docs/models/GetServicePointsRequestBodyProvidersInner.md b/docs/models/GetServicePointsRequestBodyProvidersInner.md new file mode 100644 index 00000000..7308c73a --- /dev/null +++ b/docs/models/GetServicePointsRequestBodyProvidersInner.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | Uniquely identifies a carrier connection | [optional] +**ServiceCode** | **List<string>** | | [optional] + diff --git a/docs/models/GetServicePointsRequestBodyShipment.md b/docs/models/GetServicePointsRequestBodyShipment.md new file mode 100644 index 00000000..aeb61488 --- /dev/null +++ b/docs/models/GetServicePointsRequestBodyShipment.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.GetServicePointsRequestBodyShipment +Shipment information to be used for service point selection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Packages** | [**List<GetServicePointsRequestBodyShipmentPackagesInner>**](GetServicePointsRequestBodyShipmentPackagesInner.md) | An array of package dimensions | [optional] +**TotalWeight** | [**Weight**](Weight.md) | Shipment total weight | [optional] + diff --git a/docs/models/GetServicePointsRequestBodyShipmentPackagesInner.md b/docs/models/GetServicePointsRequestBodyShipmentPackagesInner.md new file mode 100644 index 00000000..a475bf2b --- /dev/null +++ b/docs/models/GetServicePointsRequestBodyShipmentPackagesInner.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.GetServicePointsRequestBodyShipmentPackagesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Dimensions** | [**Dimensions**](Dimensions.md) | The package dimensions | [optional] + diff --git a/docs/models/GetShipmentByExternalIdResponseBody.md b/docs/models/GetShipmentByExternalIdResponseBody.md new file mode 100644 index 00000000..5bd48b6c --- /dev/null +++ b/docs/models/GetShipmentByExternalIdResponseBody.md @@ -0,0 +1,35 @@ +# ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody +A get shipment by external id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [readonly] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [readonly] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [readonly] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [readonly] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [readonly] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | + diff --git a/docs/models/GetShipmentByIdResponseBody.md b/docs/models/GetShipmentByIdResponseBody.md new file mode 100644 index 00000000..fc9a9720 --- /dev/null +++ b/docs/models/GetShipmentByIdResponseBody.md @@ -0,0 +1,35 @@ +# ShipEngineSDK.Model.GetShipmentByIdResponseBody +A get shipment by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [readonly] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [readonly] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [readonly] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [readonly] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [readonly] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | + diff --git a/docs/models/GetTrackingLogFromLabelResponseBody.md b/docs/models/GetTrackingLogFromLabelResponseBody.md new file mode 100644 index 00000000..5c08a11f --- /dev/null +++ b/docs/models/GetTrackingLogFromLabelResponseBody.md @@ -0,0 +1,24 @@ +# ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody +A get tracking log from label response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierStatusCode** | **string** | Carrier status code | [readonly] +**Events** | [**List<TrackEvent>**](TrackEvent.md) | The events that have occured during the lifetime of this tracking number. | [readonly] +**StatusCode** | **StatusCode** | | +**TrackingNumber** | **string** | A tracking number for a package. The format depends on the carrier. | +**ActualDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**CarrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] +**CarrierDetailCode** | **string** | Carrier detail code | [optional] [readonly] +**CarrierId** | **int** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**CarrierStatusDescription** | **string** | carrier status description | [optional] [readonly] +**EstimatedDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**ExceptionDescription** | **string** | Exception description | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**StatusDescription** | **string** | Status description | [optional] [readonly] +**StatusDetailCode** | **StatusDetailCode** | | [optional] +**StatusDetailDescription** | **string** | Status detail description | [optional] [readonly] +**TrackingUrl** | **string** | Carrier Tracking Url, if available | [optional] [readonly] + diff --git a/docs/models/GetTrackingLogResponseBody.md b/docs/models/GetTrackingLogResponseBody.md new file mode 100644 index 00000000..7f650ff9 --- /dev/null +++ b/docs/models/GetTrackingLogResponseBody.md @@ -0,0 +1,24 @@ +# ShipEngineSDK.Model.GetTrackingLogResponseBody +A get tracking log response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | +**CarrierDetailCode** | **string** | Carrier detail code | [readonly] +**CarrierId** | **int** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [readonly] +**CarrierStatusCode** | **string** | Carrier status code | [readonly] +**Events** | [**List<TrackEvent>**](TrackEvent.md) | The events that have occured during the lifetime of this tracking number. | [readonly] +**StatusCode** | **StatusCode** | | +**TrackingNumber** | **string** | A tracking number for a package. The format depends on the carrier. | +**TrackingUrl** | **string** | Carrier Tracking Url, if available | [readonly] +**ActualDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**CarrierStatusDescription** | **string** | carrier status description | [optional] [readonly] +**EstimatedDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**ExceptionDescription** | **string** | Exception description | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**StatusDescription** | **string** | Status description | [optional] [readonly] +**StatusDetailCode** | **StatusDetailCode** | | [optional] +**StatusDetailDescription** | **string** | Status detail description | [optional] [readonly] + diff --git a/docs/models/GetWarehouseByIdResponseBody.md b/docs/models/GetWarehouseByIdResponseBody.md new file mode 100644 index 00000000..2b5dab6a --- /dev/null +++ b/docs/models/GetWarehouseByIdResponseBody.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.GetWarehouseByIdResponseBody +A get warehouse by id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **DateTimeOffset** | Timestamp that indicates when the warehouse was created | [readonly] +**Name** | **string** | Name of the warehouse | +**OriginAddress** | [**Address**](Address.md) | The origin address of the warehouse | +**ReturnAddress** | [**Address**](Address.md) | The return address associated with the warehouse | +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [readonly] +**IsDefault** | **bool** | Designates which single warehouse is the default on the account | [optional] [default to false] + diff --git a/docs/models/GetWebhookByIdResponseBody.md b/docs/models/GetWebhookByIdResponseBody.md new file mode 100644 index 00000000..3d868e26 --- /dev/null +++ b/docs/models/GetWebhookByIdResponseBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.GetWebhookByIdResponseBody +A get webhook id response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Event** | **WebhookEvent** | | +**Url** | **string** | The url that the webhook sends the request to | +**WebhookId** | **string** | A string that uniquely identifies the webhook | [readonly] +**Headers** | [**List<WebhookHeader>**](WebhookHeader.md) | Array of custom webhook headers | [optional] + diff --git a/docs/models/IdentifierType.md b/docs/models/IdentifierType.md new file mode 100644 index 00000000..fbec44f1 --- /dev/null +++ b/docs/models/IdentifierType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.IdentifierType +Tax identifier type for customs declaration |Pickup Type | Description |- -- -- -- -- -- -- --|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`vat` | The tax identifier is a Value Added Tax. |`eori` | The tax identifier is an Economic Operators Registration and Identification Number (EORI). |`ssn` | The tax identifier is a Social Security Number. |`ein` | The tax identifier is an Employer Identification Number (EIN). |`tin` | The tax identifier is a Tax Identification Number (TIN). |`ioss` | The tax identifier is an Import One-Stop Shop (IOSS). |`pan` | The tax identifier is a Permanent Account Number (PAN). |`voec` | The tax identifier is a Norwegian VAT On E-Commerce(VOEC). |`pccc` | The tax identifier is a Personal Customs Clearance Code (PCCC). |`oss` | The tax identifier is an One-Stop Shop (OSS). |`passport` | The tax identifier is a Passport Number. |`abn` | The tax identifier is an Australian Business Number. |`ukims` | The tax identifier is an UK Internal Market Scheme number. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ImporterOfRecords.md b/docs/models/ImporterOfRecords.md new file mode 100644 index 00000000..eaec0557 --- /dev/null +++ b/docs/models/ImporterOfRecords.md @@ -0,0 +1,19 @@ +# ShipEngineSDK.Model.ImporterOfRecords +importer of records address, anywhere in the world. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | +**CityLocality** | **string** | The name of the city or locality | +**CountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | +**Name** | **string** | The name of a contact person at this address. Either `name` or the `company_name` field should always be set. | +**PostalCode** | **string** | postal code | +**AddressLine2** | **string** | The second line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressLine3** | **string** | The third line of the street address. For some addresses, this line may not be needed. | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. Either `name` or the `company_name` field should always be set. | [optional] +**Email** | **string** | Email for the address owner. | [optional] +**Phone** | **string** | The phone number of a contact person at this address. The format of this phone number varies depending on the country. | [optional] +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | [optional] + diff --git a/docs/models/InsuranceProvider.md b/docs/models/InsuranceProvider.md new file mode 100644 index 00000000..e71ccc37 --- /dev/null +++ b/docs/models/InsuranceProvider.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.InsuranceProvider +The possible insurance provider values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/InternationalShipmentOptions.md b/docs/models/InternationalShipmentOptions.md new file mode 100644 index 00000000..dead2ff2 --- /dev/null +++ b/docs/models/InternationalShipmentOptions.md @@ -0,0 +1,16 @@ +# ShipEngineSDK.Model.InternationalShipmentOptions +Options for international shipments, such as customs declarations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contents** | **PackageContents** | The type of contents in this shipment. This may impact import duties or customs treatment. | +**NonDelivery** | **NonDelivery** | Indicates what to do if a package is unable to be delivered. | +**ContentsExplanation** | **string** | Explanation for contents (required if the `contents` is provided as `other`) | [optional] +**CustomsItems** | [**List<CustomsItem>**](CustomsItem.md) | Customs declarations for each item in the shipment. (Please provide this information under `products` inside `packages`) | [optional] +**Declaration** | **string** | Declaration statement to be placed on the commercial invoice | [optional] +**ImporterOfRecord** | [**ImporterOfRecords**](ImporterOfRecords.md) | | [optional] +**InvoiceAdditionalDetails** | [**InvoiceAdditionalDetails**](InvoiceAdditionalDetails.md) | | [optional] +**TermsOfTradeCode** | **AllowedIncoterms** | Specifies the supported terms of trade code (incoterms) | [optional] + diff --git a/docs/models/InvoiceAdditionalDetails.md b/docs/models/InvoiceAdditionalDetails.md new file mode 100644 index 00000000..7a3bdb99 --- /dev/null +++ b/docs/models/InvoiceAdditionalDetails.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.InvoiceAdditionalDetails +The additional information to put on commercial invoice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Discount** | [**MonetaryValue**](MonetaryValue.md) | Discount for shipment. | [optional] +**FreightCharge** | [**MonetaryValue**](MonetaryValue.md) | Freight Charge for shipment. | [optional] +**InsuranceCharge** | [**MonetaryValue**](MonetaryValue.md) | Insurance Charge for shipment. | [optional] +**OtherCharge** | [**MonetaryValue**](MonetaryValue.md) | Other charge for shipment. | [optional] +**OtherChargeDescription** | **string** | Description for the other charge (if provided). | [optional] + diff --git a/docs/models/Label.md b/docs/models/Label.md new file mode 100644 index 00000000..6d99d562 --- /dev/null +++ b/docs/models/Label.md @@ -0,0 +1,47 @@ +# ShipEngineSDK.Model.Label +A label represents the physical sticker that you affix to a package to ship it. ShipEngine makes it easy for you to [create labels](https://www.shipengine.com/docs/labels/create-a-label/) and then download them in PDF, PNG, or ZPL format so you can print them. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Additional information some carriers may provide by which to identify a given label in their system. | [optional] [readonly] +**BatchId** | **string** | If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch. | [optional] [readonly] +**CarrierCode** | **string** | The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] [readonly] +**CarrierId** | **string** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the label was created in ShipEngine. | [optional] [readonly] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**FormDownload** | [**Link**](Link.md) | The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it. | [optional] [readonly] +**InsuranceClaim** | [**Link**](Link.md) | The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission. | [optional] [readonly] +**InsuranceCost** | [**MonetaryValue**](MonetaryValue.md) | The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost. | [optional] [readonly] +**IsInternational** | **bool** | Indicates whether this is an international shipment. That is, the originating country and destination country are different. | [optional] [readonly] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | | [optional] [readonly] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelId** | **string** | A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created. | [optional] [readonly] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] [readonly] +**Packages** | [**List<LabelPackagesInner>**](LabelPackagesInner.md) | The label's package(s). > **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned. | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with shipping cost. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] [readonly] +**Shipment** | [**Shipment**](Shipment.md) | The shipment information used to generate the label | [optional] +**ShipmentCost** | [**MonetaryValue**](MonetaryValue.md) | The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs. | [optional] [readonly] +**ShipmentId** | **string** | The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/) | [optional] [readonly] +**Status** | **LabelStatus** | | [optional] [readonly] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**Trackable** | **bool** | Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`. | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. Tracking number formats vary across carriers. | [optional] [readonly] +**TrackingStatus** | **TrackingStatus** | The current status of the package, such as `in_transit` or `delivered` | [optional] [readonly] +**TrackingUrl** | **string** | The URL to track the package. This URL is provided by the carrier and is unique to the tracking number. | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**Voided** | **bool** | Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/) | [optional] [readonly] +**VoidedAt** | **DateTimeOffset** | The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided | [optional] [readonly] + diff --git a/docs/models/LabelChargeEvent.md b/docs/models/LabelChargeEvent.md new file mode 100644 index 00000000..7e911b4c --- /dev/null +++ b/docs/models/LabelChargeEvent.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.LabelChargeEvent +Determines when the user's account will be charged for the label. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/LabelDownload.md b/docs/models/LabelDownload.md new file mode 100644 index 00000000..0ea59414 --- /dev/null +++ b/docs/models/LabelDownload.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.LabelDownload +Reference to the various downloadable file formats for the generated label + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | The URL of the linked resource, if any | [optional] +**Pdf** | **string** | The URL for the pdf generated label | [optional] +**Png** | **string** | The URL for the png generated label | [optional] +**Zpl** | **string** | The URL for the zpl generated label | [optional] + diff --git a/docs/models/LabelDownloadType.md b/docs/models/LabelDownloadType.md new file mode 100644 index 00000000..857bc454 --- /dev/null +++ b/docs/models/LabelDownloadType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.LabelDownloadType +There are two different ways to [download a label](https://www.shipengine.com/docs/labels/downloading/): |Label Download Type | Description |- -- -- -- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - |`url` |You will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.

This is the default if `label_download_type` is unspecified. |`inline` |You will receive the Base64-encoded label as part of the response. No need for a second request to download the label. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/LabelFormat.md b/docs/models/LabelFormat.md new file mode 100644 index 00000000..f219e34c --- /dev/null +++ b/docs/models/LabelFormat.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.LabelFormat +The possible file formats in which shipping labels can be downloaded. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. |Label Format | Supported Carriers |- -- -- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`pdf` | All carriers |`png` | `fedex`
`stamps_com`
`ups`
`usps` |`zpl` | `access_worldwide`
`apc`
`asendia`
`dhl_global_mail`
`dhl_express`
`dhl_express_australia`
`dhl_express_canada`
`dhl_express_worldwide`
`dhl_express_uk`
`dpd`
`endicia`
`fedex`
`fedex_uk`
`firstmile`
`imex`
`newgistics`
`ontrac`
`rr_donnelley`
`stamps_com`
`ups`
`usps` + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/LabelLayout.md b/docs/models/LabelLayout.md new file mode 100644 index 00000000..950666bc --- /dev/null +++ b/docs/models/LabelLayout.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.LabelLayout +The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/LabelMessages.md b/docs/models/LabelMessages.md new file mode 100644 index 00000000..23547907 --- /dev/null +++ b/docs/models/LabelMessages.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.LabelMessages +Custom messages to print on the shipping label for the package. These are typically used to print invoice numbers, product numbers, or other internal reference numbers. Not all carriers support label messages. The number of lines and the maximum length of each line also varies by carrier. |Carrier |Max lines |Max line length |- -- -- -- -- -- -- -- -- --|- -- -- -- -- -|- -- -- -- -- -- -- -- -- -- - |USPS (Stamps.com) |3 |60 |FedEx |3 |35 for the first line. 30 for additional lines. |UPS |2 |35 |OnTrac |2 |25 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reference1** | **string** | The first line of the custom label message. Some carriers may prefix this line with something like \"REF\", \"Reference\", \"Trx Ref No.\", etc. | +**Reference2** | **string** | The second line of the custom label message. Some carriers may prefix this line with something like \"INV\", \"Reference 2\", \"Trx Ref No.\", etc. | +**Reference3** | **string** | The third line of the custom label message. Some carriers may prefix this line with something like \"PO\", \"Reference 3\", etc. | + diff --git a/docs/models/LabelPackage.md b/docs/models/LabelPackage.md new file mode 100644 index 00000000..6a6256ab --- /dev/null +++ b/docs/models/LabelPackage.md @@ -0,0 +1,26 @@ +# ShipEngineSDK.Model.LabelPackage +A package returned in the response from creating a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Weight** | [**Weight**](Weight.md) | The package weight | +**ContentDescription** | **string** | A short description of the package content. Required for shipments moving to, from, and through Mexico. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The package dimensions | [optional] +**ExternalPackageId** | **string** | An external package id. | [optional] +**FormDownload** | [**OptionalLink**](OptionalLink.md) | The form download for any customs that are needed | [optional] [readonly] +**HasFormDocuments** | **bool** | Whether the package has form documents available for download | [optional] +**HasLabelDocuments** | **bool** | Whether the package has label documents available for download | [optional] +**HasPaperlessLabelDocuments** | **bool** | Whether the package has paperless documents available for download | [optional] +**HasQrCodeDocuments** | **bool** | Whether the package has QR code documents available for download | [optional] +**InsuredValue** | [**MonetaryValue**](MonetaryValue.md) | The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | The label download for the package | [optional] [readonly] +**LabelMessages** | [**LabelMessages**](LabelMessages.md) | | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] +**PackageId** | **int** | The shipment package id | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**QrCodeDownload** | [**OptionalLink**](OptionalLink.md) | The QR code download for the package | [optional] [readonly] +**Sequence** | **int** | Package sequence | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. The format depends on the carrier. | [optional] [readonly] + diff --git a/docs/models/LabelPackagesInner.md b/docs/models/LabelPackagesInner.md new file mode 100644 index 00000000..f65eae43 --- /dev/null +++ b/docs/models/LabelPackagesInner.md @@ -0,0 +1,26 @@ +# ShipEngineSDK.Model.LabelPackagesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Weight** | [**Weight**](Weight.md) | The package weight | +**AlternativeIdentifiers** | [**List<AlternativeIdentifier>**](AlternativeIdentifier.md) | Alternative identifiers associated with this package. | [optional] [readonly] +**ContentDescription** | **string** | A short description of the package content. Required for shipments moving to, from, and through Mexico. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The package dimensions | [optional] +**ExternalPackageId** | **string** | An external package id. | [optional] +**FormDownload** | [**OptionalLink**](OptionalLink.md) | The form download for any customs that are needed | [optional] [readonly] +**HasFormDocuments** | **bool** | Whether the package has form documents available for download | [optional] +**HasLabelDocuments** | **bool** | Whether the package has label documents available for download | [optional] +**HasPaperlessLabelDocuments** | **bool** | Whether the package has paperless documents available for download | [optional] +**HasQrCodeDocuments** | **bool** | Whether the package has QR code documents available for download | [optional] +**InsuredValue** | [**MonetaryValue**](MonetaryValue.md) | The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. | [optional] +**LabelDownload** | [**LabelDownload**](LabelDownload.md) | The label download for the package | [optional] [readonly] +**LabelMessages** | [**LabelMessages**](LabelMessages.md) | | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] +**PackageId** | **int** | The shipment package id | [optional] [readonly] +**PaperlessDownload** | [**PaperlessDownload**](PaperlessDownload.md) | The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. | [optional] [readonly] +**QrCodeDownload** | [**OptionalLink**](OptionalLink.md) | The QR code download for the package | [optional] [readonly] +**Sequence** | **int** | Package sequence | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. The format depends on the carrier. | [optional] [readonly] + diff --git a/docs/models/LabelRequest.md b/docs/models/LabelRequest.md new file mode 100644 index 00000000..51d6645a --- /dev/null +++ b/docs/models/LabelRequest.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.LabelRequest +A label represents the physical sticker that you affix to a package to ship it. ShipEngine makes it easy for you to [create labels](https://www.shipengine.com/docs/labels/create-a-label/) and then download them in PDF, PNG, or ZPL format so you can print them. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChargeEvent** | **LabelChargeEvent** | The label charge event. | [optional] +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**IsReturnLabel** | **bool** | Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned. | [optional] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats. | [optional] +**LabelImageId** | **string** | The label image resource that was used to create a custom label image. | [optional] +**LabelLayout** | **LabelLayout** | The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format. | [optional] +**OutboundLabelId** | **string** | The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. | [optional] +**RmaNumber** | **string** | An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value. | [optional] +**Shipment** | [**ShipmentRequest**](ShipmentRequest.md) | The shipment information used to generate the label | [optional] +**TestLabel** | **bool** | Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. | [optional] [default to false] +**ValidateAddress** | **ValidateAddress** | | [optional] + diff --git a/docs/models/LabelStatus.md b/docs/models/LabelStatus.md new file mode 100644 index 00000000..73a16d58 --- /dev/null +++ b/docs/models/LabelStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.LabelStatus +The possible statuses that a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/) can be in. |Status |Description |:- -- -- -- -- -- -|:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`processing` |When labels are created in a [batch](https://www.shipengine.com/docs/labels/bulk/), it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in `processing` status. |`completed` |The label was successfully created |`error` |The label could not be created due to an error, such as an invalid delivery address |`voided` |The label has been [voided](https://www.shipengine.com/docs/labels/voiding/) + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/Link.md b/docs/models/Link.md new file mode 100644 index 00000000..1ad9612a --- /dev/null +++ b/docs/models/Link.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.Link +A link to a related resource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | The URL of the linked resource, if any | +**Type** | **string** | The type of resource, or the type of relationship to the parent resource | [optional] + diff --git a/docs/models/ListAccountImagesResponseBody.md b/docs/models/ListAccountImagesResponseBody.md new file mode 100644 index 00000000..5b8a92ae --- /dev/null +++ b/docs/models/ListAccountImagesResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ListAccountImagesResponseBody +A list account images response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Images** | **List<Object>** | Image List | [readonly] +**Links** | [**PaginationLink**](PaginationLink.md) | | +**Page** | **int** | The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. | +**Pages** | **int** | The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. | +**Total** | **int** | The total number of items across all pages of results | + diff --git a/docs/models/ListAccountSettingsBody.md b/docs/models/ListAccountSettingsBody.md new file mode 100644 index 00000000..5dc37b5a --- /dev/null +++ b/docs/models/ListAccountSettingsBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListAccountSettingsBody +An account settings list response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultLabelLayout** | **DefaultLabelLayout** | | [optional] + diff --git a/docs/models/ListAccountSettingsImagesResponseBody.md b/docs/models/ListAccountSettingsImagesResponseBody.md new file mode 100644 index 00000000..9c54f299 --- /dev/null +++ b/docs/models/ListAccountSettingsImagesResponseBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Images** | **List<Object>** | Image List | [readonly] +**Links** | [**PaginationLink**](PaginationLink.md) | | +**Page** | **int** | The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. | +**Pages** | **int** | The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. | +**Total** | **int** | The total number of items across all pages of results | + diff --git a/docs/models/ListBatchErrorsResponseBody.md b/docs/models/ListBatchErrorsResponseBody.md new file mode 100644 index 00000000..44c65487 --- /dev/null +++ b/docs/models/ListBatchErrorsResponseBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ListBatchErrorsResponseBody +A batch errors response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<BatchResponseError>**](BatchResponseError.md) | The errors currently associated with the batch | [readonly] +**Links** | [**PaginationLink**](PaginationLink.md) | | [readonly] + diff --git a/docs/models/ListBatchesResponseBody.md b/docs/models/ListBatchesResponseBody.md new file mode 100644 index 00000000..80b94f38 --- /dev/null +++ b/docs/models/ListBatchesResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ListBatchesResponseBody +A list batch response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Batches** | [**List<Batch>**](Batch.md) | Batch List | [readonly] +**Links** | [**PaginationLink**](PaginationLink.md) | | [readonly] +**Page** | **int** | The page that is currently being read | [readonly] +**Pages** | **int** | The total number of batch pages the API call returned | [readonly] +**Total** | **long** | The total number of batches the API call returned | [readonly] + diff --git a/docs/models/ListCarrierPackageTypesResponseBody.md b/docs/models/ListCarrierPackageTypesResponseBody.md new file mode 100644 index 00000000..dfcfca35 --- /dev/null +++ b/docs/models/ListCarrierPackageTypesResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListCarrierPackageTypesResponseBody +A list carrier package types response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Packages** | [**List<PackageType>**](PackageType.md) | An array of custom package types | [optional] [readonly] + diff --git a/docs/models/ListCarrierServicesResponseBody.md b/docs/models/ListCarrierServicesResponseBody.md new file mode 100644 index 00000000..0a4a9235 --- /dev/null +++ b/docs/models/ListCarrierServicesResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListCarrierServicesResponseBody +A carrier list services response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Services** | [**List<Service>**](Service.md) | An array of services associated with the carrier | [optional] [readonly] + diff --git a/docs/models/ListCarriersResponseBody.md b/docs/models/ListCarriersResponseBody.md new file mode 100644 index 00000000..72dde86c --- /dev/null +++ b/docs/models/ListCarriersResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListCarriersResponseBody +A carrier list response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Carriers** | [**List<Carrier>**](Carrier.md) | The carrier response body | [readonly] + diff --git a/docs/models/ListLabelsResponseBody.md b/docs/models/ListLabelsResponseBody.md new file mode 100644 index 00000000..e9ace808 --- /dev/null +++ b/docs/models/ListLabelsResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ListLabelsResponseBody +A list label response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Labels** | **List<Object>** | The labels that matched the query criteria. If no matching labels were found, then this array is empty; otherwise, it contains one page of results. The last page of results may have fewer labels than the `page_size`. | +**Links** | [**PaginationLink**](PaginationLink.md) | | +**Page** | **int** | The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. | +**Pages** | **int** | The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. | +**Total** | **int** | The total number of items across all pages of results | + diff --git a/docs/models/ListManifestsResponseBody.md b/docs/models/ListManifestsResponseBody.md new file mode 100644 index 00000000..17400b14 --- /dev/null +++ b/docs/models/ListManifestsResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ListManifestsResponseBody +A list manifests response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**PaginationLink**](PaginationLink.md) | Helpful links to other pages of results | [readonly] +**Manifests** | [**List<Manifest>**](Manifest.md) | The list of available manifests | [readonly] +**Page** | **int** | Current page of the list manifests results | [readonly] +**Pages** | **int** | Total number of pages for list manifests results | [readonly] +**Total** | **long** | The total number of manifests returned | [readonly] + diff --git a/docs/models/ListPackageTypesResponseBody.md b/docs/models/ListPackageTypesResponseBody.md new file mode 100644 index 00000000..cfc4f7c0 --- /dev/null +++ b/docs/models/ListPackageTypesResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListPackageTypesResponseBody +A list package types response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Packages** | [**List<PackageType>**](PackageType.md) | An array of custom package types | [optional] [readonly] + diff --git a/docs/models/ListPickupResponseBody.md b/docs/models/ListPickupResponseBody.md new file mode 100644 index 00000000..aa9517cb --- /dev/null +++ b/docs/models/ListPickupResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ListPickupResponseBody +A list pickup response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**PaginationLink**](PaginationLink.md) | Helpful links to other pages of results | [readonly] +**Page** | **int** | Current page of the list pickups results | [readonly] +**Pages** | **int** | Total number of pages for list pickups results | [readonly] +**Pickups** | [**List<Pickup>**](Pickup.md) | An array of pickups associated with the user's account. | +**Total** | **long** | The total number of pickups returned | [readonly] + diff --git a/docs/models/ListServicePointsResponseBody.md b/docs/models/ListServicePointsResponseBody.md new file mode 100644 index 00000000..4bd69b1d --- /dev/null +++ b/docs/models/ListServicePointsResponseBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ListServicePointsResponseBody +A list service points response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [optional] [readonly] +**Lat** | **double** | The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html | [optional] +**Long** | **double** | The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html | [optional] +**ServicePoints** | [**List<ListServicePointsResponseBodyServicePointsInner>**](ListServicePointsResponseBodyServicePointsInner.md) | | [optional] + diff --git a/docs/models/ListServicePointsResponseBodyServicePointsInner.md b/docs/models/ListServicePointsResponseBodyServicePointsInner.md new file mode 100644 index 00000000..5e92d473 --- /dev/null +++ b/docs/models/ListServicePointsResponseBodyServicePointsInner.md @@ -0,0 +1,23 @@ +# ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | [optional] +**CarrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] +**CityLocality** | **string** | The name of the city or locality | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**CountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**DistanceInMeters** | **double** | Distance in meters | [optional] +**Features** | **List<ListServicePointsResponseBodyServicePointsInner.FeaturesEnum>** | Service features | [optional] +**HoursOfOperation** | [**ListServicePointsResponseBodyServicePointsInnerHoursOfOperation**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.md) | | [optional] +**Lat** | **double** | The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html | [optional] +**Long** | **double** | The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html | [optional] +**PhoneNumber** | **string** | Phone number associated | [optional] +**PostalCode** | **string** | postal code | [optional] +**ServiceCodes** | **List<string>** | | [optional] +**ServicePointId** | **string** | A unique identifier for a carrier drop off point. | [optional] +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | [optional] +**Type** | **string** | Service point type | [optional] [default to TypeEnum.Pudo] + diff --git a/docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.md b/docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.md new file mode 100644 index 00000000..e99c6bc2 --- /dev/null +++ b/docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation +Hours of operation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Friday** | [**List<ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner>**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md) | | [optional] +**Monday** | [**List<ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner>**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md) | | [optional] +**Saturday** | [**List<ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner>**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md) | | [optional] +**Sunday** | [**List<ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner>**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md) | | [optional] +**Thursday** | [**List<ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner>**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md) | | [optional] +**Tuesday** | [**List<ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner>**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md) | | [optional] +**Wednesday** | [**List<ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner>**](ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md) | | [optional] + diff --git a/docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md b/docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md new file mode 100644 index 00000000..2628c341 --- /dev/null +++ b/docs/models/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Close** | **string** | Closing time | [optional] +**Open** | **string** | Opening time | [optional] + diff --git a/docs/models/ListShipmentRatesResponseBody.md b/docs/models/ListShipmentRatesResponseBody.md new file mode 100644 index 00000000..7ee4eb57 --- /dev/null +++ b/docs/models/ListShipmentRatesResponseBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.ListShipmentRatesResponseBody +A list shipment rates response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **string** | When the rate was created | +**Errors** | [**List<Error>**](Error.md) | | +**InvalidRates** | [**List<Rate>**](Rate.md) | An array of invalid shipment rates | [readonly] +**RateRequestId** | **string** | A string that uniquely identifies the rate request | [readonly] +**Rates** | [**List<Rate>**](Rate.md) | An array of shipment rates | [readonly] +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**Status** | **RateResponseStatus** | | [readonly] + diff --git a/docs/models/ListShipmentsResponseBody.md b/docs/models/ListShipmentsResponseBody.md new file mode 100644 index 00000000..3b7bb5a4 --- /dev/null +++ b/docs/models/ListShipmentsResponseBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.ListShipmentsResponseBody +A list shipment response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**PaginationLink**](PaginationLink.md) | | [readonly] +**Page** | **int** | | [readonly] +**Pages** | **int** | | [readonly] +**Shipments** | [**List<Shipment>**](Shipment.md) | The list of shipments returned by the api call | [readonly] +**Total** | **long** | Total number of shipments returned by the api call | [readonly] + diff --git a/docs/models/ListTagsResponseBody.md b/docs/models/ListTagsResponseBody.md new file mode 100644 index 00000000..70cf561f --- /dev/null +++ b/docs/models/ListTagsResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListTagsResponseBody +Response body from a successful GET /tags API call + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | [**List<Tag>**](Tag.md) | The array of tags returned by the API call | [optional] + diff --git a/docs/models/ListWarehousesResponseBody.md b/docs/models/ListWarehousesResponseBody.md new file mode 100644 index 00000000..2f76371c --- /dev/null +++ b/docs/models/ListWarehousesResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ListWarehousesResponseBody +A warehouse list response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Warehouses** | [**List<Warehouse>**](Warehouse.md) | The array of warehouses returned by the API call | [readonly] + diff --git a/docs/models/Manifest.md b/docs/models/Manifest.md new file mode 100644 index 00000000..4cf53de5 --- /dev/null +++ b/docs/models/Manifest.md @@ -0,0 +1,18 @@ +# ShipEngineSDK.Model.Manifest +Used for combining packages into one scannable form that a carrier can use when picking up a large number of shipments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | A string that uniquely identifies the carrier | [optional] [readonly] +**CreatedAt** | **DateTimeOffset** | The date-time that the manifest was created | [optional] [readonly] +**FormId** | **string** | A string that uniquely identifies the form | [optional] [readonly] +**LabelIds** | **List<string>** | An array of the label ids used in this manifest. | [optional] [readonly] +**ManifestDownload** | [**ManifestDownload**](ManifestDownload.md) | | [optional] [readonly] +**ManifestId** | **string** | A string that uniquely identifies the manifest | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | The date-time that the manifests shipments will be picked up | [optional] [readonly] +**Shipments** | **int** | The number of shipments that are included in this manifest | [optional] [readonly] +**SubmissionId** | **string** | A string that uniquely identifies the submission | [optional] [readonly] +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [optional] [readonly] + diff --git a/docs/models/ManifestDownload.md b/docs/models/ManifestDownload.md new file mode 100644 index 00000000..32634de2 --- /dev/null +++ b/docs/models/ManifestDownload.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ManifestDownload +Object containing the href link to download the manifest file + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | The URL of the linked resource, if any | [optional] + diff --git a/docs/models/ManifestRequest.md b/docs/models/ManifestRequest.md new file mode 100644 index 00000000..5fdefabe --- /dev/null +++ b/docs/models/ManifestRequest.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ManifestRequest +A reference to the manifest request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ManifestRequestId** | **string** | A string that uniquely identifies a manifest request | [optional] [readonly] +**Status** | **ManifestRequestStatus** | | [optional] + diff --git a/docs/models/ManifestRequestStatus.md b/docs/models/ManifestRequestStatus.md new file mode 100644 index 00000000..37ee9580 --- /dev/null +++ b/docs/models/ManifestRequestStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ManifestRequestStatus +The possible statuses of a manifest request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/Manifests.md b/docs/models/Manifests.md new file mode 100644 index 00000000..92f4c7b8 --- /dev/null +++ b/docs/models/Manifests.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.Manifests +An array of manifest resources + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VarManifests** | [**List<Manifest>**](Manifest.md) | Resulting Manifests | [optional] + diff --git a/docs/models/ManifestsRequests.md b/docs/models/ManifestsRequests.md new file mode 100644 index 00000000..87e4a3d2 --- /dev/null +++ b/docs/models/ManifestsRequests.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.ManifestsRequests +An array of manifest requests + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ManifestRequests** | [**List<ManifestRequest>**](ManifestRequest.md) | Resulting manifest requests with statuses | [optional] + diff --git a/docs/models/ModifyBatch.md b/docs/models/ModifyBatch.md new file mode 100644 index 00000000..5879d497 --- /dev/null +++ b/docs/models/ModifyBatch.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ModifyBatch +A modify batch object + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RateIds** | **List<string>** | Array of Rate IDs to be modifed on the batch | [optional] +**ShipmentIds** | **List<string>** | The Shipment Ids to be modified on the batch | [optional] + diff --git a/docs/models/MonetaryValue.md b/docs/models/MonetaryValue.md new file mode 100644 index 00000000..c7530d3b --- /dev/null +++ b/docs/models/MonetaryValue.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.MonetaryValue +A monetary value, such as the price of a shipping label, the insured value of a package, or an account balance. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **decimal** | The monetary amount, in the specified currency. | +**Currency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | + diff --git a/docs/models/NonDelivery.md b/docs/models/NonDelivery.md new file mode 100644 index 00000000..2f116b82 --- /dev/null +++ b/docs/models/NonDelivery.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.NonDelivery +The possible non delivery values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/OptionalLink.md b/docs/models/OptionalLink.md new file mode 100644 index 00000000..7fd11d2f --- /dev/null +++ b/docs/models/OptionalLink.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.OptionalLink +A link to a related resource, or an empty object if there is no resource to link to + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | The URL of the linked resource, if any | [optional] +**Type** | **string** | The type of resource, or the type of relationship to the parent resource | [optional] + diff --git a/docs/models/OrderSourceName.md b/docs/models/OrderSourceName.md new file mode 100644 index 00000000..3c7ed8ff --- /dev/null +++ b/docs/models/OrderSourceName.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.OrderSourceName +The order sources that are supported by ShipEngine + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/OriginType.md b/docs/models/OriginType.md new file mode 100644 index 00000000..38694602 --- /dev/null +++ b/docs/models/OriginType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.OriginType +Indicates if the package will be picked up or dropped off by the carrier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/Package.md b/docs/models/Package.md new file mode 100644 index 00000000..2589af51 --- /dev/null +++ b/docs/models/Package.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.Package +A package associated with a shipment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Weight** | [**Weight**](Weight.md) | The package weight | +**ContentDescription** | **string** | A short description of the package content. Required for shipments moving to, from, and through Mexico. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The package dimensions | [optional] +**ExternalPackageId** | **string** | An external package id. | [optional] +**InsuredValue** | [**MonetaryValue**](MonetaryValue.md) | The insured value of the package. Requires the `insurance_provider` field of the shipment to be set. | [optional] +**LabelMessages** | [**LabelMessages**](LabelMessages.md) | | [optional] +**PackageCode** | **string** | The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type. | [optional] +**PackageId** | **string** | A string that uniquely identifies this [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/) | [optional] +**PackageName** | **string** | The name of the of the [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/) | [optional] +**Products** | [**List<Products>**](Products.md) | Details about products inside packages (Information provided would be used on custom documentation) | [optional] +**ShipmentPackageId** | **string** | A string that uniquely identifies this shipment package | [optional] [readonly] +**TrackingNumber** | **string** | The tracking number for the package. The format depends on the carrier. | [optional] [readonly] + diff --git a/docs/models/PackageContents.md b/docs/models/PackageContents.md new file mode 100644 index 00000000..3185a86f --- /dev/null +++ b/docs/models/PackageContents.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.PackageContents +The possible package contents values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/PackageType.md b/docs/models/PackageType.md new file mode 100644 index 00000000..da261e51 --- /dev/null +++ b/docs/models/PackageType.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.PackageType +A package type that a carrier supports for shipment. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**PackageCode** | **string** | A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. | +**Description** | **string** | Provides a helpful description for the custom package. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The custom dimensions for the package. | [optional] +**PackageId** | **string** | A string that uniquely identifies the package. | [optional] + diff --git a/docs/models/PackagingGroup.md b/docs/models/PackagingGroup.md new file mode 100644 index 00000000..c8359796 --- /dev/null +++ b/docs/models/PackagingGroup.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.PackagingGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/PackagingInstructionSection.md b/docs/models/PackagingInstructionSection.md new file mode 100644 index 00000000..c1470a12 --- /dev/null +++ b/docs/models/PackagingInstructionSection.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.PackagingInstructionSection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/PagedListResponseBody.md b/docs/models/PagedListResponseBody.md new file mode 100644 index 00000000..99fb204c --- /dev/null +++ b/docs/models/PagedListResponseBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.PagedListResponseBody +Many ShipEngine endpoints return a paged list of items. In addition to the returned items, these responses also include information about the total number of items, the number of pages of results, and URLs of other pages of results. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**PaginationLink**](PaginationLink.md) | | +**Page** | **int** | The current page number of results. For example, if there are 80 results, and the page size is 25, then `page` could be 1, 2, 3, or 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. | +**Pages** | **int** | The total number of pages of results. For example, if there are 80 results, and the page size is 25, then `pages` would be 4. The first three pages would contain 25 items each, and the fourth page would contain the five remaining items. If there are no results, then `pages` will be zero. | +**Total** | **int** | The total number of items across all pages of results | + diff --git a/docs/models/PaginationLink.md b/docs/models/PaginationLink.md new file mode 100644 index 00000000..8cfd75b0 --- /dev/null +++ b/docs/models/PaginationLink.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.PaginationLink +Helpful links to other pages of results + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**First** | [**Link**](Link.md) | The link to the first page of results. This object will _always_ have an `href` field. If there are no results, then the first page will contain an empty array of items. | +**Last** | [**Link**](Link.md) | The link to the final page of results. This object will _always_ have an `href` field. If there are no results, then the final page will contain an empty array of items. | +**Next** | [**OptionalLink**](OptionalLink.md) | The link to the next page of results. The `href` field will only be set when the `page` is less than `pages`. | +**Prev** | [**OptionalLink**](OptionalLink.md) | The link to the previous page of results. The `href` field will only be set when the `page` is 2 or greater. | + diff --git a/docs/models/PaperlessDownload.md b/docs/models/PaperlessDownload.md new file mode 100644 index 00000000..d0591bb7 --- /dev/null +++ b/docs/models/PaperlessDownload.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.PaperlessDownload +The paperless details which may contain elements like `href`, `instructions` and `handoff_code`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HandoffCode** | **string** | The handoff code for the paperless download. | [optional] +**Href** | **string** | The URL of the linked resource, if any | [optional] +**Instructions** | **string** | The instructions for the paperless download. | [optional] + diff --git a/docs/models/ParseAddressRequestBody.md b/docs/models/ParseAddressRequestBody.md new file mode 100644 index 00000000..8350d981 --- /dev/null +++ b/docs/models/ParseAddressRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ParseAddressRequestBody +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. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | The unstructured text that contains address-related entities | +**Address** | [**PartialAddress**](PartialAddress.md) | You can optionally provide any already-known address 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. | [optional] + diff --git a/docs/models/ParseAddressResponseBody.md b/docs/models/ParseAddressResponseBody.md new file mode 100644 index 00000000..31493d65 --- /dev/null +++ b/docs/models/ParseAddressResponseBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ParseAddressResponseBody +The parsed address, as well as a confidence score and a list of all the entities that were recognized in the text. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | [**PartialAddress**](PartialAddress.md) | The parsed address. This address may not be complete, depending on how much information was included in the text and how confident the API is about each recognized entity. > **Note:** The address-recognition API does not currently perform any validation of the parsed address, so we recommend that you use the [address-validation API](https://www.shipengine.com/docs/addresses/validation/) to ensure that the address is correct. | +**Entities** | [**List<RecognizedEntity>**](RecognizedEntity.md) | All of the entities that were recognized in the text. An \"entity\" is a single piece of data, such as a city, a postal code, or an address line. Each entity includes the original text and the parsed value. | +**Score** | **double** | A confidence score between zero and one that indicates how certain the API is that it understood the text. | + diff --git a/docs/models/ParseShipmentRequestBody.md b/docs/models/ParseShipmentRequestBody.md new file mode 100644 index 00000000..3d0d9689 --- /dev/null +++ b/docs/models/ParseShipmentRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.ParseShipmentRequestBody +The only required field is `text`, which is the text to be parsed. You can optionally also provide a `shipment` containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | The unstructured text that contains shipping-related entities | +**Shipment** | [**PartialShipment**](PartialShipment.md) | You can optionally provide a `shipment` object containing any already-known values. For example, you probably already know the `ship_from` address, and you may also already know what carrier and service you want to use. | [optional] + diff --git a/docs/models/ParseShipmentResponseBody.md b/docs/models/ParseShipmentResponseBody.md new file mode 100644 index 00000000..fc378ad4 --- /dev/null +++ b/docs/models/ParseShipmentResponseBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.ParseShipmentResponseBody +The parsed shipment, as well as a confidence score and a list of all the shipping entities that were recognized in the text. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entities** | [**List<RecognizedEntity>**](RecognizedEntity.md) | All of the entities that were recognized in the text. An \"entity\" is a single piece of data, such as a city, a postal code, a carrier name, or a package weight. Each entity includes the original text and the parsed value. | +**Score** | **double** | A confidence score between zero and one that indicates how certain the API is that it understood the text. | +**Shipment** | [**PartialShipment**](PartialShipment.md) | The parsed shipment. This shipment may not be complete, depending on how much information was included in the text and how confident the API is about each recognized entity. > **Note:** The shipment-recognition API does not currently perform any validation of the parsed addresses, so we recommend that you use the [address-validation API](https://www.shipengine.com/docs/addresses/validation/) to ensure that the addresses are correct. | + diff --git a/docs/models/PartialAddress.md b/docs/models/PartialAddress.md new file mode 100644 index 00000000..68f34df3 --- /dev/null +++ b/docs/models/PartialAddress.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.PartialAddress +A complete or partial mailing address. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | [optional] +**AddressLine2** | **string** | The second line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressLine3** | **string** | The third line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressResidentialIndicator** | **AddressResidentialIndicator** | Indicates whether this is a residential address. | [optional] +**CityLocality** | **string** | The name of the city or locality | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**CountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**Email** | **string** | Email for the address owner. | [optional] +**Name** | **string** | The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. | [optional] +**Phone** | **string** | The phone number of a contact person at this address. The format of this phone number varies depending on the country. | [optional] +**PostalCode** | **string** | postal code | [optional] +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | [optional] + diff --git a/docs/models/PartialShipment.md b/docs/models/PartialShipment.md new file mode 100644 index 00000000..8b9ead28 --- /dev/null +++ b/docs/models/PartialShipment.md @@ -0,0 +1,35 @@ +# ShipEngineSDK.Model.PartialShipment +The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | [optional] +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | [optional] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [optional] [readonly] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | [optional] +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [optional] [readonly] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | [optional] +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | [optional] +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | [optional] +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [optional] [readonly] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [optional] [readonly] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [optional] [readonly] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [optional] [readonly] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | [optional] + diff --git a/docs/models/PartialShippingAddress.md b/docs/models/PartialShippingAddress.md new file mode 100644 index 00000000..dee29483 --- /dev/null +++ b/docs/models/PartialShippingAddress.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.PartialShippingAddress +A complete or partial mailing address. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Instructions** | **string** | Additional text about how to handle the shipment at this address. | [optional] + diff --git a/docs/models/PartialShippingAddressTo.md b/docs/models/PartialShippingAddressTo.md new file mode 100644 index 00000000..bd78369c --- /dev/null +++ b/docs/models/PartialShippingAddressTo.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.PartialShippingAddressTo +A complete or partial mailing address. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Geolocation** | [**List<PartialShippingAddressToGeolocationInner>**](PartialShippingAddressToGeolocationInner.md) | | [optional] +**Instructions** | **string** | Additional text about how to handle the shipment at this address. | [optional] + diff --git a/docs/models/PartialShippingAddressToGeolocationInner.md b/docs/models/PartialShippingAddressToGeolocationInner.md new file mode 100644 index 00000000..71f2b8bd --- /dev/null +++ b/docs/models/PartialShippingAddressToGeolocationInner.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Enum of available type of geolocation items: - 'what3words' functionality allows to specify a location by providing 3 words that have been assign to the specific location see [link](https://what3words.com/business) for more details. | [optional] +**Value** | **string** | value of the geolocation item | [optional] + diff --git a/docs/models/PaymentAmount.md b/docs/models/PaymentAmount.md new file mode 100644 index 00000000..ee9fde8d --- /dev/null +++ b/docs/models/PaymentAmount.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.PaymentAmount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **decimal** | | [optional] +**Currency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | [optional] + diff --git a/docs/models/Pickup.md b/docs/models/Pickup.md new file mode 100644 index 00000000..23d8d827 --- /dev/null +++ b/docs/models/Pickup.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.Pickup +The information necessary to schedule a package pickup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CancelledAt** | **DateTimeOffset** | The date and time that the pickup was cancelled in ShipEngine. | [optional] [readonly] +**CarrierId** | **string** | The carrier_id associated with the pickup | [optional] [readonly] +**ConfirmationNumber** | **string** | The carrier confirmation number for the scheduled pickup. | [optional] [readonly] +**ContactDetails** | [**ContactDetails**](ContactDetails.md) | | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the pickup was created in ShipEngine. | [optional] [readonly] +**LabelIds** | **List<string>** | Label IDs that will be included in the pickup request | [optional] +**PickupAddress** | [**Address**](Address.md) | | [optional] [readonly] +**PickupId** | **string** | Pickup Resource ID | [optional] [readonly] +**PickupNotes** | **string** | Used by some carriers to give special instructions for a package pickup | [optional] +**PickupWindow** | [**PickupWindow**](PickupWindow.md) | | [optional] +**PickupWindows** | [**List<PickupWindows>**](PickupWindows.md) | An array of available pickup windows. Carriers can return multiple times that they will pickup packages. | [optional] [readonly] +**WarehouseId** | **string** | The warehouse_id associated with the pickup | [optional] [readonly] + diff --git a/docs/models/PickupResponseBody.md b/docs/models/PickupResponseBody.md new file mode 100644 index 00000000..3dc97a86 --- /dev/null +++ b/docs/models/PickupResponseBody.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.PickupResponseBody +A pickup response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | The carrier_id associated with the pickup | [readonly] +**ContactDetails** | [**ContactDetails**](ContactDetails.md) | | +**CreatedAt** | **DateTimeOffset** | The date and time that the pickup was created in ShipEngine. | [readonly] +**LabelIds** | **List<string>** | Label IDs that will be included in the pickup request | +**PickupAddress** | [**Address**](Address.md) | | [readonly] +**PickupId** | **string** | Pickup Resource ID | [readonly] +**PickupWindow** | [**PickupWindow**](PickupWindow.md) | | +**WarehouseId** | **string** | The warehouse_id associated with the pickup | [readonly] +**CancelledAt** | **DateTimeOffset** | The date and time that the pickup was cancelled in ShipEngine. | [optional] [readonly] +**ConfirmationNumber** | **string** | The carrier confirmation number for the scheduled pickup. | [readonly] +**PickupNotes** | **string** | Used by some carriers to give special instructions for a package pickup | [optional] +**PickupWindows** | [**List<PickupWindows>**](PickupWindows.md) | An array of available pickup windows. Carriers can return multiple times that they will pickup packages. | [optional] [readonly] + diff --git a/docs/models/PickupWindow.md b/docs/models/PickupWindow.md new file mode 100644 index 00000000..10d86c5f --- /dev/null +++ b/docs/models/PickupWindow.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.PickupWindow +The desired time range for the package pickup. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndAt** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | +**StartAt** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | + diff --git a/docs/models/PickupWindows.md b/docs/models/PickupWindows.md new file mode 100644 index 00000000..35f0bf0d --- /dev/null +++ b/docs/models/PickupWindows.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.PickupWindows + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndAt** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**StartAt** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] + diff --git a/docs/models/ProcessBatchRequestBody.md b/docs/models/ProcessBatchRequestBody.md new file mode 100644 index 00000000..27a29ea9 --- /dev/null +++ b/docs/models/ProcessBatchRequestBody.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ProcessBatchRequestBody +A process batch request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**LabelFormat** | **LabelFormat** | | [optional] +**LabelLayout** | **LabelLayout** | | [optional] [default to "4x6"] +**ShipDate** | **DateTimeOffset** | The Ship date the batch is being processed for | [optional] + diff --git a/docs/models/Products.md b/docs/models/Products.md new file mode 100644 index 00000000..c3b7bd89 --- /dev/null +++ b/docs/models/Products.md @@ -0,0 +1,22 @@ +# ShipEngineSDK.Model.Products +The customs declaration for a single item in the shipment. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CountryOfOrigin** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated | [optional] +**DangerousGoods** | [**List<DangerousGoods>**](DangerousGoods.md) | Details about dangerous goods inside products | [optional] +**Description** | **string** | A description of the item | [optional] +**ExtendedDetails** | **Dictionary<string, Object>** | Additional details about products | [optional] +**HarmonizedTariffCode** | **string** | The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item. | [optional] +**MidCode** | **string** | Manufacturers Identification code | [optional] +**ProductUrl** | **string** | link to the item on the seller website | [optional] +**Quantity** | **int** | The quantity of this item in the shipment. | [optional] [default to 0] +**Sku** | **string** | The SKU (Stock Keeping Unit) of the item | [optional] +**SkuDescription** | **string** | Description of the Custom Item's SKU | [optional] +**UnitOfMeasure** | **string** | | [optional] +**Value** | [**MonetaryValue**](MonetaryValue.md) | The declared value of each item | [optional] +**VatRate** | **decimal** | VAT rate applicable to the item | [optional] +**Weight** | [**Weight**](Weight.md) | The item weight | [optional] + diff --git a/docs/models/PurchaseLabelWithoutShipment.md b/docs/models/PurchaseLabelWithoutShipment.md new file mode 100644 index 00000000..92eabe0a --- /dev/null +++ b/docs/models/PurchaseLabelWithoutShipment.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.PurchaseLabelWithoutShipment +A purchase label without shipment resource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DisplayScheme** | **DisplayScheme** | The display format that the label should be shown in. | [optional] +**LabelDownloadType** | **LabelDownloadType** | | [optional] +**LabelFormat** | **LabelFormat** | | [optional] +**LabelLayout** | **LabelLayout** | | [optional] +**ValidateAddress** | **ValidateAddress** | | [optional] + diff --git a/docs/models/Rate.md b/docs/models/Rate.md new file mode 100644 index 00000000..25d07237 --- /dev/null +++ b/docs/models/Rate.md @@ -0,0 +1,35 @@ +# ShipEngineSDK.Model.Rate +A rate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierCode** | **string** | carrier code | [readonly] +**CarrierFriendlyName** | **string** | carrier friendly name | [readonly] +**CarrierId** | **string** | A string that uniquely identifies the carrier | [readonly] +**CarrierNickname** | **string** | carrier nickname | [readonly] +**ConfirmationAmount** | [**MonetaryValue**](MonetaryValue.md) | The confirmation amount. Should be added with shipping_amount, insurance_amount and other_amount to calculate the total purchase price. | [readonly] +**ErrorMessages** | **List<string>** | The error messages | [readonly] +**GuaranteedService** | **bool** | Indicates if the rate is guaranteed. | [readonly] +**InsuranceAmount** | [**MonetaryValue**](MonetaryValue.md) | The insurance amount. Should be added with shipping_amount, confirmation_amount and other_amount to calculate the total purchase price. | [readonly] +**NegotiatedRate** | **bool** | Indicates if the rates been negotiated | [readonly] +**OtherAmount** | [**MonetaryValue**](MonetaryValue.md) | Any other charges associated with this rate. Should be added with shipping_amount, insurance_amount and confirmation_amount to calculate the total purchase price. | [readonly] +**RateId** | **string** | A string that uniquely identifies the rate | [readonly] +**RateType** | **RateType** | | [readonly] +**ServiceCode** | **string** | service code for the rate | [readonly] +**ServiceType** | **string** | service type | [readonly] +**ShippingAmount** | [**MonetaryValue**](MonetaryValue.md) | The shipping amount. Should be added with confirmation_amount, insurance_amount and other_amount to calculate the total purchase price. | [readonly] +**Trackable** | **bool** | Indicates if rate is trackable | [readonly] +**ValidationStatus** | **ValidationStatus** | | [readonly] +**WarningMessages** | **List<string>** | The warning messages | [readonly] +**CarrierDeliveryDays** | **string** | The carrier delivery days | [optional] [readonly] +**DeliveryDays** | **int** | The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday | [optional] [readonly] +**EstimatedDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. | [optional] [readonly] +**PackageType** | **string** | package type that this rate was estimated for | [readonly] +**RateDetails** | [**List<RateDetail>**](RateDetail.md) | A list of rate details that are associated with this rate. This is useful for displaying a breakdown of the rate to the user. | [optional] [readonly] +**RequestedComparisonAmount** | [**MonetaryValue**](MonetaryValue.md) | The total shipping cost for the specified comparison_rate_type. | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | ship date | [optional] [readonly] +**TaxAmount** | [**MonetaryValue**](MonetaryValue.md) | Tariff and additional taxes associated with an international shipment. | [optional] [readonly] +**Zone** | **int** | Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location | [readonly] + diff --git a/docs/models/RateDetail.md b/docs/models/RateDetail.md new file mode 100644 index 00000000..61501693 --- /dev/null +++ b/docs/models/RateDetail.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.RateDetail +Represents detailed information about a shipping cost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | [**MonetaryValue**](MonetaryValue.md) | | [optional] +**BillingSource** | **string** | The source of the billing information. This is typically the carrier, but could be a third party, e.g insurance | [optional] +**CarrierBillingCode** | **string** | A rate detail code defined by a carrier | [optional] +**CarrierDescription** | **string** | A rate detail description defined by a carrier | [optional] +**CarrierMemo** | **string** | Contains any additional information | [optional] +**RateDetailAttributes** | [**RateDetailAttributes**](RateDetailAttributes.md) | If applicable, contains additional data about a rate detail of a specific type, e.g. VAT | [optional] +**RateDetailType** | **RateDetailType** | | [optional] + diff --git a/docs/models/RateDetailAttributes.md b/docs/models/RateDetailAttributes.md new file mode 100644 index 00000000..74cfe9ab --- /dev/null +++ b/docs/models/RateDetailAttributes.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.RateDetailAttributes +Represents detailed information about a tax (e.g. VAT) contained in a shipping cost. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TaxCode** | **string** | Code for a specific tax type | [optional] +**TaxPercentage** | **decimal** | Tax percentage, e.g. 20 for 20%, added to the shipping cost | [optional] +**TaxType** | **TaxType** | | [optional] + diff --git a/docs/models/RateDetailType.md b/docs/models/RateDetailType.md new file mode 100644 index 00000000..d64074ef --- /dev/null +++ b/docs/models/RateDetailType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateDetailType +The possible rate detail type values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/RateEstimate.md b/docs/models/RateEstimate.md new file mode 100644 index 00000000..158f3f38 --- /dev/null +++ b/docs/models/RateEstimate.md @@ -0,0 +1,32 @@ +# ShipEngineSDK.Model.RateEstimate +A rate estimate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [readonly] +**CarrierFriendlyName** | **string** | carrier friendly name | [readonly] +**CarrierId** | **string** | A string that uniquely identifies the carrier | [readonly] +**CarrierNickname** | **string** | carrier nickname | [readonly] +**ConfirmationAmount** | [**MonetaryValue**](MonetaryValue.md) | The confirmation amount | [readonly] +**ErrorMessages** | **List<string>** | The error messages | [readonly] +**GuaranteedService** | **bool** | Indicates if the rate is guaranteed. | [readonly] +**InsuranceAmount** | [**MonetaryValue**](MonetaryValue.md) | The insurance amount | [readonly] +**NegotiatedRate** | **bool** | Indicates if the rates been negotiated | [readonly] +**OtherAmount** | [**MonetaryValue**](MonetaryValue.md) | Any other charges associated with this rate | [readonly] +**RateType** | **RateType** | | [readonly] +**ServiceCode** | **string** | service code for the rate | [readonly] +**ServiceType** | **string** | service type | [readonly] +**ShippingAmount** | [**MonetaryValue**](MonetaryValue.md) | The shipping amount | [readonly] +**Trackable** | **bool** | Indicates if rate is trackable | [readonly] +**ValidationStatus** | **ValidationStatus** | | [readonly] +**WarningMessages** | **List<string>** | The warning messages | [readonly] +**CarrierDeliveryDays** | **string** | The carrier delivery days | [optional] [readonly] +**DeliveryDays** | **int** | The number of days estimated for delivery, this will show the _actual_ delivery time if for example, the package gets shipped on a Friday | [optional] [readonly] +**EstimatedDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine. | [optional] [readonly] +**PackageType** | **string** | package type that this rate was estimated for | [readonly] +**ShipDate** | **DateTimeOffset** | ship date | [optional] [readonly] +**TaxAmount** | [**MonetaryValue**](MonetaryValue.md) | Tariff and additional taxes associated with an international shipment. | [optional] [readonly] +**Zone** | **int** | Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of custom zones that vary depending upon the ship_to and ship_from location | [readonly] + diff --git a/docs/models/RateEstimateByCarrierId.md b/docs/models/RateEstimateByCarrierId.md new file mode 100644 index 00000000..4cb80320 --- /dev/null +++ b/docs/models/RateEstimateByCarrierId.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateEstimateByCarrierId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | A string that uniquely identifies the carrier | [optional] + diff --git a/docs/models/RateEstimateByCarrierIds.md b/docs/models/RateEstimateByCarrierIds.md new file mode 100644 index 00000000..43e670c1 --- /dev/null +++ b/docs/models/RateEstimateByCarrierIds.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateEstimateByCarrierIds + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierIds** | **List<string>** | Array of Carrier Ids | [optional] + diff --git a/docs/models/RateEstimateOptions.md b/docs/models/RateEstimateOptions.md new file mode 100644 index 00000000..85a5d7a6 --- /dev/null +++ b/docs/models/RateEstimateOptions.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.RateEstimateOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressResidentialIndicator** | **AddressResidentialIndicator** | | [optional] +**Confirmation** | **DeliveryConfirmation** | | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The dimensions of the package | [optional] +**FromCityLocality** | **string** | from postal code | [optional] +**FromCountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**FromPostalCode** | **string** | postal code | [optional] +**FromStateProvince** | **string** | From state province | [optional] +**ShipDate** | **DateTimeOffset** | ship date | [optional] +**ToCityLocality** | **string** | The city locality the package is being shipped to | [optional] +**ToCountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**ToPostalCode** | **string** | postal code | [optional] +**ToStateProvince** | **string** | To state province | [optional] +**Weight** | [**Weight**](Weight.md) | The weight of the package | [optional] + diff --git a/docs/models/RateRequestBody.md b/docs/models/RateRequestBody.md new file mode 100644 index 00000000..0bc7eb3e --- /dev/null +++ b/docs/models/RateRequestBody.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.RateRequestBody +A rate request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierIds** | **List<string>** | Array of carrier ids to get rates for | +**CalculateTaxAmount** | **bool** | Calculate the duties and tariffs for cross border shipments. | [optional] +**IsReturn** | **bool** | Indicate if it's a return shipment | [optional] +**PackageTypes** | **List<string>** | | [optional] +**PreferredCurrency** | **string** | The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html | [optional] +**ServiceCodes** | **List<string>** | | [optional] + diff --git a/docs/models/RateRequestByShipmentIds.md b/docs/models/RateRequestByShipmentIds.md new file mode 100644 index 00000000..82c0a333 --- /dev/null +++ b/docs/models/RateRequestByShipmentIds.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateRequestByShipmentIds + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShipmentIds** | **List<string>** | The array of shipment IDs | + diff --git a/docs/models/RateRequestByShipments.md b/docs/models/RateRequestByShipments.md new file mode 100644 index 00000000..2bb7d6e5 --- /dev/null +++ b/docs/models/RateRequestByShipments.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateRequestByShipments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Shipments** | [**List<AddressValidatingShipment>**](AddressValidatingShipment.md) | The array of shipments to get bulk rate estimates for | + diff --git a/docs/models/RateRequestOptions.md b/docs/models/RateRequestOptions.md new file mode 100644 index 00000000..4384fbb2 --- /dev/null +++ b/docs/models/RateRequestOptions.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateRequestOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RateOptions** | [**RateRequestBody**](RateRequestBody.md) | The rate options | [optional] + diff --git a/docs/models/RateRequestRateOptions.md b/docs/models/RateRequestRateOptions.md new file mode 100644 index 00000000..d9386cff --- /dev/null +++ b/docs/models/RateRequestRateOptions.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateRequestRateOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RateOptions** | [**RateRequestBody**](RateRequestBody.md) | The rate options | [optional] + diff --git a/docs/models/RateResponse.md b/docs/models/RateResponse.md new file mode 100644 index 00000000..29a5a5da --- /dev/null +++ b/docs/models/RateResponse.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VarRateResponse** | [**RatesInformation**](RatesInformation.md) | The rates response | [optional] + diff --git a/docs/models/RateResponseStatus.md b/docs/models/RateResponseStatus.md new file mode 100644 index 00000000..b7d5c723 --- /dev/null +++ b/docs/models/RateResponseStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateResponseStatus +The possible rate response status values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/RateShipmentRequest.md b/docs/models/RateShipmentRequest.md new file mode 100644 index 00000000..f20663da --- /dev/null +++ b/docs/models/RateShipmentRequest.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateShipmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Shipment** | [**AddressValidatingShipment**](AddressValidatingShipment.md) | The shipment object | [optional] + diff --git a/docs/models/RateType.md b/docs/models/RateType.md new file mode 100644 index 00000000..185f0e51 --- /dev/null +++ b/docs/models/RateType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.RateType +The possible rate type values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/RatesInformation.md b/docs/models/RatesInformation.md new file mode 100644 index 00000000..5765c0ae --- /dev/null +++ b/docs/models/RatesInformation.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.RatesInformation +A rates information resource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **string** | When the rate was created | [optional] +**Errors** | [**List<Error>**](Error.md) | | [optional] +**InvalidRates** | [**List<Rate>**](Rate.md) | An array of invalid shipment rates | [optional] [readonly] +**RateRequestId** | **string** | A string that uniquely identifies the rate request | [optional] [readonly] +**Rates** | [**List<Rate>**](Rate.md) | An array of shipment rates | [optional] [readonly] +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [optional] [readonly] +**Status** | **RateResponseStatus** | | [optional] [readonly] + diff --git a/docs/models/ReasonCode.md b/docs/models/ReasonCode.md new file mode 100644 index 00000000..58fc1611 --- /dev/null +++ b/docs/models/ReasonCode.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ReasonCode +The possible normalized reasons a label void request may not have been approved + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/RecognizedEntity.md b/docs/models/RecognizedEntity.md new file mode 100644 index 00000000..da8b4c9b --- /dev/null +++ b/docs/models/RecognizedEntity.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.RecognizedEntity +An entity is a single piece of data that was recognized in unstructured text. For example, a city, a postal code, package dimensions, insured value, etc. Each entity includes the original text and the parsed value. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndIndex** | **int** | The index of the last character of this entity within the original text | +**Score** | **double** | A confidence score between zero and one that indicates how certain the API is that it correctly recognized this entity | +**StartIndex** | **int** | The index of the first character of this entity within the original text | +**Text** | **string** | The substring from the original text that was recognized as this entity | +**Type** | **string** | The Entity type (e.g. \"weight\", \"person\", \"address_line1\", etc.) | +**Result** | **Dictionary<string, Object>** | The normalized value of the entity. Most entity results have a `value` field, which is the normalized value of the entity. For example, if the substring \"john doe\" was recognized as a \"person\" entity, then the value might be normalized to have proper capitalization (e.g. \"John Doe\"). Or if the substring \"ft worth\" was recognized as a \"city\" entity, then the value might be normalized to \"Fort Worth\". Some entities have other information in addition to, or instead of a `value`. For example, a \"dimensions\" entity will have separate fields for `length`, `width`, `height`, and `unit`. | [optional] + diff --git a/docs/models/Redirect.md b/docs/models/Redirect.md new file mode 100644 index 00000000..0b2dfcb2 --- /dev/null +++ b/docs/models/Redirect.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.Redirect +The resource to return a redirect URL to. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/RegulationLevel.md b/docs/models/RegulationLevel.md new file mode 100644 index 00000000..a3badf09 --- /dev/null +++ b/docs/models/RegulationLevel.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.RegulationLevel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/RemoveFromBatchRequestBody.md b/docs/models/RemoveFromBatchRequestBody.md new file mode 100644 index 00000000..a65c55c8 --- /dev/null +++ b/docs/models/RemoveFromBatchRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.RemoveFromBatchRequestBody +A modify batch request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RateIds** | **List<string>** | Array of Rate IDs to be modifed on the batch | [optional] +**ShipmentIds** | **List<string>** | The Shipment Ids to be modified on the batch | [optional] + diff --git a/docs/models/ResponseMessage.md b/docs/models/ResponseMessage.md new file mode 100644 index 00000000..609ee3fb --- /dev/null +++ b/docs/models/ResponseMessage.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.ResponseMessage +A response message that displays when additional info is needed for an address validation request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **AddressValidationCode** | | [readonly] +**Message** | **string** | Message explaining the address validation error | [readonly] +**Type** | **AddressValidationMessageType** | | [readonly] +**DetailCode** | **AddressValidationDetailCode** | | + diff --git a/docs/models/SchedulePickupRequestBody.md b/docs/models/SchedulePickupRequestBody.md new file mode 100644 index 00000000..a026ef2b --- /dev/null +++ b/docs/models/SchedulePickupRequestBody.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.SchedulePickupRequestBody +A schedule pickup request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContactDetails** | [**ContactDetails**](ContactDetails.md) | | +**LabelIds** | **List<string>** | Label IDs that will be included in the pickup request | +**PickupWindow** | [**PickupWindow**](PickupWindow.md) | | +**CancelledAt** | **DateTimeOffset** | The date and time that the pickup was cancelled in ShipEngine. | [optional] [readonly] +**CarrierId** | **string** | The carrier_id associated with the pickup | [optional] [readonly] +**ConfirmationNumber** | **string** | The carrier confirmation number for the scheduled pickup. | [optional] [readonly] +**CreatedAt** | **DateTimeOffset** | The date and time that the pickup was created in ShipEngine. | [optional] [readonly] +**PickupAddress** | [**Address**](Address.md) | | [optional] [readonly] +**PickupId** | **string** | Pickup Resource ID | [optional] [readonly] +**PickupNotes** | **string** | Used by some carriers to give special instructions for a package pickup | [optional] +**PickupWindows** | [**List<PickupWindows>**](PickupWindows.md) | An array of available pickup windows. Carriers can return multiple times that they will pickup packages. | [optional] [readonly] +**WarehouseId** | **string** | The warehouse_id associated with the pickup | [optional] [readonly] + diff --git a/docs/models/SchedulePickupResponseBody.md b/docs/models/SchedulePickupResponseBody.md new file mode 100644 index 00000000..29a57e24 --- /dev/null +++ b/docs/models/SchedulePickupResponseBody.md @@ -0,0 +1,21 @@ +# ShipEngineSDK.Model.SchedulePickupResponseBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | The errors associated with the failed API call | [readonly] +**RequestId** | **Guid** | A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur | +**CancelledAt** | **DateTimeOffset** | The date and time that the pickup was cancelled in ShipEngine. | [optional] [readonly] +**CarrierId** | **string** | The carrier_id associated with the pickup | [optional] [readonly] +**ConfirmationNumber** | **string** | The carrier confirmation number for the scheduled pickup. | [optional] [readonly] +**ContactDetails** | [**ContactDetails**](ContactDetails.md) | | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the pickup was created in ShipEngine. | [optional] [readonly] +**LabelIds** | **List<string>** | Label IDs that will be included in the pickup request | [optional] +**PickupAddress** | [**Address**](Address.md) | | [optional] [readonly] +**PickupId** | **string** | Pickup Resource ID | [optional] [readonly] +**PickupNotes** | **string** | Used by some carriers to give special instructions for a package pickup | [optional] +**PickupWindow** | [**PickupWindow**](PickupWindow.md) | | [optional] +**PickupWindows** | [**List<PickupWindows>**](PickupWindows.md) | An array of available pickup windows. Carriers can return multiple times that they will pickup packages. | [optional] [readonly] +**WarehouseId** | **string** | The warehouse_id associated with the pickup | [optional] [readonly] + diff --git a/docs/models/Service.md b/docs/models/Service.md new file mode 100644 index 00000000..d370da05 --- /dev/null +++ b/docs/models/Service.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.Service +A service offered by the carrier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierCode** | **string** | A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc. | [optional] +**CarrierId** | **string** | A string that uniquely identifies the carrier | [optional] [readonly] +**Domestic** | **bool** | Supports domestic shipping | [optional] [readonly] +**International** | **bool** | Supports international shipping. | [optional] [readonly] +**IsMultiPackageSupported** | **bool** | Carrier supports multiple packages per shipment | [optional] [readonly] +**Name** | **string** | User friendly service name | [optional] [readonly] +**ServiceCode** | **string** | service code | [optional] [readonly] + diff --git a/docs/models/Shipment.md b/docs/models/Shipment.md new file mode 100644 index 00000000..593cb1b3 --- /dev/null +++ b/docs/models/Shipment.md @@ -0,0 +1,35 @@ +# ShipEngineSDK.Model.Shipment +The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight. > **Note:** Either `ship_from` or `warehouse_id` must be set. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [readonly] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [readonly] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [readonly] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [readonly] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [readonly] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | + diff --git a/docs/models/ShipmentIdRequest.md b/docs/models/ShipmentIdRequest.md new file mode 100644 index 00000000..a398f565 --- /dev/null +++ b/docs/models/ShipmentIdRequest.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ShipmentIdRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [optional] + diff --git a/docs/models/ShipmentItem.md b/docs/models/ShipmentItem.md new file mode 100644 index 00000000..76295713 --- /dev/null +++ b/docs/models/ShipmentItem.md @@ -0,0 +1,17 @@ +# ShipEngineSDK.Model.ShipmentItem +A shipment item + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Asin** | **string** | Amazon Standard Identification Number | [optional] +**ExternalOrderId** | **string** | external order id | [optional] +**ExternalOrderItemId** | **string** | external order item id | [optional] +**Name** | **string** | item name | [optional] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**Quantity** | **int** | The quantity of this item included in the shipment | [optional] +**SalesOrderId** | **string** | sales order id | [optional] +**SalesOrderItemId** | **string** | sales order item id | [optional] +**Sku** | **string** | Item Stock Keeping Unit | [optional] + diff --git a/docs/models/ShipmentRequest.md b/docs/models/ShipmentRequest.md new file mode 100644 index 00000000..b71e9a10 --- /dev/null +++ b/docs/models/ShipmentRequest.md @@ -0,0 +1,29 @@ +# ShipEngineSDK.Model.ShipmentRequest +The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight. > **Note:** Either `ship_from` or `warehouse_id` must be set. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | [optional] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | [optional] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | [optional] +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | [optional] +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] +**ShipFrom** | [**ShippingAddressFrom**](ShippingAddressFrom.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | [optional] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | [optional] + diff --git a/docs/models/ShipmentStatus.md b/docs/models/ShipmentStatus.md new file mode 100644 index 00000000..2ebe21a5 --- /dev/null +++ b/docs/models/ShipmentStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ShipmentStatus +The possible shipment status values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ShipmentsSortBy.md b/docs/models/ShipmentsSortBy.md new file mode 100644 index 00000000..66ceea76 --- /dev/null +++ b/docs/models/ShipmentsSortBy.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ShipmentsSortBy +The possible shipments sort by values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ShippingAddress.md b/docs/models/ShippingAddress.md new file mode 100644 index 00000000..e6bbad3f --- /dev/null +++ b/docs/models/ShippingAddress.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.ShippingAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | +**CityLocality** | **string** | The name of the city or locality | +**Name** | **string** | The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. | +**PostalCode** | **string** | postal code | +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | +**AddressLine2** | **string** | The second line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressLine3** | **string** | The third line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressResidentialIndicator** | **AddressResidentialIndicator** | Indicates whether this is a residential address. | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**CountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**Email** | **string** | Email for the address owner. | [optional] +**Instructions** | **string** | Additional text about how to handle the shipment at this address. | [optional] +**Phone** | **string** | The phone number of a contact person at this address. The format of this phone number varies depending on the country. | [optional] + diff --git a/docs/models/ShippingAddressFrom.md b/docs/models/ShippingAddressFrom.md new file mode 100644 index 00000000..08d0f4fa --- /dev/null +++ b/docs/models/ShippingAddressFrom.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.ShippingAddressFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | +**CityLocality** | **string** | The name of the city or locality | +**CountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | +**Name** | **string** | The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. | +**Phone** | **string** | The phone number of a contact person at this address. The format of this phone number varies depending on the country. | +**PostalCode** | **string** | postal code | +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | +**AddressLine2** | **string** | The second line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressLine3** | **string** | The third line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressResidentialIndicator** | **AddressResidentialIndicator** | Indicates whether this is a residential address. | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**Email** | **string** | Email for the address owner. | [optional] +**Instructions** | **string** | Additional text about how to handle the shipment at this address. | [optional] + diff --git a/docs/models/ShippingAddressTo.md b/docs/models/ShippingAddressTo.md new file mode 100644 index 00000000..82ebdb1b --- /dev/null +++ b/docs/models/ShippingAddressTo.md @@ -0,0 +1,21 @@ +# ShipEngineSDK.Model.ShippingAddressTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines. | +**CityLocality** | **string** | The name of the city or locality | +**Name** | **string** | The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. | +**PostalCode** | **string** | postal code | +**StateProvince** | **string** | The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation. | +**AddressLine2** | **string** | The second line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressLine3** | **string** | The third line of the street address. For some addresses, this line may not be needed. | [optional] +**AddressResidentialIndicator** | **AddressResidentialIndicator** | Indicates whether this is a residential address. | [optional] +**CompanyName** | **string** | If this is a business address, then the company name should be specified here. | [optional] +**CountryCode** | **string** | The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**Email** | **string** | Email for the address owner. | [optional] +**Geolocation** | [**List<PartialShippingAddressToGeolocationInner>**](PartialShippingAddressToGeolocationInner.md) | | [optional] +**Instructions** | **string** | Additional text about how to handle the shipment at this address. | [optional] +**Phone** | **string** | The phone number of a contact person at this address. The format of this phone number varies depending on the country. | [optional] + diff --git a/docs/models/SmartPostHub.md b/docs/models/SmartPostHub.md new file mode 100644 index 00000000..2c8e6bb3 --- /dev/null +++ b/docs/models/SmartPostHub.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.SmartPostHub +The possible smart post hub values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/SortDir.md b/docs/models/SortDir.md new file mode 100644 index 00000000..36b9f634 --- /dev/null +++ b/docs/models/SortDir.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.SortDir +Controls the sort order of queries |Value |Description |:- -- -- -- --|:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`asc` |Return results in ascending order |`desc` |Return results in descending order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/StatusCode.md b/docs/models/StatusCode.md new file mode 100644 index 00000000..845e3188 --- /dev/null +++ b/docs/models/StatusCode.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.StatusCode +The tracking status codes |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`UN` | Unknown |`AC` | Accepted |`IT` | In Transit |`DE` | Delivered |`EX` | Exception |`AT` | Delivery Attempt |`NY` | Not Yet In System |`SP` | Delivered To Collection Location + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/StatusDetailCode.md b/docs/models/StatusDetailCode.md new file mode 100644 index 00000000..41afedc5 --- /dev/null +++ b/docs/models/StatusDetailCode.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.StatusDetailCode +The tracking status detail codes |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | `CARRIER_STATUS_NOT_MAPPED` | Status not mapped. Please check the carrier's website for updates. | `SHIPMENT_CREATED` | Your tracking number is ready. Your parcel is waiting to be registered in the carrier system and scheduled for pickup. | `AWAITING_PICKUP_DROP_OFF` | Your parcel is waiting to be handed over to the carrier. | `DROPPED_OFF` | Your parcel has been dropped off and is ready for carrier processing. | `ELEC_ADVICE_RECD_BY_CARRIER` | Your shipment is now in the carrier's system. | `PICKED_UP` | Your parcel has been picked up by the carrier. | `CUSTOMS_CLEARED` | Your parcel has cleared customs and is continuing its journey. | `CUSTOMS_PROCESSING` | Your parcel is currently being processed by customs. | `DELIVERY_ARRANGED_WITH_RECIPIENT` | Your parcel's delivery has been arranged with the carrier. | `HUB_SCAN_OUT` | Your parcel has left the carrier's hub. | `HUB_SCAN_IN` | Your parcel has arrived at the carrier's hub for processing. | `IN_TRANSIT` | Your shipment is on its way between the carrier hubs. | `INFORMATION` | The carrier has shared additional information about your parcel. | `PARCEL_OVER_LABELLED` | Your parcel's label has been updated by the carrier, which may affect tracking visibility. | `PARCEL_UPDATE_NOTIFICATION` | The carrier has sent you an update on your parcel status via SMS or email. | `RECEIVED_BY_CARRIER` | Your parcel has been received by the carrier and is beginning its journey. | `RECEIVED_LOCAL_DELIVERY_DEPOT` | Your parcel has arrived at the local delivery depot and is almost ready for delivery. | `SUB_CONTRACTOR_EVENT` | The carrier has shared additional information about your parcel's handling by a delivery partner. | `SUB_CONTRACTOR_RECEIVED` | Your parcel has been received by the carrier's local delivery partner. | `PARCEL_REDIRECTED` | Your parcel has been redirected to a new delivery address per your request. | `DELIVERY_SCHEDULED` | Your parcel's delivery has been scheduled and will soon be out for delivery. | `HUB_PROCESSING` | Your parcel is being processed at a carrier hub. | `DELIVERY_RESCHEDULED` | Your parcel's delivery has been rescheduled due to operational issues. | `ATTEMPTED_DELIVERY` | The carrier attempted to deliver your parcel but was unable to complete delivery. | `ATTEMPTED_DELIVERY_FINAL` | The carrier made a final attempt to deliver your parcel but was unable to complete delivery. Please check the carrier's instructions for next steps. | `COD_AMOUNT_PAID` | Cash on delivery payment received. | `CUSTOMER_CARDED` | Delivery attempt failed. Please follow delivery instructions left by the carrier. | `OUT_FOR_DELIVERY` | Your parcel is on its way and will be delivered today. | `AWAITING_COLLECTION_FROM_PICKUP_POINT` | Your parcel is ready for collection at the selected pickup point. | `COLLECT_AT_LOCAL_PO` | Your parcel is ready for collection at your local post office. | `CUSTOMER_TO_COLLECT_FROM_CARRIER` | Your parcel is available for collection from the carrier's local delivery unit. | `DELIVERED_TO_RECEPTION` | Your parcel has been delivered to your building's reception or designated mail area. | `DELIVERED` | Your parcel has been successfully delivered. | `DELIVERED_DAMAGED` | Your parcel was delivered but arrived with visible damage. | `DELIVERED_IN_PART` | Part of your shipment has been delivered. Check for updates on the rest. | `DELIVERED_SPECIFIED_SAFE_PLACE` | Your parcel has been delivered to your specified safe place. | `DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION` | Your parcel was delivered to an alternative location due to the delivery company being unable to deliver it to the specified address. Check carrier instructions for pickup details. | `DELIVERED_TO_NEIGHBOUR` | Your parcel was delivered to your neighbor. | `DELIVERED_TO_PO_BOX` | Your parcel has been delivered to your specified PO Box. | `PARCEL_COLLECTED_FROM_PICKUP_POINT` | Your package has been picked up from the pick up point. | `POST_TRANSIT_STATUS` | The carrier has added more information about your delivery. | `PROOF_OF_DELIVERY` | The carrier has confirmed delivery with proof, such as a signature or photo. | `PICKUP_FAILED` | Parcel pickup failed. The delivery company will try again soon. | `NOT_YET_RECEIVED_BY_CARRIER` | The carrier has not yet received your parcel, which may cause a delay. | `PARCEL_DAMAGED` | Your parcel was damaged in transit but will still be delivered. | `ADDRESS_QUERY` | There is an issue with the delivery address, which may delay your parcel. | `CARRIER_DELAYS` | Your parcel is delayed due to issues within the carrier network. | `DELAYED_NOT_CARRIER` | Your parcel is delayed due to circumstances beyond the carrier's control. | `HELD_BY_CARRIER` | Your parcel is being held due to an operational issue. Contact with the carrier for more information. | `HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING` | Your parcel is being held by the carrier for customs documentation checks. This may occur when the carrier must confirm documentation before the parcel can continue its journey. | `HELD_BY_CUSTOMS` | Your parcel is being held at customs, which may delay delivery. | `HELD_BY_EXPORT_CUSTOMS` | Your parcel is held at export customs, which may delay delivery. | `HELD_BY_IMPORT_CUSTOMS` | Your parcel is held at import customs and may require action to proceed. | `INCORRECT_DECLARATION` | Your parcel has been incorrectly declared but is still moving forward for delivery. | `MISROUTED` | Your parcel was sent to the wrong place due to a routing error but is being redirected. | `PARCEL_REPACKED` | Your parcel was repackaged by the carrier due to damage and will still be delivered. | `RECD_BY_CARRIER_NO_ELEC_ADVICE` | Your parcel has been received by the carrier but may experience delays due to missing pre-advice. | `COD_AMOUNT_NOT_PAID` | Delivery failed due to unpaid cash on delivery. Please follow carrier instructions. | `CUSTOMER_IDENTIFICATION_FAILED` | Delivery couldn't be completed as identification requirements were not met. | `NO_ACCESS_TO_RECIPIENTS_ADDRESS` | The carrier couldn't access the delivery location due to restricted entry. | `CANCELLED` | Your parcel has been cancelled. | `CUSTOMER_MOVED` | Delivery failed as the recipient is no longer at the specified address. Your parcel is being returned. | `HAZARDOUS_PROHIBITED` | Your parcel contains restricted items and will not be delivered. | `NOT_COLLECTED_FROM_PICKUP_POINT` | Your parcel was not collected from the pickup point within the designated time and will be returned. | `NOT_DELIVERED` | All delivery attempts failed. Your parcel is being returned to the sender. | `NOT_DELIVERED_ADDRESSEE_DECEASED` | The parcel could not be delivered as the addressee is reported deceased. | `PARCEL_DISPOSED` | Your parcel has been disposed of due to its contents or condition and will not be delivered. | `PARCEL_LOST` | The carrier has reported that your parcel is lost and will not be delivered. | `PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY` | The parcel cannot be delivered as it exceeds the carrier's service limits. | `REFUSED_BY_CUSTOMER` | You have refused the parcel, and it will be returned to the sender. | `RETURN_TO_SENDER` | Your parcel is being returned to the sender due to delivery issues. | `UNSPECIFIED_EXCEPTION` | The carrier has reported an issue with your parcel, but details are unavailable. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/Tag.md b/docs/models/Tag.md new file mode 100644 index 00000000..34cb6bed --- /dev/null +++ b/docs/models/Tag.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.Tag +Tags are arbitrary strings that you can use to categorize shipments. For example, you may want to use tags to distinguish between domestic and international shipments, or between insured and uninsured shipments. Or maybe you want to create a tag for each of your customers so you can easily retrieve every shipment for a customer. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The tag name. | + diff --git a/docs/models/TagShipmentResponseBody.md b/docs/models/TagShipmentResponseBody.md new file mode 100644 index 00000000..f40aa2d7 --- /dev/null +++ b/docs/models/TagShipmentResponseBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.TagShipmentResponseBody +Get shipment tags response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | **List<string>** | | + diff --git a/docs/models/TaxIdentifier.md b/docs/models/TaxIdentifier.md new file mode 100644 index 00000000..c9ee2f59 --- /dev/null +++ b/docs/models/TaxIdentifier.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.TaxIdentifier +A tax identifier object + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IdentifierType** | **IdentifierType** | | +**IssuingAuthority** | **string** | The authority that issued this tax. This must be a valid 2 character ISO 3166 Alpha 2 country code. | +**TaxableEntityType** | **TaxableEntityType** | | +**Value** | **string** | The value of the identifier | + diff --git a/docs/models/TaxType.md b/docs/models/TaxType.md new file mode 100644 index 00000000..c7dd6389 --- /dev/null +++ b/docs/models/TaxType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.TaxType +Type of a tax added to shipping cost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/TaxableEntityType.md b/docs/models/TaxableEntityType.md new file mode 100644 index 00000000..ef14cbc7 --- /dev/null +++ b/docs/models/TaxableEntityType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.TaxableEntityType +The taxable entity type for this tax item. Valid values include the following |Value |Description |:- -- -- -- -- |:- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |`shipper` | The shipper is responsible for this tax. |`recipient` | The recipient of the shipment is responsible for this tax. |`ior` | The importer of records is responsible for tax. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/TokensGetEphemeralTokenResponseBodyYaml.md b/docs/models/TokensGetEphemeralTokenResponseBodyYaml.md new file mode 100644 index 00000000..32d4e6b1 --- /dev/null +++ b/docs/models/TokensGetEphemeralTokenResponseBodyYaml.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RedirectUrl** | **string** | The redirect url formatted with the requested token. | [optional] +**Token** | **string** | The requested token that expires in 10 seconds. | [optional] + diff --git a/docs/models/TrackEvent.md b/docs/models/TrackEvent.md new file mode 100644 index 00000000..7c08616b --- /dev/null +++ b/docs/models/TrackEvent.md @@ -0,0 +1,27 @@ +# ShipEngineSDK.Model.TrackEvent +A track event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CarrierDetailCode** | **string** | Carrier detail code | [readonly] +**CarrierStatusCode** | **string** | Carrier status code | [readonly] +**CarrierStatusDescription** | **string** | carrier status description | [readonly] +**CityLocality** | **string** | City locality | [readonly] +**OccurredAt** | **DateTimeOffset** | Timestamp for carrier event | +**PostalCode** | **string** | Postal code | [readonly] +**StateProvince** | **string** | State province | [readonly] +**StatusCode** | **StatusCode** | | +**StatusDescription** | **string** | Event Status Description | [readonly] +**CarrierOccurredAt** | **DateTimeOffset** | Carrier timestamp for the event, it is assumed to be the local time of where the event occurred. | [optional] +**CompanyName** | **string** | Company Name | [optional] [readonly] +**CountryCode** | **string** | A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | [optional] +**Description** | **string** | Event description | [optional] [readonly] +**EventCode** | **string** | Event Code | [optional] +**Latitude** | **double** | Latitude coordinate of tracking event. | [optional] +**Longitude** | **double** | Longitude coordinate of tracking event. | [optional] +**Signer** | **string** | Signer information | [optional] [readonly] +**StatusDetailCode** | **StatusDetailCode** | | [optional] +**StatusDetailDescription** | **string** | Event Status Detail Description | [optional] [readonly] + diff --git a/docs/models/TrackingInformation.md b/docs/models/TrackingInformation.md new file mode 100644 index 00000000..e7878b70 --- /dev/null +++ b/docs/models/TrackingInformation.md @@ -0,0 +1,24 @@ +# ShipEngineSDK.Model.TrackingInformation +A tracking information resource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActualDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**CarrierCode** | **string** | A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc. | [optional] +**CarrierDetailCode** | **string** | Carrier detail code | [optional] [readonly] +**CarrierId** | **int** | The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label | [optional] [readonly] +**CarrierStatusCode** | **string** | Carrier status code | [optional] [readonly] +**CarrierStatusDescription** | **string** | carrier status description | [optional] [readonly] +**EstimatedDeliveryDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**Events** | [**List<TrackEvent>**](TrackEvent.md) | The events that have occured during the lifetime of this tracking number. | [optional] [readonly] +**ExceptionDescription** | **string** | Exception description | [optional] [readonly] +**ShipDate** | **DateTimeOffset** | An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time. | [optional] +**StatusCode** | **StatusCode** | | [optional] +**StatusDescription** | **string** | Status description | [optional] [readonly] +**StatusDetailCode** | **StatusDetailCode** | | [optional] +**StatusDetailDescription** | **string** | Status detail description | [optional] [readonly] +**TrackingNumber** | **string** | A tracking number for a package. The format depends on the carrier. | [optional] +**TrackingUrl** | **string** | Carrier Tracking Url, if available | [optional] [readonly] + diff --git a/docs/models/TrackingStatus.md b/docs/models/TrackingStatus.md new file mode 100644 index 00000000..dffbc992 --- /dev/null +++ b/docs/models/TrackingStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.TrackingStatus +The different statuses that can apply to a shipment. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/TransportMean.md b/docs/models/TransportMean.md new file mode 100644 index 00000000..ce10ff96 --- /dev/null +++ b/docs/models/TransportMean.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.TransportMean + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/UpdateAccountSettingsImageRequestBody.md b/docs/models/UpdateAccountSettingsImageRequestBody.md new file mode 100644 index 00000000..66f236b7 --- /dev/null +++ b/docs/models/UpdateAccountSettingsImageRequestBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody +A ShipEngine account settings images request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsDefault** | **bool** | Indicates whether this image is set as default. | +**CreatedAt** | **DateTimeOffset** | The date and time that the image was created in ShipEngine. | [optional] [readonly] +**ImageContentType** | **string** | The image type | [optional] +**ImageData** | **string** | A base64 encoded string representation of the image. | [optional] +**LabelImageId** | **string** | A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded. | [optional] [readonly] +**ModifiedAt** | **DateTimeOffset** | The date and time that the image was modified in ShipEngine. | [optional] [readonly] +**Name** | **string** | A human readable name for the image. | [optional] + diff --git a/docs/models/UpdateAmazonBuyShippingRequestBody.md b/docs/models/UpdateAmazonBuyShippingRequestBody.md new file mode 100644 index 00000000..030f90c1 --- /dev/null +++ b/docs/models/UpdateAmazonBuyShippingRequestBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody +An amazon buy shipping account settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email | [optional] + diff --git a/docs/models/UpdateCarrierSettingsRequestBody.md b/docs/models/UpdateCarrierSettingsRequestBody.md new file mode 100644 index 00000000..bf77f7a2 --- /dev/null +++ b/docs/models/UpdateCarrierSettingsRequestBody.md @@ -0,0 +1,7 @@ +# ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/UpdateDhlExpressSettingsRequestBody.md b/docs/models/UpdateDhlExpressSettingsRequestBody.md new file mode 100644 index 00000000..32b75259 --- /dev/null +++ b/docs/models/UpdateDhlExpressSettingsRequestBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody +An update dhl express settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsPrimaryAccount** | **bool** | Indicates if this is primary account | [optional] +**Nickname** | **string** | Account nickname | [optional] +**ShouldHideAccountNumberOnArchiveDoc** | **bool** | Indicates if the account number should be hidden on the archive documentation | [optional] + diff --git a/docs/models/UpdateFedexSettingsRequestBody.md b/docs/models/UpdateFedexSettingsRequestBody.md new file mode 100644 index 00000000..3e03465e --- /dev/null +++ b/docs/models/UpdateFedexSettingsRequestBody.md @@ -0,0 +1,15 @@ +# ShipEngineSDK.Model.UpdateFedexSettingsRequestBody +An update Fedex settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsPrimaryAccount** | **bool** | | [optional] +**LetterheadImage** | **string** | | [optional] +**Nickname** | **string** | Account nickname | [optional] +**PickupType** | **FedexPickupType** | | [optional] +**SignatureImage** | **string** | | [optional] +**SmartPostEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**SmartPostHub** | **SmartPostHub** | | [optional] + diff --git a/docs/models/UpdateNewgisticsSettingsRequestBody.md b/docs/models/UpdateNewgisticsSettingsRequestBody.md new file mode 100644 index 00000000..ea73176c --- /dev/null +++ b/docs/models/UpdateNewgisticsSettingsRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody +A newgistics account settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IncludeBarcodeWithOrderNumber** | **bool** | | [optional] +**ReceiveEmailOnManifestProcessing** | **bool** | | [optional] + diff --git a/docs/models/UpdatePackageTypeRequestBody.md b/docs/models/UpdatePackageTypeRequestBody.md new file mode 100644 index 00000000..e8023bf3 --- /dev/null +++ b/docs/models/UpdatePackageTypeRequestBody.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.UpdatePackageTypeRequestBody +An update package type request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**PackageCode** | **string** | A [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. Use the code `package` for custom or unknown package types. | +**Description** | **string** | Provides a helpful description for the custom package. | [optional] +**Dimensions** | [**Dimensions**](Dimensions.md) | The custom dimensions for the package. | [optional] +**PackageId** | **string** | A string that uniquely identifies the package. | [optional] + diff --git a/docs/models/UpdateShipmentFields.md b/docs/models/UpdateShipmentFields.md new file mode 100644 index 00000000..e651926a --- /dev/null +++ b/docs/models/UpdateShipmentFields.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.UpdateShipmentFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ValidateAddress** | **ValidateAddress** | | [optional] + diff --git a/docs/models/UpdateShipmentRequestBody.md b/docs/models/UpdateShipmentRequestBody.md new file mode 100644 index 00000000..fc8645a9 --- /dev/null +++ b/docs/models/UpdateShipmentRequestBody.md @@ -0,0 +1,36 @@ +# ShipEngineSDK.Model.UpdateShipmentRequestBody +An update shipment request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | [optional] +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | [optional] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | [optional] +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [optional] [readonly] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | [optional] +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [optional] [readonly] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | [optional] +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | [optional] +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | [optional] +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | [optional] +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [optional] [readonly] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [optional] [readonly] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [optional] [readonly] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [optional] [readonly] +**ValidateAddress** | **ValidateAddress** | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | [optional] + diff --git a/docs/models/UpdateShipmentResponseBody.md b/docs/models/UpdateShipmentResponseBody.md new file mode 100644 index 00000000..048d8fdb --- /dev/null +++ b/docs/models/UpdateShipmentResponseBody.md @@ -0,0 +1,37 @@ +# ShipEngineSDK.Model.UpdateShipmentResponseBody +An update shipment response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressValidation** | [**AddressValidationResult**](AddressValidationResult.md) | The address validation | +**AdvancedOptions** | [**AdvancedShipmentOptions**](AdvancedShipmentOptions.md) | Advanced shipment options. These are entirely optional. | +**CarrierId** | **string** | The carrier account that is billed for the shipping charges | +**Confirmation** | **DeliveryConfirmation** | The type of delivery confirmation that is required for this shipment. | +**CreatedAt** | **DateTimeOffset** | The date and time that the shipment was created in ShipEngine. | [readonly] +**Errors** | **List<string>** | An array of errors that occurred while creating shipment. | [readonly] +**InsuranceProvider** | **InsuranceProvider** | The insurance provider to use for any insured packages in the shipment. | +**Packages** | [**List<Package>**](Package.md) | The packages in the shipment. > **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned. | +**ReturnTo** | [**ShippingAddress**](ShippingAddress.md) | The return address for this shipment. Defaults to the `ship_from` address. | +**ServiceCode** | **string** | The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc. | +**ShipDate** | **DateTimeOffset** | The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead. | +**ShipFrom** | [**ShippingAddress**](ShippingAddress.md) | The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time. | +**ShipTo** | [**ShippingAddressTo**](ShippingAddressTo.md) | The recipient's mailing address | +**ShipmentId** | **string** | A string that uniquely identifies the shipment | [readonly] +**ShipmentStatus** | **ShipmentStatus** | The current status of the shipment | [readonly] +**Tags** | [**List<Tag>**](Tag.md) | Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. | [readonly] +**TotalWeight** | [**Weight**](Weight.md) | The combined weight of all packages in the shipment | [readonly] +**ComparisonRateType** | **string** | Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS. | [optional] +**Customs** | [**InternationalShipmentOptions**](InternationalShipmentOptions.md) | Customs information. This is usually only needed for international shipments. | +**ExternalOrderId** | **string** | ID that the Order Source assigned | [optional] +**ExternalShipmentId** | **string** | A unique user-defined key to identify a shipment. This can be used to retrieve the shipment. > **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**IsReturn** | **bool** | An optional indicator if the shipment is intended to be a return. Defaults to false if not provided. | [optional] [default to false] +**Items** | [**List<ShipmentItem>**](ShipmentItem.md) | Describe the packages included in this shipment as related to potential metadata that was imported from external order sources | [optional] +**ModifiedAt** | **DateTimeOffset** | The date and time that the shipment was created or last modified. | [optional] [readonly] +**OrderSourceCode** | **OrderSourceName** | | [optional] +**ShipmentNumber** | **string** | A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment. > **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated. | [optional] +**ShippingRuleId** | **string** | ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment | [optional] +**TaxIdentifiers** | [**List<TaxIdentifier>**](TaxIdentifier.md) | | [optional] +**WarehouseId** | **string** | The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified. | [optional] + diff --git a/docs/models/UpdateShipmentsTags.md b/docs/models/UpdateShipmentsTags.md new file mode 100644 index 00000000..20cadb09 --- /dev/null +++ b/docs/models/UpdateShipmentsTags.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.UpdateShipmentsTags + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShipmentsTags** | [**List<UpdateShipmentsTagsShipmentsTagsInner>**](UpdateShipmentsTagsShipmentsTagsInner.md) | | [optional] + diff --git a/docs/models/UpdateShipmentsTagsRequestBody.md b/docs/models/UpdateShipmentsTagsRequestBody.md new file mode 100644 index 00000000..9079b5c8 --- /dev/null +++ b/docs/models/UpdateShipmentsTagsRequestBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody +A request body with shipments and tags + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShipmentsTags** | [**List<UpdateShipmentsTagsShipmentsTagsInner>**](UpdateShipmentsTagsShipmentsTagsInner.md) | | [optional] + diff --git a/docs/models/UpdateShipmentsTagsShipmentsTagsInner.md b/docs/models/UpdateShipmentsTagsShipmentsTagsInner.md new file mode 100644 index 00000000..372827f8 --- /dev/null +++ b/docs/models/UpdateShipmentsTagsShipmentsTagsInner.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShipmentId** | **string** | | [optional] +**Tags** | **List<string>** | | [optional] + diff --git a/docs/models/UpdateUpsSettingsRequestBody.md b/docs/models/UpdateUpsSettingsRequestBody.md new file mode 100644 index 00000000..92071dfb --- /dev/null +++ b/docs/models/UpdateUpsSettingsRequestBody.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.UpdateUpsSettingsRequestBody +An update UPS settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountPostalCode** | **string** | account postal code | [optional] +**Invoice** | [**UpsInvoice**](UpsInvoice.md) | The invoice | [optional] +**IsPrimaryAccount** | **bool** | Indicates if this is the primary UPS account | [optional] +**MailInnovationsCostCenter** | **string** | mail innovations cost center | [optional] +**MailInnovationsEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**Nickname** | **string** | nickname | [optional] +**PickupType** | **UpsPickupType** | | [optional] +**UseCarbonNeutralShippingProgram** | **bool** | The use carbon neutral shipping program | [optional] +**UseConsolidationServices** | **bool** | The use consolidation services | [optional] +**UseGroundFreightPricing** | **bool** | The use ground freight pricing | [optional] +**UseNegotiatedRates** | **bool** | The use negotiated rates | [optional] +**UseOrderNumberOnMailInnovationsLabels** | **bool** | The use order number on mail innovations labels | [optional] + diff --git a/docs/models/UpdateWarehouseRequestBody.md b/docs/models/UpdateWarehouseRequestBody.md new file mode 100644 index 00000000..8ba47eeb --- /dev/null +++ b/docs/models/UpdateWarehouseRequestBody.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.UpdateWarehouseRequestBody +An update warehouse request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the warehouse | +**OriginAddress** | [**Address**](Address.md) | The origin address of the warehouse | +**CreatedAt** | **DateTimeOffset** | Timestamp that indicates when the warehouse was created | [optional] [readonly] +**IsDefault** | **bool** | Designates which single warehouse is the default on the account | [optional] [default to false] +**ReturnAddress** | [**Address**](Address.md) | The return address associated with the warehouse | [optional] +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [optional] [readonly] + diff --git a/docs/models/UpdateWarehouseSettingsRequestBody.md b/docs/models/UpdateWarehouseSettingsRequestBody.md new file mode 100644 index 00000000..257c4946 --- /dev/null +++ b/docs/models/UpdateWarehouseSettingsRequestBody.md @@ -0,0 +1,9 @@ +# ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody +An update warehouse settings request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsDefault** | **bool** | The default property on the warehouse. | [optional] + diff --git a/docs/models/UpdateWebhookRequestBody.md b/docs/models/UpdateWebhookRequestBody.md new file mode 100644 index 00000000..ee351936 --- /dev/null +++ b/docs/models/UpdateWebhookRequestBody.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.UpdateWebhookRequestBody +An update webhook request body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Headers** | [**List<WebhookHeader>**](WebhookHeader.md) | Array of custom webhook headers | [optional] +**Url** | **string** | The url that the wehbook sends the request | [optional] + diff --git a/docs/models/UpsAccountSettings.md b/docs/models/UpsAccountSettings.md new file mode 100644 index 00000000..1e57f3e9 --- /dev/null +++ b/docs/models/UpsAccountSettings.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.UpsAccountSettings +UPS account settings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountPostalCode** | **string** | account postal code | [optional] +**Invoice** | [**UpsInvoice**](UpsInvoice.md) | The invoice | [optional] +**IsPrimaryAccount** | **bool** | Indicates if this is the primary UPS account | [optional] +**MailInnovationsCostCenter** | **string** | mail innovations cost center | [optional] +**MailInnovationsEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**Nickname** | **string** | nickname | [optional] +**PickupType** | **UpsPickupType** | | [optional] +**UseCarbonNeutralShippingProgram** | **bool** | The use carbon neutral shipping program | [optional] +**UseConsolidationServices** | **bool** | The use consolidation services | [optional] +**UseGroundFreightPricing** | **bool** | The use ground freight pricing | [optional] +**UseNegotiatedRates** | **bool** | The use negotiated rates | [optional] +**UseOrderNumberOnMailInnovationsLabels** | **bool** | The use order number on mail innovations labels | [optional] + diff --git a/docs/models/UpsInvoice.md b/docs/models/UpsInvoice.md new file mode 100644 index 00000000..2113a97c --- /dev/null +++ b/docs/models/UpsInvoice.md @@ -0,0 +1,13 @@ +# ShipEngineSDK.Model.UpsInvoice +UPS invoice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ControlId** | **string** | A string that uniquely identifies the control | [optional] +**InvoiceAmount** | **decimal** | | [optional] +**InvoiceCurrencyCode** | **string** | | [optional] +**InvoiceDate** | **DateTimeOffset** | invoice date | [optional] +**InvoiceNumber** | **string** | invoice number | [optional] + diff --git a/docs/models/UpsPickupType.md b/docs/models/UpsPickupType.md new file mode 100644 index 00000000..8d1c16ed --- /dev/null +++ b/docs/models/UpsPickupType.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.UpsPickupType +The possible ups pickup type values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/UpsSettingsResponseBody.md b/docs/models/UpsSettingsResponseBody.md new file mode 100644 index 00000000..90004596 --- /dev/null +++ b/docs/models/UpsSettingsResponseBody.md @@ -0,0 +1,20 @@ +# ShipEngineSDK.Model.UpsSettingsResponseBody +A UPS settings response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountPostalCode** | **string** | account postal code | [optional] +**Invoice** | [**UpsInvoice**](UpsInvoice.md) | The invoice | [optional] +**IsPrimaryAccount** | **bool** | Indicates if this is the primary UPS account | [optional] +**MailInnovationsCostCenter** | **string** | mail innovations cost center | [optional] +**MailInnovationsEndorsement** | **AncillaryServiceEndorsement** | | [optional] +**Nickname** | **string** | nickname | [optional] +**PickupType** | **UpsPickupType** | | [optional] +**UseCarbonNeutralShippingProgram** | **bool** | The use carbon neutral shipping program | [optional] +**UseConsolidationServices** | **bool** | The use consolidation services | [optional] +**UseGroundFreightPricing** | **bool** | The use ground freight pricing | [optional] +**UseNegotiatedRates** | **bool** | The use negotiated rates | [optional] +**UseOrderNumberOnMailInnovationsLabels** | **bool** | The use order number on mail innovations labels | [optional] + diff --git a/docs/models/ValidateAddress.md b/docs/models/ValidateAddress.md new file mode 100644 index 00000000..653f2ea5 --- /dev/null +++ b/docs/models/ValidateAddress.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ValidateAddress +The possible validate address values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/ValidateShipmentFields.md b/docs/models/ValidateShipmentFields.md new file mode 100644 index 00000000..30ef90aa --- /dev/null +++ b/docs/models/ValidateShipmentFields.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ValidateShipmentFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ValidateAddress** | **ValidateAddress** | | [optional] + diff --git a/docs/models/ValidationStatus.md b/docs/models/ValidationStatus.md new file mode 100644 index 00000000..e06a9572 --- /dev/null +++ b/docs/models/ValidationStatus.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.ValidationStatus +The possible validation status values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/VoidLabelResponseBody.md b/docs/models/VoidLabelResponseBody.md new file mode 100644 index 00000000..5bb7dc09 --- /dev/null +++ b/docs/models/VoidLabelResponseBody.md @@ -0,0 +1,11 @@ +# ShipEngineSDK.Model.VoidLabelResponseBody +A void label response body + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Approved** | **bool** | Indicates whether the attempt to void the label was successful | [readonly] +**Message** | **string** | | [readonly] +**ReasonCode** | **ReasonCode** | Indicates a normalized reason for the conditions if the void attempt was not approved. Will not populate if approved is true. “unknown” codes may be specified later. | [optional] [readonly] + diff --git a/docs/models/Warehouse.md b/docs/models/Warehouse.md new file mode 100644 index 00000000..d9a2f43d --- /dev/null +++ b/docs/models/Warehouse.md @@ -0,0 +1,14 @@ +# ShipEngineSDK.Model.Warehouse +A warehouse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **DateTimeOffset** | Timestamp that indicates when the warehouse was created | [optional] [readonly] +**IsDefault** | **bool** | Designates which single warehouse is the default on the account | [optional] [default to false] +**Name** | **string** | Name of the warehouse | [optional] +**OriginAddress** | [**Address**](Address.md) | The origin address of the warehouse | [optional] +**ReturnAddress** | [**Address**](Address.md) | The return address associated with the warehouse | [optional] +**WarehouseId** | **string** | A string that uniquely identifies the warehouse | [optional] [readonly] + diff --git a/docs/models/Webhook.md b/docs/models/Webhook.md new file mode 100644 index 00000000..e9d40f5d --- /dev/null +++ b/docs/models/Webhook.md @@ -0,0 +1,12 @@ +# ShipEngineSDK.Model.Webhook +A webhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Event** | **WebhookEvent** | | [optional] +**Headers** | [**List<WebhookHeader>**](WebhookHeader.md) | Array of custom webhook headers | [optional] +**Url** | **string** | The url that the webhook sends the request to | [optional] +**WebhookId** | **string** | A string that uniquely identifies the webhook | [optional] [readonly] + diff --git a/docs/models/WebhookEvent.md b/docs/models/WebhookEvent.md new file mode 100644 index 00000000..f37a9f4a --- /dev/null +++ b/docs/models/WebhookEvent.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.WebhookEvent +The possible webook event values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/docs/models/WebhookHeader.md b/docs/models/WebhookHeader.md new file mode 100644 index 00000000..1be43d38 --- /dev/null +++ b/docs/models/WebhookHeader.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.WebhookHeader +Optional header to be specified in webhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | Key/name of a header | +**Value** | **string** | Value of a header | + diff --git a/docs/models/Weight.md b/docs/models/Weight.md new file mode 100644 index 00000000..bef119a3 --- /dev/null +++ b/docs/models/Weight.md @@ -0,0 +1,10 @@ +# ShipEngineSDK.Model.Weight +The weight of a package + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Unit** | **WeightUnit** | | +**Value** | **decimal** | The weight, in the specified unit | + diff --git a/docs/models/WeightUnit.md b/docs/models/WeightUnit.md new file mode 100644 index 00000000..83e78a3a --- /dev/null +++ b/docs/models/WeightUnit.md @@ -0,0 +1,8 @@ +# ShipEngineSDK.Model.WeightUnit +The possible weight unit values + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + diff --git a/generation/swagger.json b/generation/swagger.json index ae758397..54262a7b 100644 --- a/generation/swagger.json +++ b/generation/swagger.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "ShipEngine API", - "version": "1.1.202406212006", + "version": "1.1.202501091801", "termsOfService": "https://www.shipengine.com/terms-of-service/", "x-logo": { "url": "https://shipengine.github.io/img/shipengine-logo-square.png", @@ -2141,7 +2141,7 @@ }, "/v1/labels": { "summary": "Print shipping labels", - "description": "Print shipping labels for any of the top global carriers in minutes—instead of weeks. Simply [connect your existing carrier accounts](https://www.shipengine.com/docs/carriers/setup/)\nin the API dashboard, and then [begin creating labels](https://www.shipengine.com/docs/shipping/use-a-carrier-service/).\n", + "description": "Print shipping labels for any of the top global carriers in minutes—instead of weeks. Simply [connect your existing carrier accounts](https://www.shipengine.com/docs/carriers/setup/)\nin the API dashboard, and then [begin creating labels](https://www.shipengine.com/docs/shipping/use-a-carrier-service/).\n", "get": { "summary": "List labels", "description": "This endpoint returns a list of labels that you've [created](https://www.shipengine.com/docs/labels/create-a-label/). You can optionally filter the results as well as control their sort order and the number of results returned at a time.\n\nBy default, all labels are returned, 25 at a time, starting with the most recently created ones. You can combine multiple filter options to narrow-down the results. For example, if you only want to get your UPS labels for your east coast warehouse you could query by both `warehouse_id` and `carrier_id`\n", @@ -5619,6 +5619,30 @@ "example": "Body of request cannot be null.", "minLength": 1, "description": "An error message associated with the failed API call" + }, + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier that generated the error." + }, + "carrier_code": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/carrier_code" + } + ], + "description": "The name of the [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) that generated the error, such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" + }, + "field_name": { + "type": "string", + "readOnly": true, + "example": "shipment.ship_to.phone_number", + "description": "The name of the field that caused the error" } } }, @@ -5694,11 +5718,33 @@ "invalid_charge_event", "invalid_object", "no_rates_returned", + "file_not_found", + "shipping_rule_not_found", + "service_not_determined", + "no_rates_returned", + "funding_source_registration_in_progress", + "insurance_failure", "funding_source_missing_configuration", "funding_source_error" ], "description": "The error code specified for the failed API Call" }, + "se_id": { + "title": "se_id", + "type": "string", + "minLength": 1, + "maxLength": 25, + "pattern": "^se(-[a-z0-9]+)+$", + "example": "se-28529731", + "description": "A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc." + }, + "carrier_code": { + "title": "carrier_code", + "type": "string", + "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$", + "example": "dhl_express", + "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" + }, "list_account_settings_images_response_body": { "title": "list_account_settings_images_response_body", "allOf": [ @@ -6391,13 +6437,10 @@ "description": "Any residential or business mailing address, anywhere in the world.\n\n> **Note:** Either `name` or `company_name` must be set. Both may be specified, if relevant.\n", "required": [ "name", - "phone", "address_line1", "city_locality", "state_province", - "postal_code", - "country_code", - "address_residential_indicator" + "postal_code" ], "additionalProperties": false, "allOf": [ @@ -6858,7 +6901,9 @@ "type": "string", "enum": [ "4x6", - "letter" + "letter", + "A4", + "A6" ], "description": "The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format.\n" }, @@ -6872,15 +6917,6 @@ ], "description": "The possible file formats in which shipping labels can be downloaded. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats.\n\n|Label Format | Supported Carriers\n|--------------|-----------------------------------\n|`pdf` | All carriers\n|`png` | `fedex`
`stamps_com`
`ups`
`usps`\n|`zpl` | `access_worldwide`
`apc`
`asendia`
`dhl_global_mail`
`dhl_express`
`dhl_express_australia`
`dhl_express_canada`
`dhl_express_worldwide`
`dhl_express_uk`
`dpd`
`endicia`
`fedex`
`fedex_uk`
`firstmile`
`imex`
`newgistics`
`ontrac`
`rr_donnelley`
`stamps_com`
`ups`
`usps`\n" }, - "se_id": { - "title": "se_id", - "type": "string", - "minLength": 1, - "maxLength": 25, - "pattern": "^se(-[a-z0-9]+)+$", - "example": "se-28529731", - "description": "A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc." - }, "label_download": { "title": "label_download", "type": "object", @@ -7368,7 +7404,6 @@ }, "balance": { "type": "number", - "format": "double", "readOnly": true, "example": 3799.52, "minimum": 0, @@ -7388,6 +7423,16 @@ "example": "Stamps.com", "description": "Screen readable name" }, + "funding_source_id": { + "readOnly": true, + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "Funding source ID for the carrier" + }, "primary": { "type": "boolean", "readOnly": true, @@ -7449,13 +7494,6 @@ } } }, - "carrier_code": { - "title": "carrier_code", - "type": "string", - "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$", - "example": "dhl_express", - "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" - }, "service": { "title": "service", "type": "object", @@ -7588,21 +7626,18 @@ }, "length": { "type": "number", - "format": "double", "minimum": 0, "default": 0, "description": "The length of the package, in the specified unit" }, "width": { "type": "number", - "format": "double", "minimum": 0, "default": 0, "description": "The width of the package, in the specified unit" }, "height": { "type": "number", - "format": "double", "minimum": 0, "default": 0, "description": "The height of the package, in the specified unit" @@ -7687,7 +7722,6 @@ }, "amount": { "type": "number", - "format": "double", "minimum": 0, "description": "The monetary amount, in the specified currency." } @@ -8041,8 +8075,10 @@ "required": [ "nickname", "account_number", - "ftp_username", - "ftp_password" + "username", + "password", + "api_key", + "processing_location" ], "additionalProperties": false, "properties": { @@ -8057,15 +8093,30 @@ "minLength": 1, "description": "Asendia account number" }, - "ftp_username": { + "username": { "type": "string", "minLength": 1, - "description": "FTP username" + "description": "Asendia username" }, - "ftp_password": { + "password": { "type": "string", "minLength": 1, - "description": "FTP password" + "description": "Asendia password" + }, + "api_key": { + "type": "string", + "minLength": 1, + "description": "Asendia api_key" + }, + "processing_location": { + "type": "string", + "minLength": 1, + "description": "Asendia processing location, one of: 'MIA', 'JFK', 'ORD', 'PHL', 'SFO', 'LAX', 'SLC', 'TOR', 'BUF', 'CAL'" + }, + "sub_account_number": { + "type": "string", + "minLength": 1, + "description": "Asendia sub account number" } } }, @@ -9100,7 +9151,9 @@ "description": "A UPS account information request body. The location header from this call should be used to redirect to UPS for sign in.", "required": [ "nickname", - "account_number" + "account_number", + "account_postal_code", + "account_country_code" ], "additionalProperties": false, "properties": { @@ -9113,6 +9166,16 @@ "type": "string", "minLength": 1, "description": "Account number" + }, + "account_postal_code": { + "type": "string", + "minLength": 1, + "description": "Account Postal Code" + }, + "account_country_code": { + "type": "string", + "minLength": 1, + "description": "Account Country Code" } } }, @@ -9307,7 +9370,9 @@ "newark_ny", "south_brunswick_nj", "scranton_pa", - "wheeling_il" + "wheeling_il", + "middletown_ct", + "portland_or" ], "description": "The possible smart post hub values" }, @@ -9428,7 +9493,6 @@ }, "invoice_amount": { "type": "number", - "format": "double", "minimum": 0 }, "invoice_currency_code": { @@ -9874,7 +9938,7 @@ } ], "readOnly": true, - "description": "The date that the package was (or will be) shippped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead.\n" + "description": "The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead.\n" }, "created_at": { "readOnly": true, @@ -9912,6 +9976,18 @@ ], "description": "The total shipping cost for the specified comparison_rate_type.\n" }, + "rate_details": { + "readOnly": true, + "description": "A list of rate details that are associated with shipping cost. This is useful for\ndisplaying a breakdown of the rate to the user.\n", + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_detail" + } + ] + } + }, "tracking_number": { "type": "string", "minLength": 1, @@ -10130,7 +10206,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/package" + "$ref": "#/components/schemas/label_package" }, { "$ref": "#/components/schemas/alternative_identifiers" @@ -10174,7 +10250,7 @@ "additionalProperties": false, "allOf": [ { - "$ref": "#/components/schemas/label" + "$ref": "#/components/schemas/label_request" } ], "properties": { @@ -10192,99 +10268,20 @@ } } }, - "label": { - "title": "label", + "label_request": { + "title": "label_request", "type": "object", "description": "A label represents the physical sticker that you affix to a package to ship it. ShipEngine makes it easy for you to [create labels](https://www.shipengine.com/docs/labels/create-a-label/) and then download them in PDF, PNG, or ZPL format so you can print them.\n", "additionalProperties": false, "properties": { - "label_id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/se_id" - } - ], - "description": "A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.\n" - }, - "status": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/label_status" - } - ] - }, - "shipment_id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/se_id" - } - ], - "description": "The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/)\n" - }, "shipment": { - "writeOnly": true, "allOf": [ { - "$ref": "#/components/schemas/shipment" + "$ref": "#/components/schemas/shipment_request" } ], "description": "The shipment information used to generate the label" }, - "ship_date": { - "allOf": [ - { - "$ref": "#/components/schemas/date" - } - ], - "readOnly": true, - "description": "The date that the package was (or will be) shippped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead.\n" - }, - "created_at": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/date_time" - } - ], - "description": "The date and time that the label was created in ShipEngine." - }, - "shipment_cost": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/monetary_value" - } - ], - "description": "The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs.\n" - }, - "insurance_cost": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/monetary_value" - } - ], - "description": "The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost.\n" - }, - "requested_comparison_amount": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/monetary_value" - } - ], - "description": "The total shipping cost for the specified comparison_rate_type.\n" - }, - "tracking_number": { - "type": "string", - "minLength": 1, - "readOnly": true, - "example": "782758401696", - "description": "The tracking number for the package. Tracking number formats vary across carriers." - }, "is_return_label": { "type": "boolean", "description": "Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned.\n" @@ -10294,29 +10291,6 @@ "nullable": true, "description": "An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.\n" }, - "is_international": { - "type": "boolean", - "readOnly": true, - "description": "Indicates whether this is an international shipment. That is, the originating country and destination country are different.\n" - }, - "batch_id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/se_id" - } - ], - "description": "If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch.\n" - }, - "carrier_id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/se_id" - } - ], - "description": "The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label\n" - }, "charge_event": { "allOf": [ { @@ -10334,15 +10308,6 @@ "writeOnly": true, "description": "The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is\nrequired by some carriers.\n" }, - "service_code": { - "allOf": [ - { - "$ref": "#/components/schemas/service_code" - } - ], - "readOnly": true, - "description": "The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc.\n" - }, "test_label": { "writeOnly": true, "type": "boolean", @@ -10350,15 +10315,6 @@ "deprecated": true, "description": "Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account." }, - "package_code": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/package_code" - } - ], - "description": "The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type.\n" - }, "validate_address": { "writeOnly": true, "default": "validate_and_clean", @@ -10368,21 +10324,6 @@ } ] }, - "voided": { - "type": "boolean", - "readOnly": true, - "description": "Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/)\n" - }, - "voided_at": { - "nullable": true, - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/date_time" - } - ], - "description": "The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided\n" - }, "label_download_type": { "writeOnly": true, "default": "url", @@ -10419,11 +10360,6 @@ ], "description": "The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format.\n" }, - "trackable": { - "type": "boolean", - "readOnly": true, - "description": "Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`.\n" - }, "label_image_id": { "nullable": true, "allOf": [ @@ -10432,142 +10368,21 @@ } ], "description": "The label image resource that was used to create a custom label image." - }, - "carrier_code": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/carrier_code" - } - ], - "description": "The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" - }, - "tracking_status": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/tracking_status" - } - ], - "description": "The current status of the package, such as `in_transit` or `delivered`" - }, - "label_download": { - "allOf": [ - { - "$ref": "#/components/schemas/label_download" - } - ], - "readOnly": true - }, - "form_download": { - "readOnly": true, - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/link" - } - ], - "description": "The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.\n" - }, - "paperless_download": { - "readOnly": true, - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/paperless_download" - } - ], - "description": "The paperless details which may contain elements like `href`, `instructions` and `handoff_code`.\n" - }, - "insurance_claim": { - "readOnly": true, - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/link" - } - ], - "description": "The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.\n" - }, - "packages": { - "type": "array", - "readOnly": true, - "description": "The label's package(s).\n\n> **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.\n", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/package" - }, - { - "$ref": "#/components/schemas/alternative_identifiers" - } - ] - } - }, - "alternative_identifiers": { - "type": "array", - "readOnly": true, - "nullable": true, - "description": "Additional information some carriers may provide by which to identify a given label in their system. \n", - "items": { - "$ref": "#/components/schemas/alternative_identifier" - } - }, - "tracking_url": { - "readOnly": true, - "nullable": true, - "type": "string", - "example": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", - "description": "The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.\n" } } }, - "shipment": { - "title": "shipment", + "shipment_request": { + "title": "shipment_request", "type": "object", "description": "The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight.\n\n> **Note:** Either `ship_from` or `warehouse_id` must be set.\n", "required": [ - "shipment_id", "carrier_id", "service_code", - "ship_date", - "created_at", - "modified_at", - "shipment_status", "ship_to", - "ship_from", - "warehouse_id", - "return_to", - "confirmation", - "customs", - "advanced_options", - "insurance_provider", - "tags", - "packages", - "total_weight" + "packages" ], "additionalProperties": false, - "allOf": [ - { - "$ref": "#/components/schemas/partial_shipment" - } - ] - }, - "partial_shipment": { - "title": "partial_shipment", - "type": "object", - "description": "The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight.\n", - "additionalProperties": false, "properties": { - "shipment_id": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/se_id" - } - ], - "description": "A string that uniquely identifies the shipment" - }, "carrier_id": { "allOf": [ { @@ -10638,35 +10453,7 @@ "$ref": "#/components/schemas/date" } ], - "description": "The date that the shipment was (or will be) shippped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead.\n" - }, - "created_at": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/date_time" - } - ], - "description": "The date and time that the shipment was created in ShipEngine." - }, - "modified_at": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/date_time" - } - ], - "description": "The date and time that the shipment was created or last modified." - }, - "shipment_status": { - "readOnly": true, - "default": "pending", - "allOf": [ - { - "$ref": "#/components/schemas/shipment_status" - } - ], - "description": "The current status of the shipment" + "description": "The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead.\n" }, "ship_to": { "allOf": [ @@ -10679,7 +10466,7 @@ "ship_from": { "allOf": [ { - "$ref": "#/components/schemas/shipping_address" + "$ref": "#/components/schemas/shipping_address_from" } ], "description": "The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time.\n" @@ -10744,20 +10531,6 @@ ], "description": "The insurance provider to use for any insured packages in the shipment.\n" }, - "tags": { - "type": "array", - "readOnly": true, - "default": [], - "minItems": 0, - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/tag" - } - ] - }, - "description": "Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags.\n" - }, "order_source_code": { "allOf": [ { @@ -10777,15 +10550,6 @@ }, "description": "The packages in the shipment.\n\n> **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned.\n" }, - "total_weight": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/weight" - } - ], - "description": "The combined weight of all packages in the shipment" - }, "comparison_rate_type": { "nullable": true, "type": "string", @@ -10941,9 +10705,10 @@ "pccc", "oss", "passport", - "abn" + "abn", + "ukims" ], - "description": "Tax identifier type for customs declaration\n\n|Pickup Type | Description\n|---------------|-----------------------------------------\n|`vat` | The tax identifier is a Value Added Tax.\n|`eori` | The tax identifier is an Economic Operators Registration and Identification Number (EORI).\n|`ssn` | The tax identifier is a Social Security Number.\n|`ein` | The tax identifier is an Employer Identification Number (EIN).\n|`tin` | The tax identifier is a Tax Identification Number (TIN).\n|`ioss` | The tax identifier is an Import One-Stop Shop (IOSS).\n|`pan` | The tax identifier is a Permanent Account Number (PAN).\n|`voec` | The tax identifier is a Norwegian VAT On E-Commerce(VOEC).\n|`pccc` | The tax identifier is a Personal Customs Clearance Code (PCCC).\n|`oss` | The tax identifier is an One-Stop Shop (OSS).\n|`passport` | The tax identifier is a Passport Number.\n|`abn` | The tax identifier is an Australian Business Number.\n" + "description": "Tax identifier type for customs declaration\n\n|Pickup Type | Description\n|---------------|-----------------------------------------\n|`vat` | The tax identifier is a Value Added Tax.\n|`eori` | The tax identifier is an Economic Operators Registration and Identification Number (EORI).\n|`ssn` | The tax identifier is a Social Security Number.\n|`ein` | The tax identifier is an Employer Identification Number (EIN).\n|`tin` | The tax identifier is a Tax Identification Number (TIN).\n|`ioss` | The tax identifier is an Import One-Stop Shop (IOSS).\n|`pan` | The tax identifier is a Permanent Account Number (PAN).\n|`voec` | The tax identifier is a Norwegian VAT On E-Commerce(VOEC).\n|`pccc` | The tax identifier is a Personal Customs Clearance Code (PCCC).\n|`oss` | The tax identifier is an One-Stop Shop (OSS).\n|`passport` | The tax identifier is a Passport Number.\n|`abn` | The tax identifier is an Australian Business Number.\n|`ukims` | The tax identifier is an UK Internal Market Scheme number.\n" }, "date": { "title": "date", @@ -10953,17 +10718,6 @@ "example": "2018-09-23T00:00:00.000Z", "description": "An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date, but not a specific time. The value _may_ contain a time component, but it will be set to `00:00:00` UTC by ShipEngine.\n" }, - "shipment_status": { - "title": "shipment_status", - "type": "string", - "enum": [ - "pending", - "processing", - "label_purchased", - "cancelled" - ], - "description": "The possible shipment status values" - }, "shipping_address_to": { "title": "shipping_address_to", "type": "object", @@ -11012,10 +10766,14 @@ } } }, - "shipping_address": { - "title": "shipping_address", + "shipping_address_from": { + "title": "shipping_address_from", "type": "object", "additionalProperties": false, + "required": [ + "phone", + "country_code" + ], "allOf": [ { "$ref": "#/components/schemas/address" @@ -11039,6 +10797,19 @@ } } }, + "shipping_address": { + "title": "shipping_address", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "$ref": "#/components/schemas/partial_shipping_address" + } + ] + }, "delivery_confirmation": { "title": "delivery_confirmation", "type": "string", @@ -11332,7 +11103,6 @@ }, "value": { "type": "number", - "format": "double", "minimum": 0, "description": "The monetary amount, in the specified currency." }, @@ -11393,7 +11163,6 @@ "properties": { "value": { "type": "number", - "format": "double", "minimum": 0, "exclusiveMinimum": true, "description": "The weight, in the specified unit" @@ -11422,7 +11191,7 @@ "title": "advanced_shipment_options", "type": "object", "description": "Advanced shipment options", - "additionalProperties": false, + "additionalProperties": true, "properties": { "bill_to_account": { "type": "string", @@ -11582,6 +11351,47 @@ "description": "Phone number of the contact" } } + }, + "windsor_framework_details": { + "type": "object", + "description": "The Windsor framework is a new regulation in the UK that simplifies customs procedures for goods moved from the UK mainland to Northern Ireland.", + "properties": { + "movement_indicator": { + "type": "string", + "description": "An indicator that will tell the carrier and HMRC the type of movement for the shipment.", + "enum": [ + "c2c", + "b2c", + "c2b", + "b2b" + ] + }, + "not_at_risk": { + "type": "boolean", + "description": "An indicator that allows a shipper to declare the shipment as not-at-risk." + } + } + }, + "license_number": { + "type": "string", + "nullable": true, + "default": null, + "example": 514785, + "description": "license number." + }, + "invoice_number": { + "type": "string", + "nullable": true, + "default": null, + "example": "IOC56888", + "description": "invoice number." + }, + "certificate_number": { + "type": "string", + "nullable": true, + "default": null, + "example": 784515, + "description": "certificate number." } } }, @@ -11644,7 +11454,6 @@ }, "amount": { "minimum": 0, - "format": "double", "type": "number" } } @@ -11660,32 +11469,24 @@ ], "description": "The possible insurance provider values" }, - "tag": { - "title": "tag", - "type": "object", - "description": "Tags are arbitrary strings that you can use to categorize shipments. For example, you may want to use tags to distinguish between domestic and international shipments, or between insured and uninsured shipments. Or maybe you want to create a tag for each of your customers so you can easily retrieve every shipment for a customer.\n", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "minLength": 1, - "example": "Fragile", - "description": "The tag name." - } - } - }, "package": { "title": "package", "type": "object", - "description": "A package associated with a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/)\n", + "description": "A package associated with a shipment\n", "required": [ "weight" ], "additionalProperties": false, "properties": { + "shipment_package_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "readOnly": true, + "description": "A string that uniquely identifies this shipment package" + }, "package_id": { "allOf": [ { @@ -11702,13 +11503,9 @@ ], "description": "The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type.\n" }, - "content_description": { + "package_name": { "type": "string", - "minLength": 1, - "maxLength": 35, - "description": "A short description of the package content. Required for shipments moving to, from, and through Mexico.\n", - "example": "Hand knitted wool socks", - "nullable": true + "description": "The name of the of the [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/)" }, "weight": { "allOf": [ @@ -11732,23 +11529,12 @@ "$ref": "#/components/schemas/monetary_value" } ], - "default": [ - { - "currency": "usd", - "amount": 0 - } - ], + "default": { + "currency": "USD", + "amount": 0 + }, "description": "The insured value of the package. Requires the `insurance_provider` field of the shipment to be set.\n" }, - "tracking_number": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/tracking_number" - } - ], - "description": "The tracking number for the package. The format depends on the carrier.\n" - }, "label_messages": { "allOf": [ { @@ -11761,38 +11547,22 @@ "minLength": 1, "description": "An external package id." }, - "label_download": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/label_download" - } - ], - "description": "The label download for the package" - }, - "form_download": { - "readOnly": true, - "allOf": [ - { - "$ref": "#/components/schemas/optional_link" - } - ], - "description": "The form download for any customs that are needed" - }, - "paperless_download": { + "tracking_number": { "readOnly": true, "allOf": [ { - "$ref": "#/components/schemas/paperless_download" + "$ref": "#/components/schemas/tracking_number" } ], - "description": "The paperless details which may contain elements like `href`, `instructions` and `handoff_code`." + "description": "The tracking number for the package. The format depends on the carrier.\n" }, - "sequence": { - "readOnly": true, - "format": "int32", - "type": "integer", - "description": "Package sequence" + "content_description": { + "type": "string", + "minLength": 1, + "maxLength": 35, + "description": "A short description of the package content. Required for shipments moving to, from, and through Mexico.\n", + "example": "Hand knitted wool socks", + "nullable": true }, "products": { "type": "array", @@ -11805,13 +11575,6 @@ } } }, - "tracking_number": { - "title": "tracking_number", - "type": "string", - "minLength": 1, - "example": "1Z932R800392060079", - "description": "A tracking number for a package. The format depends on the carrier." - }, "label_messages": { "title": "label_messages", "type": "object", @@ -11843,6 +11606,13 @@ } } }, + "tracking_number": { + "title": "tracking_number", + "type": "string", + "minLength": 1, + "example": "1Z932R800392060079", + "description": "A tracking number for a package. The format depends on the carrier." + }, "products": { "title": "products", "type": "object", @@ -11922,7 +11692,6 @@ }, "vat_rate": { "type": "number", - "format": "double", "description": "VAT rate applicable to the item", "nullable": true, "example": 0.2 @@ -11935,6 +11704,11 @@ "items": { "$ref": "#/components/schemas/dangerous_goods" } + }, + "extended_details": { + "type": "object", + "description": "Additional details about products", + "additionalProperties": true } } }, @@ -12068,7 +11842,6 @@ "properties": { "amount": { "type": "number", - "format": "double", "minimum": 0, "default": 0, "description": "The amount of dangerous goods." @@ -12131,14 +11904,804 @@ ], "description": "The possible validate address values" }, - "label_download_type": { - "title": "label_download_type", + "label_download_type": { + "title": "label_download_type", + "type": "string", + "enum": [ + "url", + "inline" + ], + "description": "There are two different ways to [download a label](https://www.shipengine.com/docs/labels/downloading/):\n\n|Label Download Type | Description\n|--------------------|------------------------------\n|`url` |You will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.

This is the default if `label_download_type` is unspecified.\n|`inline` |You will receive the Base64-encoded label as part of the response. No need for a second request to download the label.\n" + }, + "create_label_response_body": { + "title": "create_label_response_body", + "type": "object", + "description": "A create label response body", + "additionalProperties": false, + "required": [ + "label_id", + "status", + "shipment_id", + "ship_date", + "created_at", + "shipment_cost", + "insurance_cost", + "tracking_number", + "is_international", + "batch_id", + "carrier_id", + "service_code", + "voided", + "label_image_id", + "label_format", + "label_layout", + "trackable", + "carrier_code", + "tracking_status", + "label_download", + "form_download", + "paperless_download", + "insurance_claim", + "packages", + "is_return_label", + "rma_number", + "charge_event", + "package_code", + "display_scheme" + ], + "allOf": [ + { + "$ref": "#/components/schemas/label" + } + ] + }, + "label": { + "title": "label", + "type": "object", + "description": "A label represents the physical sticker that you affix to a package to ship it. ShipEngine makes it easy for you to [create labels](https://www.shipengine.com/docs/labels/create-a-label/) and then download them in PDF, PNG, or ZPL format so you can print them.\n", + "additionalProperties": false, + "properties": { + "label_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the label. This ID is generated by ShipEngine when the label is created.\n" + }, + "status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/label_status" + } + ] + }, + "shipment_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The shipment that this label is for. ShipEngine can create a shipment for you automatically when you [create a label](https://www.shipengine.com/docs/labels/create-a-label/), or you can [create your own shipment](https://www.shipengine.com/docs/shipping/create-a-shipment/) and then [use it to print a label](https://www.shipengine.com/docs/labels/create-from-shipment/)\n" + }, + "shipment": { + "writeOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/shipment" + } + ], + "description": "The shipment information used to generate the label" + }, + "ship_date": { + "allOf": [ + { + "$ref": "#/components/schemas/date" + } + ], + "readOnly": true, + "description": "The date that the package was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead.\n" + }, + "created_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the label was created in ShipEngine." + }, + "shipment_cost": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The cost of shipping, delivery confirmation, and other carrier charges. This amount **does not** include insurance costs.\n" + }, + "insurance_cost": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The insurance cost for this package. Add this to the `shipment_cost` field to get the total cost.\n" + }, + "requested_comparison_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The total shipping cost for the specified comparison_rate_type.\n" + }, + "rate_details": { + "readOnly": true, + "description": "A list of rate details that are associated with shipping cost. This is useful for\ndisplaying a breakdown of the rate to the user.\n", + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_detail" + } + ] + } + }, + "tracking_number": { + "type": "string", + "minLength": 1, + "readOnly": true, + "example": "782758401696", + "description": "The tracking number for the package. Tracking number formats vary across carriers." + }, + "is_return_label": { + "type": "boolean", + "description": "Indicates whether this is a return label. You may also want to set the `rma_number` so you know what is being returned.\n" + }, + "rma_number": { + "type": "string", + "nullable": true, + "description": "An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.\n" + }, + "is_international": { + "type": "boolean", + "readOnly": true, + "description": "Indicates whether this is an international shipment. That is, the originating country and destination country are different.\n" + }, + "batch_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "If this label was created as part of a [batch](https://www.shipengine.com/docs/labels/bulk/), then this is the unique ID of that batch.\n" + }, + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label\n" + }, + "charge_event": { + "allOf": [ + { + "$ref": "#/components/schemas/label_charge_event" + } + ], + "description": "The label charge event.\n" + }, + "outbound_label_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "writeOnly": true, + "description": "The `label_id` of the original (outgoing) label that the return label is for. This associates the two labels together, which is\nrequired by some carriers.\n" + }, + "service_code": { + "allOf": [ + { + "$ref": "#/components/schemas/service_code" + } + ], + "readOnly": true, + "description": "The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc.\n" + }, + "test_label": { + "writeOnly": true, + "type": "boolean", + "default": false, + "deprecated": true, + "description": "Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account." + }, + "package_code": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/package_code" + } + ], + "description": "The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type.\n" + }, + "validate_address": { + "writeOnly": true, + "default": "validate_and_clean", + "allOf": [ + { + "$ref": "#/components/schemas/validate_address" + } + ] + }, + "voided": { + "type": "boolean", + "readOnly": true, + "description": "Indicates whether the label has been [voided](https://www.shipengine.com/docs/labels/voiding/)\n" + }, + "voided_at": { + "nullable": true, + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the label was [voided](https://www.shipengine.com/docs/labels/voiding/), or `null` if the label has not been voided\n" + }, + "label_download_type": { + "writeOnly": true, + "default": "url", + "allOf": [ + { + "$ref": "#/components/schemas/label_download_type" + } + ] + }, + "label_format": { + "default": "pdf", + "allOf": [ + { + "$ref": "#/components/schemas/label_format" + } + ], + "description": "The file format that you want the label to be in. We recommend `pdf` format because it is supported by all carriers, whereas some carriers do not support the `png` or `zpl` formats.\n" + }, + "display_scheme": { + "default": "label", + "allOf": [ + { + "$ref": "#/components/schemas/display_scheme" + } + ], + "description": "The display format that the label should be shown in." + }, + "label_layout": { + "default": "4x6", + "allOf": [ + { + "$ref": "#/components/schemas/label_layout" + } + ], + "description": "The layout (size) that you want the label to be in. The `label_format` determines which sizes are allowed. `4x6` is supported for all label formats, whereas `letter` (8.5\" x 11\") is only supported for `pdf` format.\n" + }, + "trackable": { + "type": "boolean", + "readOnly": true, + "description": "Indicates whether the shipment is trackable, in which case the `tracking_status` field will reflect the current status and each package will have a `tracking_number`.\n" + }, + "label_image_id": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/image_id" + } + ], + "description": "The label image resource that was used to create a custom label image." + }, + "carrier_code": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/carrier_code" + } + ], + "description": "The [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) who will ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" + }, + "tracking_status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/tracking_status" + } + ], + "description": "The current status of the package, such as `in_transit` or `delivered`" + }, + "label_download": { + "allOf": [ + { + "$ref": "#/components/schemas/label_download" + } + ], + "readOnly": true + }, + "form_download": { + "readOnly": true, + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/link" + } + ], + "description": "The link to download the customs form (a.k.a. commercial invoice) for this shipment, if any. Forms are in PDF format. This field is null if the shipment does not require a customs form, or if the carrier does not support it.\n" + }, + "paperless_download": { + "readOnly": true, + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/paperless_download" + } + ], + "description": "The paperless details which may contain elements like `href`, `instructions` and `handoff_code`.\n" + }, + "insurance_claim": { + "readOnly": true, + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/link" + } + ], + "description": "The link to submit an insurance claim for the shipment. This field is null if the shipment is not insured or if the insurance provider does not support online claim submission.\n" + }, + "packages": { + "type": "array", + "readOnly": true, + "description": "The label's package(s).\n\n> **Note:** Some carriers only allow one package per label. If you attempt to create a multi-package label for a carrier that doesn't allow it, an error will be returned.\n", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/label_package" + }, + { + "$ref": "#/components/schemas/alternative_identifiers" + } + ] + } + }, + "alternative_identifiers": { + "type": "array", + "readOnly": true, + "nullable": true, + "description": "Additional information some carriers may provide by which to identify a given label in their system. \n", + "items": { + "$ref": "#/components/schemas/alternative_identifier" + } + }, + "tracking_url": { + "readOnly": true, + "nullable": true, + "type": "string", + "example": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", + "description": "The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.\n" + } + } + }, + "shipment": { + "title": "shipment", + "type": "object", + "description": "The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight.\n\n> **Note:** Either `ship_from` or `warehouse_id` must be set.\n", + "required": [ + "shipment_id", + "carrier_id", + "service_code", + "ship_date", + "created_at", + "modified_at", + "shipment_status", + "ship_to", + "ship_from", + "warehouse_id", + "return_to", + "confirmation", + "customs", + "advanced_options", + "insurance_provider", + "tags", + "packages", + "total_weight" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/partial_shipment" + } + ] + }, + "partial_shipment": { + "title": "partial_shipment", + "type": "object", + "description": "The information necessary to ship a package, such as the origin, the destination, the carrier service, and the package dimensions and weight.\n", + "additionalProperties": false, + "properties": { + "shipment_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the shipment" + }, + "carrier_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The carrier account that is billed for the shipping charges" + }, + "service_code": { + "allOf": [ + { + "$ref": "#/components/schemas/service_code" + } + ], + "description": "The [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/) used to ship the package, such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc.\n" + }, + "shipping_rule_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "ID of the shipping rule, which you want to use to automate carrier/carrier service selection for the shipment\n" + }, + "external_order_id": { + "type": "string", + "nullable": true, + "description": "ID that the Order Source assigned" + }, + "items": { + "type": "array", + "default": [], + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/shipment_item" + } + ] + }, + "description": "Describe the packages included in this shipment as related to potential metadata that was imported from\nexternal order sources\n" + }, + "tax_identifiers": { + "type": "array", + "nullable": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/tax_identifier" + } + ] + } + }, + "external_shipment_id": { + "type": "string", + "maxLength": 50, + "nullable": true, + "description": "A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.\n\n> **Warning:** The `external_shipment_id` is limited to 50 characters. Any additional characters will be truncated.\n" + }, + "shipment_number": { + "type": "string", + "maxLength": 50, + "nullable": true, + "description": "A non-unique user-defined number used to identify a shipment. If undefined, this will match the external_shipment_id of the shipment.\n\n> **Warning:** The `shipment_number` is limited to 50 characters. Any additional characters will be truncated.\n" + }, + "ship_date": { + "allOf": [ + { + "$ref": "#/components/schemas/date" + } + ], + "description": "The date that the shipment was (or will be) shipped. ShipEngine will take the day of week into consideration. For example, if the carrier does not operate on Sundays, then a package that would have shipped on Sunday will ship on Monday instead.\n" + }, + "created_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the shipment was created in ShipEngine." + }, + "modified_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the shipment was created or last modified." + }, + "shipment_status": { + "readOnly": true, + "default": "pending", + "allOf": [ + { + "$ref": "#/components/schemas/shipment_status" + } + ], + "description": "The current status of the shipment" + }, + "ship_to": { + "allOf": [ + { + "$ref": "#/components/schemas/shipping_address_to" + } + ], + "description": "The recipient's mailing address" + }, + "ship_from": { + "allOf": [ + { + "$ref": "#/components/schemas/shipping_address" + } + ], + "description": "The shipment's origin address. If you frequently ship from the same location, consider [creating a warehouse](https://www.shipengine.com/docs/reference/create-warehouse/). Then you can simply specify the `warehouse_id` rather than the complete address each time.\n" + }, + "warehouse_id": { + "nullable": true, + "default": null, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/) that the shipment is being shipped from. Either `warehouse_id` or `ship_from` must be specified.\n" + }, + "return_to": { + "allOf": [ + { + "$ref": "#/components/schemas/shipping_address" + } + ], + "description": "The return address for this shipment. Defaults to the `ship_from` address.\n" + }, + "is_return": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "An optional indicator if the shipment is intended to be a return. Defaults to false if not provided.\n" + }, + "confirmation": { + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/delivery_confirmation" + } + ], + "description": "The type of delivery confirmation that is required for this shipment." + }, + "customs": { + "nullable": true, + "default": null, + "allOf": [ + { + "$ref": "#/components/schemas/international_shipment_options" + } + ], + "description": "Customs information. This is usually only needed for international shipments.\n" + }, + "advanced_options": { + "allOf": [ + { + "$ref": "#/components/schemas/advanced_shipment_options" + } + ], + "description": "Advanced shipment options. These are entirely optional." + }, + "insurance_provider": { + "default": "none", + "allOf": [ + { + "$ref": "#/components/schemas/insurance_provider" + } + ], + "description": "The insurance provider to use for any insured packages in the shipment.\n" + }, + "tags": { + "type": "array", + "readOnly": true, + "default": [], + "minItems": 0, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/tag" + } + ] + }, + "description": "Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags.\n" + }, + "order_source_code": { + "allOf": [ + { + "$ref": "#/components/schemas/order_source_name" + } + ] + }, + "packages": { + "type": "array", + "minItems": 1, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/package" + } + ] + }, + "description": "The packages in the shipment.\n\n> **Note:** Some carriers only allow one package per shipment. If you attempt to create a multi-package shipment for a carrier that doesn't allow it, an error will be returned.\n" + }, + "total_weight": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/weight" + } + ], + "description": "The combined weight of all packages in the shipment" + }, + "comparison_rate_type": { + "nullable": true, + "type": "string", + "description": "Calculate a rate for this shipment with the requested carrier using a ratecard that differs from the default. Only supported for UPS and USPS.", + "example": "retail" + } + } + }, + "shipment_status": { + "title": "shipment_status", + "type": "string", + "enum": [ + "pending", + "processing", + "label_purchased", + "cancelled" + ], + "description": "The possible shipment status values" + }, + "tag": { + "title": "tag", + "type": "object", + "description": "Tags are arbitrary strings that you can use to categorize shipments. For example, you may want to use tags to distinguish between domestic and international shipments, or between insured and uninsured shipments. Or maybe you want to create a tag for each of your customers so you can easily retrieve every shipment for a customer.\n", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "minLength": 1, + "example": "Fragile", + "description": "The tag name." + } + } + }, + "rate_detail": { + "title": "rate_detail", + "type": "object", + "description": "Represents detailed information about a shipping cost\n", + "additionalProperties": false, + "properties": { + "rate_detail_type": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_detail_type" + } + ] + }, + "carrier_description": { + "type": "string", + "description": "A rate detail description defined by a carrier" + }, + "carrier_billing_code": { + "type": "string", + "description": "A rate detail code defined by a carrier" + }, + "carrier_memo": { + "type": "string", + "description": "Contains any additional information" + }, + "amount": { + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ] + }, + "rate_detail_attributes": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_detail_attributes" + } + ], + "description": "If applicable, contains additional data about a rate detail of a specific type, e.g. VAT" + }, + "billing_source": { + "type": "string", + "description": "The source of the billing information. This is typically the carrier, but could be a third party, e.g insurance" + } + } + }, + "rate_detail_type": { + "title": "rate_detail_type", + "type": "string", + "enum": [ + "uncategorized", + "shipping", + "insurance", + "confirmation", + "discount", + "fuel_charge", + "additional_fees", + "tariff", + "tax", + "delivery", + "handling", + "special_goods", + "pickup", + "location_fee", + "oversize", + "returns", + "notifications", + "tip", + "duties_and_taxes", + "brokerage_fee", + "admin_fee", + "adjustment" + ], + "description": "The possible rate detail type values" + }, + "rate_detail_attributes": { + "title": "rate_detail_attributes", + "type": "object", + "description": "Represents detailed information about a tax (e.g. VAT) contained in a shipping cost.\n", + "additionalProperties": false, + "properties": { + "tax_type": { + "allOf": [ + { + "$ref": "#/components/schemas/tax_type" + } + ] + }, + "tax_code": { + "type": "string", + "description": "Code for a specific tax type" + }, + "tax_percentage": { + "type": "number", + "description": "Tax percentage, e.g. 20 for 20%, added to the shipping cost" + } + } + }, + "tax_type": { + "title": "tax_type", "type": "string", "enum": [ - "url", - "inline" + "vat" ], - "description": "There are two different ways to [download a label](https://www.shipengine.com/docs/labels/downloading/):\n\n|Label Download Type | Description\n|--------------------|------------------------------\n|`url` |You will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.

This is the default if `label_download_type` is unspecified.\n|`inline` |You will receive the Base64-encoded label as part of the response. No need for a second request to download the label.\n" + "description": "Type of a tax added to shipping cost" }, "tracking_status": { "title": "tracking_status", @@ -12151,6 +12714,146 @@ ], "description": "The different statuses that can apply to a shipment." }, + "label_package": { + "title": "label_package", + "type": "object", + "description": "A package returned in the response from creating a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/)\n", + "required": [ + "weight" + ], + "additionalProperties": false, + "properties": { + "package_id": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "The shipment package id" + }, + "package_code": { + "allOf": [ + { + "$ref": "#/components/schemas/package_code" + } + ], + "description": "The [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/), such as `thick_envelope`, `small_flat_rate_box`, `large_package`, etc. The code `package` indicates a custom or unknown package type.\n" + }, + "weight": { + "allOf": [ + { + "$ref": "#/components/schemas/weight" + } + ], + "description": "The package weight" + }, + "dimensions": { + "allOf": [ + { + "$ref": "#/components/schemas/dimensions" + } + ], + "description": "The package dimensions" + }, + "insured_value": { + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "default": { + "currency": "USD", + "amount": 0 + }, + "description": "The insured value of the package. Requires the `insurance_provider` field of the shipment to be set.\n" + }, + "tracking_number": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/tracking_number" + } + ], + "description": "The tracking number for the package. The format depends on the carrier.\n" + }, + "label_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/label_download" + } + ], + "description": "The label download for the package" + }, + "form_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "The form download for any customs that are needed" + }, + "qr_code_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "The QR code download for the package" + }, + "paperless_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/paperless_download" + } + ], + "description": "The paperless details which may contain elements like `href`, `instructions` and `handoff_code`." + }, + "label_messages": { + "allOf": [ + { + "$ref": "#/components/schemas/label_messages" + } + ] + }, + "external_package_id": { + "type": "string", + "minLength": 1, + "description": "An external package id." + }, + "content_description": { + "type": "string", + "minLength": 1, + "maxLength": 35, + "description": "A short description of the package content. Required for shipments moving to, from, and through Mexico.\n", + "example": "Hand knitted wool socks", + "nullable": true + }, + "sequence": { + "readOnly": true, + "format": "int32", + "type": "integer", + "description": "Package sequence" + }, + "has_label_documents": { + "type": "boolean", + "description": "Whether the package has label documents available for download" + }, + "has_form_documents": { + "type": "boolean", + "description": "Whether the package has form documents available for download" + }, + "has_qr_code_documents": { + "type": "boolean", + "description": "Whether the package has QR code documents available for download" + }, + "has_paperless_label_documents": { + "type": "boolean", + "description": "Whether the package has paperless documents available for download" + } + } + }, "alternative_identifiers": { "title": "alternative_identifiers", "type": "object", @@ -12187,49 +12890,6 @@ } } }, - "create_label_response_body": { - "title": "create_label_response_body", - "type": "object", - "description": "A create label response body", - "additionalProperties": false, - "required": [ - "label_id", - "status", - "shipment_id", - "ship_date", - "created_at", - "shipment_cost", - "insurance_cost", - "tracking_number", - "is_international", - "batch_id", - "carrier_id", - "service_code", - "voided", - "voided_at", - "label_image_id", - "label_format", - "label_layout", - "trackable", - "carrier_code", - "tracking_status", - "label_download", - "form_download", - "paperless_download", - "insurance_claim", - "packages", - "is_return_label", - "rma_number", - "charge_event", - "package_code", - "display_scheme" - ], - "allOf": [ - { - "$ref": "#/components/schemas/label" - } - ] - }, "get_label_by_external_shipment_id_response_body": { "title": "get_label_by_external_shipment_id_response_body", "type": "object", @@ -12250,7 +12910,21 @@ { "$ref": "#/components/schemas/purchase_label_without_shipment" } - ] + ], + "properties": { + "custom_field1": { + "type": "string", + "description": "Optional - Value will be saved in the shipment's advanced_options > custom_field1" + }, + "custom_field2": { + "type": "string", + "description": "Optional - Value will be saved in the shipment's advanced_options > custom_field2" + }, + "custom_field3": { + "type": "string", + "description": "Optional - Value will be saved in the shipment's advanced_options > custom_field3" + } + } }, "purchase_label_without_shipment": { "title": "purchase_label_without_shipment", @@ -12459,7 +13133,6 @@ "tracking_number", "status_code", "carrier_status_code", - "estimated_delivery_date", "events" ], "additionalProperties": false, @@ -12493,22 +13166,30 @@ { "$ref": "#/components/schemas/status_code" } - ] + ], + "example": "DE" }, - "carrier_code": { + "status_detail_code": { "allOf": [ { - "$ref": "#/components/schemas/carrier_code" + "$ref": "#/components/schemas/status_detail_code" } - ] + ], + "example": "DELIVERED" }, - "carrier_id": { + "carrier_code": { "allOf": [ { - "$ref": "#/components/schemas/se_id" + "$ref": "#/components/schemas/carrier_code" } ] }, + "carrier_id": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "The unique ID of the [carrier account](https://www.shipengine.com/docs/carriers/setup/) that was used to create this label\n" + }, "status_description": { "type": "string", "readOnly": true, @@ -12516,6 +13197,13 @@ "minLength": 0, "description": "Status description" }, + "status_detail_description": { + "type": "string", + "readOnly": true, + "example": "Your parcel has been successfully delivered.", + "minLength": 0, + "description": "Status detail description" + }, "carrier_status_code": { "type": "string", "readOnly": true, @@ -12578,16 +13266,97 @@ "readOnly": true, "title": "status_code", "enum": [ - "un", - "ac", - "it", - "de", - "ex", - "at", - "ny" + "UN", + "AC", + "IT", + "DE", + "EX", + "AT", + "NY", + "SP" + ], + "type": "string", + "description": "The tracking status codes\n\n|Value |Description\n|:--------- |:-----------------------------------------------------\n|`UN` | Unknown\n|`AC` | Accepted\n|`IT` | In Transit\n|`DE` | Delivered\n|`EX` | Exception\n|`AT` | Delivery Attempt\n|`NY` | Not Yet In System\n|`SP` | Delivered To Collection Location\n" + }, + "status_detail_code": { + "readOnly": true, + "title": "status_detail_code", + "enum": [ + "CARRIER_STATUS_NOT_MAPPED", + "SHIPMENT_CREATED", + "AWAITING_PICKUP_DROP_OFF", + "DROPPED_OFF", + "ELEC_ADVICE_RECD_BY_CARRIER", + "PICKED_UP", + "CUSTOMS_CLEARED", + "CUSTOMS_PROCESSING", + "DELIVERY_ARRANGED_WITH_RECIPIENT", + "HUB_SCAN_OUT", + "HUB_SCAN_IN", + "IN_TRANSIT", + "INFORMATION", + "PARCEL_OVER_LABELLED", + "PARCEL_UPDATE_NOTIFICATION", + "RECEIVED_BY_CARRIER", + "RECEIVED_LOCAL_DELIVERY_DEPOT", + "SUB_CONTRACTOR_EVENT", + "SUB_CONTRACTOR_RECEIVED", + "PARCEL_REDIRECTED", + "DELIVERY_SCHEDULED", + "HUB_PROCESSING", + "DELIVERY_RESCHEDULED", + "ATTEMPTED_DELIVERY", + "ATTEMPTED_DELIVERY_FINAL", + "COD_AMOUNT_PAID", + "CUSTOMER_CARDED", + "OUT_FOR_DELIVERY", + "AWAITING_COLLECTION_FROM_PICKUP_POINT", + "COLLECT_AT_LOCAL_PO", + "CUSTOMER_TO_COLLECT_FROM_CARRIER", + "DELIVERED_TO_RECEPTION", + "DELIVERED", + "DELIVERED_DAMAGED", + "DELIVERED_IN_PART", + "DELIVERED_SPECIFIED_SAFE_PLACE", + "DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION", + "DELIVERED_TO_NEIGHBOUR", + "DELIVERED_TO_PO_BOX", + "PARCEL_COLLECTED_FROM_PICKUP_POINT", + "POST_TRANSIT_STATUS", + "PROOF_OF_DELIVERY", + "PICKUP_FAILED", + "NOT_YET_RECEIVED_BY_CARRIER", + "PARCEL_DAMAGED", + "ADDRESS_QUERY", + "CARRIER_DELAYS", + "DELAYED_NOT_CARRIER", + "HELD_BY_CARRIER", + "HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING", + "HELD_BY_CUSTOMS", + "HELD_BY_EXPORT_CUSTOMS", + "HELD_BY_IMPORT_CUSTOMS", + "INCORRECT_DECLARATION", + "MISROUTED", + "PARCEL_REPACKED", + "RECD_BY_CARRIER_NO_ELEC_ADVICE", + "COD_AMOUNT_NOT_PAID", + "CUSTOMER_IDENTIFICATION_FAILED", + "NO_ACCESS_TO_RECIPIENTS_ADDRESS", + "CANCELLED", + "CUSTOMER_MOVED", + "HAZARDOUS_PROHIBITED", + "NOT_COLLECTED_FROM_PICKUP_POINT", + "NOT_DELIVERED", + "NOT_DELIVERED_ADDRESSEE_DECEASED", + "PARCEL_DISPOSED", + "PARCEL_LOST", + "PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY", + "REFUSED_BY_CUSTOMER", + "RETURN_TO_SENDER", + "UNSPECIFIED_EXCEPTION" ], "type": "string", - "description": "The tracking status codes\n\n|Value |Description\n|:--------- |:-----------------------------------------------------\n|`un` | Unknown\n|`ac` | Accepted\n|`it` | In Transit\n|`de` | Delivered\n|`ex` | Exception\n|`at` | Delivery Attempt\n|`ny` | Not Yet In System\n" + "description": "The tracking status detail codes\n\n|Value |Description\n|:--------- |:-----------------------------------------------------\n| `CARRIER_STATUS_NOT_MAPPED` | Status not mapped. Please check the carrier's website for updates.\n| `SHIPMENT_CREATED` | Your tracking number is ready. Your parcel is waiting to be registered in the carrier system and scheduled for pickup.\n| `AWAITING_PICKUP_DROP_OFF` | Your parcel is waiting to be handed over to the carrier.\n| `DROPPED_OFF` | Your parcel has been dropped off and is ready for carrier processing.\n| `ELEC_ADVICE_RECD_BY_CARRIER` | Your shipment is now in the carrier's system.\n| `PICKED_UP` | Your parcel has been picked up by the carrier.\n| `CUSTOMS_CLEARED` | Your parcel has cleared customs and is continuing its journey.\n| `CUSTOMS_PROCESSING` | Your parcel is currently being processed by customs.\n| `DELIVERY_ARRANGED_WITH_RECIPIENT` | Your parcel's delivery has been arranged with the carrier.\n| `HUB_SCAN_OUT` | Your parcel has left the carrier's hub.\n| `HUB_SCAN_IN` | Your parcel has arrived at the carrier's hub for processing.\n| `IN_TRANSIT` | Your shipment is on its way between the carrier hubs.\n| `INFORMATION` | The carrier has shared additional information about your parcel.\n| `PARCEL_OVER_LABELLED` | Your parcel's label has been updated by the carrier, which may affect tracking visibility.\n| `PARCEL_UPDATE_NOTIFICATION` | The carrier has sent you an update on your parcel status via SMS or email.\n| `RECEIVED_BY_CARRIER` | Your parcel has been received by the carrier and is beginning its journey.\n| `RECEIVED_LOCAL_DELIVERY_DEPOT` | Your parcel has arrived at the local delivery depot and is almost ready for delivery.\n| `SUB_CONTRACTOR_EVENT` | The carrier has shared additional information about your parcel's handling by a delivery partner.\n| `SUB_CONTRACTOR_RECEIVED` | Your parcel has been received by the carrier's local delivery partner.\n| `PARCEL_REDIRECTED` | Your parcel has been redirected to a new delivery address per your request.\n| `DELIVERY_SCHEDULED` | Your parcel's delivery has been scheduled and will soon be out for delivery.\n| `HUB_PROCESSING` | Your parcel is being processed at a carrier hub.\n| `DELIVERY_RESCHEDULED` | Your parcel's delivery has been rescheduled due to operational issues.\n| `ATTEMPTED_DELIVERY` | The carrier attempted to deliver your parcel but was unable to complete delivery.\n| `ATTEMPTED_DELIVERY_FINAL` | The carrier made a final attempt to deliver your parcel but was unable to complete delivery. Please check the carrier's instructions for next steps.\n| `COD_AMOUNT_PAID` | Cash on delivery payment received.\n| `CUSTOMER_CARDED` | Delivery attempt failed. Please follow delivery instructions left by the carrier.\n| `OUT_FOR_DELIVERY` | Your parcel is on its way and will be delivered today.\n| `AWAITING_COLLECTION_FROM_PICKUP_POINT` | Your parcel is ready for collection at the selected pickup point.\n| `COLLECT_AT_LOCAL_PO` | Your parcel is ready for collection at your local post office.\n| `CUSTOMER_TO_COLLECT_FROM_CARRIER` | Your parcel is available for collection from the carrier's local delivery unit.\n| `DELIVERED_TO_RECEPTION` | Your parcel has been delivered to your building's reception or designated mail area.\n| `DELIVERED` | Your parcel has been successfully delivered.\n| `DELIVERED_DAMAGED` | Your parcel was delivered but arrived with visible damage.\n| `DELIVERED_IN_PART` | Part of your shipment has been delivered. Check for updates on the rest.\n| `DELIVERED_SPECIFIED_SAFE_PLACE` | Your parcel has been delivered to your specified safe place.\n| `DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION` | Your parcel was delivered to an alternative location due to the delivery company being unable to deliver it to the specified address. Check carrier instructions for pickup details.\n| `DELIVERED_TO_NEIGHBOUR` | Your parcel was delivered to your neighbor.\n| `DELIVERED_TO_PO_BOX` | Your parcel has been delivered to your specified PO Box.\n| `PARCEL_COLLECTED_FROM_PICKUP_POINT` | Your package has been picked up from the pick up point.\n| `POST_TRANSIT_STATUS` | The carrier has added more information about your delivery.\n| `PROOF_OF_DELIVERY` | The carrier has confirmed delivery with proof, such as a signature or photo.\n| `PICKUP_FAILED` | Parcel pickup failed. The delivery company will try again soon.\n| `NOT_YET_RECEIVED_BY_CARRIER` | The carrier has not yet received your parcel, which may cause a delay.\n| `PARCEL_DAMAGED` | Your parcel was damaged in transit but will still be delivered.\n| `ADDRESS_QUERY` | There is an issue with the delivery address, which may delay your parcel.\n| `CARRIER_DELAYS` | Your parcel is delayed due to issues within the carrier network.\n| `DELAYED_NOT_CARRIER` | Your parcel is delayed due to circumstances beyond the carrier's control.\n| `HELD_BY_CARRIER` | Your parcel is being held due to an operational issue. Contact with the carrier for more information.\n| `HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING` | Your parcel is being held by the carrier for customs documentation checks. This may occur when the carrier must confirm documentation before the parcel can continue its journey.\n| `HELD_BY_CUSTOMS` | Your parcel is being held at customs, which may delay delivery.\n| `HELD_BY_EXPORT_CUSTOMS` | Your parcel is held at export customs, which may delay delivery.\n| `HELD_BY_IMPORT_CUSTOMS` | Your parcel is held at import customs and may require action to proceed.\n| `INCORRECT_DECLARATION` | Your parcel has been incorrectly declared but is still moving forward for delivery.\n| `MISROUTED` | Your parcel was sent to the wrong place due to a routing error but is being redirected.\n| `PARCEL_REPACKED` | Your parcel was repackaged by the carrier due to damage and will still be delivered.\n| `RECD_BY_CARRIER_NO_ELEC_ADVICE` | Your parcel has been received by the carrier but may experience delays due to missing pre-advice.\n| `COD_AMOUNT_NOT_PAID` | Delivery failed due to unpaid cash on delivery. Please follow carrier instructions.\n| `CUSTOMER_IDENTIFICATION_FAILED` | Delivery couldn't be completed as identification requirements were not met.\n| `NO_ACCESS_TO_RECIPIENTS_ADDRESS` | The carrier couldn't access the delivery location due to restricted entry.\n| `CANCELLED` | Your parcel has been cancelled.\n| `CUSTOMER_MOVED` | Delivery failed as the recipient is no longer at the specified address. Your parcel is being returned.\n| `HAZARDOUS_PROHIBITED` | Your parcel contains restricted items and will not be delivered.\n| `NOT_COLLECTED_FROM_PICKUP_POINT` | Your parcel was not collected from the pickup point within the designated time and will be returned.\n| `NOT_DELIVERED` | All delivery attempts failed. Your parcel is being returned to the sender.\n| `NOT_DELIVERED_ADDRESSEE_DECEASED` | The parcel could not be delivered as the addressee is reported deceased.\n| `PARCEL_DISPOSED` | Your parcel has been disposed of due to its contents or condition and will not be delivered.\n| `PARCEL_LOST` | The carrier has reported that your parcel is lost and will not be delivered.\n| `PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY` | The parcel cannot be delivered as it exceeds the carrier's service limits.\n| `REFUSED_BY_CUSTOMER` | You have refused the parcel, and it will be returned to the sender.\n| `RETURN_TO_SENDER` | Your parcel is being returned to the sender due to delivery issues.\n| `UNSPECIFIED_EXCEPTION` | The carrier has reported an issue with your parcel, but details are unavailable.\n" }, "track_event": { "title": "track_event", @@ -12687,7 +13456,16 @@ { "$ref": "#/components/schemas/status_code" } - ] + ], + "example": "IT" + }, + "status_detail_code": { + "allOf": [ + { + "$ref": "#/components/schemas/status_detail_code" + } + ], + "example": "IN_TRANSIT" }, "status_description": { "type": "string", @@ -12696,6 +13474,13 @@ "example": "In Transit", "description": "Event Status Description" }, + "status_detail_description": { + "type": "string", + "readOnly": true, + "minLength": 0, + "example": "Your shipment is on its way between the carrier hubs.", + "description": "Event Status Detail Description" + }, "carrier_status_code": { "type": "string", "readOnly": true, @@ -12756,7 +13541,7 @@ "$ref": "#/components/schemas/reason_code" } ], - "description": "Indicates a normalized reason for the conditions if the void attempt was not approved. Will not populate if approved is true. “unknown” codes may be specified later.", + "description": "Indicates a normalized reason for the conditions if the void attempt was not approved. Will not populate if approved is true. “unknown” codes may be specified later.", "example": "label_not_found_within_void_period" } } @@ -13712,7 +14497,7 @@ "$ref": "#/components/schemas/shipment_id_request" }, { - "$ref": "#/components/schemas/shipment_request" + "$ref": "#/components/schemas/rate_shipment_request" } ], "allOf": [ @@ -13735,8 +14520,8 @@ } } }, - "shipment_request": { - "title": "shipment_request", + "rate_shipment_request": { + "title": "rate_shipment_request", "type": "object", "properties": { "shipment": { @@ -14088,6 +14873,18 @@ ], "description": "Tariff and additional taxes associated with an international shipment." }, + "rate_details": { + "readOnly": true, + "description": "A list of rate details that are associated with this rate. This is useful for\ndisplaying a breakdown of the rate to the user.\n", + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_detail" + } + ] + } + }, "zone": { "type": "integer", "format": "int32", @@ -14927,6 +15724,23 @@ } ], "description": "Shipment total weight" + }, + "packages": { + "type": "array", + "description": "An array of package dimensions", + "items": { + "type": "object", + "properties": { + "dimensions": { + "allOf": [ + { + "$ref": "#/components/schemas/dimensions" + } + ], + "description": "The package dimensions" + } + } + } } } } @@ -15905,7 +16719,6 @@ "carrier_id", "carrier_detail_code", "carrier_status_code", - "estimated_delivery_date", "events" ], "additionalProperties": false, @@ -16146,7 +16959,7 @@ }, { "name": "carrier_accounts", - "description": "carrier accounts\n", + "description": "A carrier account is a connection to a shipping carrier that allows you to create labels, track packages, and more. You can connect your own carrier accounts to ShipEngine, or use one of our built-in carrier accounts. [Learn more about carrier accounts here.](https://www.shipengine.com/docs/carriers/setup/)\n", "x-displayName": "Carrier Accounts" }, { @@ -16166,7 +16979,7 @@ }, { "name": "labels", - "description": "Print shipping labels for any of the top global carriers in minutes—instead of weeks. Simply [connect your existing carrier accounts](https://www.shipengine.com/docs/carriers/setup/) in the API dashboard, and then [begin creating labels](https://www.shipengine.com/docs/shipping/use-a-carrier-service/).\n", + "description": "Print shipping labels for any of the top global carriers in minutes—instead of weeks. Simply [connect your existing carrier accounts](https://www.shipengine.com/docs/carriers/setup/) in the API dashboard, and then [begin creating labels](https://www.shipengine.com/docs/shipping/use-a-carrier-service/).\n", "externalDocs": { "url": "https://www.shipengine.com/docs/labels/create-a-label/", "description": "Follow this quick start guide to create your first shipping label with ShipEngine" diff --git a/generation/templates/AbstractOpenAPISchema.mustache b/generation/templates/AbstractOpenAPISchema.mustache index 3c299cab..5a617983 100644 --- a/generation/templates/AbstractOpenAPISchema.mustache +++ b/generation/templates/AbstractOpenAPISchema.mustache @@ -21,6 +21,14 @@ namespace {{packageName}}.{{modelPackage}}; DictionaryKeyPolicy = JsonNamingPolicy.SnakeCaseLower }; + /// + /// Constructor + /// + protected AbstractOpenAPISchema(string schemaType) + { + SchemaType = schemaType; + } + /// /// Gets or Sets the actual instance /// diff --git a/generation/templates/README.mustache b/generation/templates/README.solution.mustache similarity index 82% rename from generation/templates/README.mustache rename to generation/templates/README.solution.mustache index d56a86e8..3dd0d480 100644 --- a/generation/templates/README.mustache +++ b/generation/templates/README.solution.mustache @@ -32,9 +32,6 @@ var shipengine = new ShipEngine("___YOUR_API_KEY_HERE__"); ## Overview -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -52,33 +49,19 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap ## Frameworks supported {{#netStandard}} -- .NET Core >=1.0 -- .NET Framework >=4.6 -- Mono/Xamarin >=vNext +- .NET Standard >=2.0 +- .NET Core >=2.0 +- .NET Framework >=4.6.2 {{/netStandard}} -## Documentation for API Endpoints +## Methods -All URIs are relative to *{{{basePath}}}* - -API | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} +API | Method | Description +------------ | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{baseName}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation for Models - -{{#modelPackage}} -{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} -{{/modelPackage}} -{{^modelPackage}} -No model defined in this package -{{/modelPackage}} - - ## Legacy Methods These methods have been deprecated in favor of the methods listed above, but are still in the SDK. @@ -105,7 +88,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` @@ -119,13 +102,12 @@ 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 To regenerate the SDK from the OpenAPI spec, you will first need to get the latest version of the spec. It can be downloaded from the [online documentation](https://shipengine.github.io/shipengine-openapi/) -and should be saved to `./generation/swagger.json`. Then run `npm run generate` from the command line. This will regenerate all the API calls, models, and documentation. It will NOT -regenerate tests, so you will need to manually update those as needed. +and should be saved to `./generation/swagger.json`. Then run `npm run generate` from the command line. This will regenerate all the API calls and models, but not docs or tests. The templates for autogeneration were extracted using the command: ```bash @@ -137,11 +119,10 @@ Create a [fork](https://docs.github.com/en/get-started/quickstart/contributing-t Update the [Changelog](./CHANGELOG.md) with any relevant new features or bug fixes and modify the `packageVersion` property in the `.openapitools.json` file to match the new version. -In the `ShipEngineSDK.csproj` file, update to the desired version (using [semantic versioning](https://semver.org/)) and push to your fork. +In the `ShipEngine.csproj` file, update to the desired version (using [semantic versioning](https://semver.org/)) and push to your fork. Run `dotnet format` Create a pull request. Once a member of the ShipEngine team reviews your PR and it's merged to main, the build pipeline will handle all the necessary github tags and nuget packaging and publishing. - diff --git a/generation/templates/api.mustache b/generation/templates/api.mustache index a4ab4edd..5403fd35 100644 --- a/generation/templates/api.mustache +++ b/generation/templates/api.mustache @@ -37,7 +37,7 @@ namespace {{packageName}}; {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}CancellationToken cancellationToken = default); + Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{#allParams}}{{{dataType}}}{{^required}}?{{/required}} {{paramName}}, {{/allParams}}CancellationToken cancellationToken = default); /// /// {{summary}} {{notes}} @@ -53,7 +53,7 @@ namespace {{packageName}}; {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}(HttpClient methodClient, {{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}CancellationToken cancellationToken = default); + Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}(HttpClient methodClient, {{#allParams}}{{{dataType}}}{{^required}}?{{/required}} {{paramName}}, {{/allParams}}CancellationToken cancellationToken = default); {{/operation}} } @@ -77,7 +77,7 @@ namespace {{packageName}}; {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}, {{/allParams}}CancellationToken cancellationToken = default) + public Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{#allParams}}{{{dataType}}}{{^required}}?{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}, {{/allParams}}CancellationToken cancellationToken = default) { return {{operationId}}(_client, {{#allParams}}{{paramName}}, {{/allParams}}cancellationToken); } @@ -96,7 +96,7 @@ namespace {{packageName}}; {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}(HttpClient methodClient, {{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}, {{/allParams}}CancellationToken cancellationToken = default) + public async Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}(HttpClient methodClient, {{#allParams}}{{{dataType}}}{{^required}}?{{/required}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}, {{/allParams}}CancellationToken cancellationToken = default) { {{#allParams}} {{#required}} @@ -116,38 +116,38 @@ namespace {{packageName}}; {{#constantParams}} {{#isPathParam}} // Set client side default value of Path Param "{{baseName}}". - requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant path parameter + requestOptions.PathParameters.Add("{{baseName}}", ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant path parameter {{/isPathParam}} {{/constantParams}} {{#pathParams}} {{#required}} - requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // path parameter + requestOptions.PathParameters.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); // path parameter {{/required}} {{^required}} if ({{paramName}} != null) { - requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // path parameter + requestOptions.PathParameters.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); // path parameter } {{/required}} {{/pathParams}} {{#constantParams}} {{#isQueryParam}} // Set client side default value of Query Param "{{baseName}}". - requestOptions.QueryParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant query parameter + requestOptions.QueryParameters.Add("{{baseName}}", ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant query parameter {{/isQueryParam}} {{/constantParams}} {{#queryParams}} {{#required}} {{#isDeepObject}} {{#items.vars}} - requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); {{/items.vars}} {{^items}} - requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/isDeepObject}} {{/required}} {{^required}} @@ -157,15 +157,15 @@ namespace {{packageName}}; {{#items.vars}} if ({{paramName}}.{{name}} != null) { - requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); } {{/items.vars}} {{^items}} - requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + requestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/isDeepObject}} } {{/required}} @@ -173,17 +173,17 @@ namespace {{packageName}}; {{#constantParams}} {{#isHeaderParam}} // Set client side default value of Header Param "{{baseName}}". - requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter + requestOptions.HeaderParameters.Add("{{baseName}}", ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter {{/isHeaderParam}} {{/constantParams}} {{#headerParams}} {{#required}} - requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // header parameter + requestOptions.HeaderParameters.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); // header parameter {{/required}} {{^required}} if ({{paramName}} != null) { - requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // header parameter + requestOptions.HeaderParameters.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); // header parameter } {{/required}} {{/headerParams}} @@ -205,7 +205,7 @@ namespace {{packageName}}; {{/isArray}} {{/isFile}} {{^isFile}} - requestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + requestOptions.FormParameters.Add("{{baseName}}", ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter {{/isFile}} {{/required}} {{^required}} @@ -227,7 +227,7 @@ namespace {{packageName}}; {{/isArray}} {{/isFile}} {{^isFile}} - requestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + requestOptions.FormParameters.Add("{{baseName}}", ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter {{/isFile}} } {{/required}} diff --git a/generation/templates/api_doc.mustache b/generation/templates/api_doc.mustache index 0a6b787d..8cc15665 100644 --- a/generation/templates/api_doc.mustache +++ b/generation/templates/api_doc.mustache @@ -1,13 +1,11 @@ -# {{packageName}}.{{apiPackage}}.{{classname}}{{#description}} +# {{baseName}} Methods{{#description}} {{.}}{{/description}} -All URIs are relative to *{{{basePath}}}* - -| Method | HTTP request | Description | -|--------|--------------|-------------| +| Method | Description | +|--------|-------------| {{#operations}} {{#operation}} -| [**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} | +| [**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | {{summary}} | {{/operation}} {{/operations}} @@ -15,7 +13,11 @@ All URIs are relative to *{{{basePath}}}* {{#operation}} # **{{{operationId}}}** -> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +```csharp +{{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}, {{/allParams}}CancellationToken cancellationToken = default) + +{{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} (HttpClient methodClient, {{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}, {{/allParams}}CancellationToken cancellationToken = default) +``` {{{summary}}}{{#notes}} @@ -40,10 +42,10 @@ namespace Example var shipEngine = new ShipEngine("api_key"); {{#allParams}} {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + var {{paramName}} = {{{example}}}; {{/isPrimitiveType}} {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + var {{paramName}} = new {{{dataType}}}(); {{/isPrimitiveType}} {{/allParams}} @@ -67,39 +69,17 @@ namespace Example ``` ### Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} | Name | Type | Description | Notes | |------|------|-------------|-------| -{{/-last}} -{{/allParams}} +| **methodClient** | [**HttpClient**](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netstandard-2.0) | The HttpClient instance to use for the request. | | {{#allParams}} -| **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | +| **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../../{{modelDocPath}}/{{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | {{/allParams}} +| **cancellationToken** | [**CancellationToken**](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netstandard-2.0) | The cancellation token to use for the request. | | ### Return type -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - - - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -{{#responses.0}} - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -{{#responses}} -| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | -{{/responses}} -{{/responses.0}} - -[[Back to top]](#) [[Back to API list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-api-endpoints) [[Back to Model list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-models) [[Back to README]](../{{#useGenericHost}}../{{/useGenericHost}}README.md) +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**](../models/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} {{/operation}} {{/operations}} diff --git a/generation/templates/modelEnum.mustache b/generation/templates/modelEnum.mustache index e000a1cf..bfb4702f 100644 --- a/generation/templates/modelEnum.mustache +++ b/generation/templates/modelEnum.mustache @@ -7,8 +7,11 @@ [JsonConverter(typeof({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter))] {{>visibility}} class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { - private string _value; + private readonly string _value; + /// + /// Create a new instance of {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} with a predefined value. + /// {{#allowableValues}} {{#enumVars}} {{#-first}} @@ -46,13 +49,27 @@ {{/enumVars}} {{/allowableValues}} + /// + /// Get a string representation of the current value + /// public override string ToString() => _value; + + /// + /// Get whether this instance is equal to another instance + /// + public override bool Equals(object? obj) => + obj is {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} other && _value == other._value; + + /// + /// Get the hash code of the object + /// + public override int GetHashCode() => _value.GetHashCode(); } internal class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => - reader.TokenType == JsonTokenType.String ? new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}(reader.GetString()) : null; + reader.TokenType == JsonTokenType.String ? new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}(reader.GetString()!) : null; public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value, JsonSerializerOptions options) => writer.WriteStringValue(value.ToString()); diff --git a/generation/templates/modelGeneric.mustache b/generation/templates/modelGeneric.mustache index beb447d2..09fb94e2 100644 --- a/generation/templates/modelGeneric.mustache +++ b/generation/templates/modelGeneric.mustache @@ -30,35 +30,37 @@ {{>modelInnerEnum}} {{/complexType}} {{/isEnum}} - {{#isEnum}} + {{/vars}} + {{#vars}} + {{^isInherited}} + {{#isEnum}} /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} CLOVUS + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{#description}} /// {{.}} {{/description}} + {{#isReadOnly}} + /// + /// This should not be used for input as it will be ignored on serialization. + /// + {{/isReadOnly}} {{#example}} /// /// {{.}} /// {{/example}} - [JsonPropertyName("{{baseName}}")]{{#required}} - [JsonRequired]{{/required}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; }{{#required}} = new(); + {{>partial_jsonAttributes}} + public{{>partial_requiredAttribute}} {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{>partial_optional}}{{/isContainer}} {{name}} {{>partial_getSet}} - {{/required}} {{/isEnum}} - {{/vars}} - - {{#vars}} - {{^isInherited}} {{^isEnum}} {{#items.vars}} {{#-first}} + /// + /// Type of data of the elements in the list + /// public class {{classname}}Item { {{/-first}} @@ -71,15 +73,8 @@ /// {{.}} /// {{/example}} - [JsonPropertyName("{{baseName}}")]{{#required}} - [JsonRequired]{{/required}} - {{#isDate}} - [JsonConverter(typeof(DateJsonConverter))] - {{/isDate}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; } + {{>partial_jsonAttributes}} + public{{>partial_requiredAttribute}} {{{dataType}}}{{>partial_optional}} {{name}} {{>partial_getSet}} {{#-last}} } @@ -87,22 +82,22 @@ {{/items.vars}} /// /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} + ///
+ {{#description}} + /// {{.}} + {{/description}} + {{#isReadOnly}} + /// + /// This should not be used for input as it will be ignored on serialization. + /// + {{/isReadOnly}} {{#example}} /// /// {{.}} /// {{/example}} - [JsonPropertyName("{{baseName}}")]{{#required}} - [JsonRequired]{{/required}} - {{#isDate}} - [JsonConverter(typeof(DateJsonConverter))] - {{/isDate}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{#items.vars}}{{#-first}}List<{{classname}}Item>{{/-first}}{{/items.vars}}{{^items.vars}}{{{dataType}}}{{/items.vars}} {{name}} { get; set; } + {{>partial_jsonAttributes}} + public{{>partial_requiredAttribute}} {{#items.vars}}{{#-first}}List<{{classname}}Item>{{/-first}}{{/items.vars}}{{^items.vars}}{{{dataType}}}{{/items.vars}}{{>partial_optional}} {{name}} {{>partial_getSet}} {{/isEnum}} {{/isInherited}} @@ -112,7 +107,7 @@ /// Gets or Sets additional properties ///
[JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public IDictionary AdditionalProperties {{>partial_getSet}} = new Dictionary(); {{/isAdditionalPropertiesTrue}} @@ -122,8 +117,9 @@ /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class {{classname}} {\n"); +#pragma warning disable CS0612 // Type or member is obsolete {{#parent}} sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); {{/parent}} @@ -133,6 +129,7 @@ {{#isAdditionalPropertiesTrue}} sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); {{/isAdditionalPropertiesTrue}} +#pragma warning restore CS0612 // Type or member is obsolete sb.Append("}\n"); return sb.ToString(); } diff --git a/generation/templates/modelInnerEnum.mustache b/generation/templates/modelInnerEnum.mustache index 5bf28b4d..951d919e 100644 --- a/generation/templates/modelInnerEnum.mustache +++ b/generation/templates/modelInnerEnum.mustache @@ -8,11 +8,14 @@ [JsonConverter(typeof({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter))] {{>visibility}} class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { - private string _value; + private readonly string _value; {{#allowableValues}} {{#enumVars}} {{#-first}} + /// + /// Create a new instance of {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} with a predefined value. + /// internal {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}() { _value = "{{value}}"; @@ -21,9 +24,17 @@ {{/enumVars}} {{/allowableValues}} + /// + /// Create a new instance of {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} with a custom value. + /// + /// The value of the {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + /// + /// You can send a custom value to the API using this constructor, but the API most likely won't know what to do with it. + /// You should use the predefined values returned by the static properties of this class unless you know that the value is value. + /// public {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}(string value) { - + _value = value; } {{#allowableValues}} @@ -39,13 +50,16 @@ {{/enumVars}} {{/allowableValues}} + /// + /// Get a string representation of the current value + /// public override string ToString() => _value; } internal class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => - reader.TokenType == JsonTokenType.String ? new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}(reader.GetString()) : null; + reader.TokenType == JsonTokenType.String ? new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}(reader.GetString()!) : null; public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value, JsonSerializerOptions options) => writer.WriteStringValue(value.ToString()); diff --git a/generation/templates/modelOneOf.mustache b/generation/templates/modelOneOf.mustache index 826a46e7..720448ac 100644 --- a/generation/templates/modelOneOf.mustache +++ b/generation/templates/modelOneOf.mustache @@ -26,51 +26,51 @@ {{>modelInnerEnum}} {{/complexType}} {{/isEnum}} - {{#isEnum}} + {{/allVars}} + {{#allVars}} + {{#isEnum}} /// /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{#description}} /// {{.}} {{/description}} + {{#isReadOnly}} + /// + /// This should not be used for input as it will be ignored on serialization. + /// + {{/isReadOnly}} {{#example}} /// /// {{.}} /// {{/example}} - [JsonPropertyName("{{baseName}}")]{{#required}} - [JsonRequired]{{/required}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; }{{#required}} = new(); + {{>partial_jsonAttributes}} + public{{>partial_requiredAttribute}} {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{>partial_optional}}{{/isContainer}} {{name}} {{>partial_getSet}}{{#required}} = new(); {{/required}} {{/isEnum}} - {{/allVars}} - - {{#allVars}} {{^isInherited}} {{^isEnum}} /// /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + {{#isReadOnly}} + /// + /// This should not be used for input as it will be ignored on serialization. + /// + {{/isReadOnly}} {{#example}} /// /// {{.}} /// {{/example}} - [JsonPropertyName("{{baseName}}")]{{#required}} - [JsonRequired]{{/required}} - {{#isDate}} - [JsonConverter(typeof(DateJsonConverter))] - {{/isDate}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}} {{name}} { get; set; } + {{>partial_jsonAttributes}} + public{{>partial_requiredAttribute}} {{{dataType}}}{{>partial_optional}} {{name}} {{>partial_getSet}} {{/isEnum}} {{/isInherited}} @@ -81,7 +81,7 @@ /// Gets or Sets additional properties /// [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public IDictionary AdditionalProperties {{>partial_getSet}} = new Dictionary(); {{/isAdditionalPropertiesTrue}} @@ -104,11 +104,10 @@ /// with the class /// /// An instance of {{dataType}}. - public {{classname}}({{{dataType}}} actualInstance) + public {{classname}}({{{dataType}}} actualInstance) : base("oneOf") { this.IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}}; - this.SchemaType = "oneOf"; - this.ActualInstance = actualInstance{{^model.isNullable}}{{^isPrimitiveType}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isPrimitiveType}}{{#isPrimitiveType}}{{#isArray}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isArray}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFreeFormObject}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isString}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isString}}{{/isPrimitiveType}}{{/model.isNullable}}; + _actualInstance = actualInstance{{^model.isNullable}}{{^isPrimitiveType}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isPrimitiveType}}{{#isPrimitiveType}}{{#isArray}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isArray}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFreeFormObject}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isString}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isString}}{{/isPrimitiveType}}{{/model.isNullable}}; } {{/isNull}} @@ -166,7 +165,6 @@ var sb = new StringBuilder(); sb.Append("class {{classname}} {\n"); sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - {{#composedSchemas.allOf}} {{#allVars}} sb.Append(" {{name}}: ").Append(this.{{name}}).Append("\n"); @@ -253,9 +251,9 @@ /// public class {{classname}}JsonConverter : JsonConverter<{{classname}}> { - private static HashSet OneOfTypes = [{{#composedSchemas.oneOf}}typeof({{{dataType}}}){{^-last}}, {{/-last}}{{/composedSchemas.oneOf}}]; - private static HashSet MandatoryFields = [{{#allMandatory}}"{{.}}"{{^-last}}, {{/-last}}{{/allMandatory}}]; - private static JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) + private static readonly HashSet OneOfTypes = [{{#composedSchemas.oneOf}}typeof({{{dataType}}}){{^-last}}, {{/-last}}{{/composedSchemas.oneOf}}]; + private static readonly HashSet MandatoryFields = [{{#allMandatory}}"{{.}}"{{^-last}}, {{/-last}}{{/allMandatory}}]; + private static readonly JsonSerializerOptions DeserializingOptions = new(AbstractOpenAPISchema.SerializerSettings) { TypeInfoResolver = new DefaultJsonTypeInfoResolver { @@ -321,7 +319,7 @@ public class {{classname}}JsonConverter : JsonConverter<{{classname}}> /// Object type to convert /// Serializer options /// The object converted from the JSON string - public override {{classname}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override {{classname}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { if (reader.TokenType == JsonTokenType.Null) { @@ -329,7 +327,14 @@ public class {{classname}}JsonConverter : JsonConverter<{{classname}}> } var jsonDoc = JsonDocument.ParseValue(ref reader); - {{classname}} new{{classname}} = null; + {{classname}}? new{{classname}} = null; + +{{#composedSchemas.allOf}} + // Deserialize all the common properties of the model so they can be used in object initializers later + {{#allVars}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = jsonDoc.RootElement.GetProperty("{{baseName}}").Deserialize<{{#isEnum}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}>(DeserializingOptions)!; + {{/allVars}} +{{/composedSchemas.allOf}} int match = 0; var matchedTypes = new List(); @@ -337,7 +342,12 @@ public class {{classname}}JsonConverter : JsonConverter<{{classname}}> try { - new{{classname}} = new {{classname}}(JsonSerializer.Deserialize<{{{dataType}}}>(jsonDoc, DeserializingOptions)); + new{{classname}} = new {{classname}}(jsonDoc.Deserialize<{{{dataType}}}>(DeserializingOptions)!){{#model.composedSchemas.allOf}} + { + {{#allVars}} + {{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}, + {{/allVars}} + }{{/model.composedSchemas.allOf}}; matchedTypes.Add("{{{dataType}}}"); match++; @@ -345,7 +355,7 @@ public class {{classname}}JsonConverter : JsonConverter<{{classname}}> catch (Exception exception) { // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into {{{dataType}}}: {1}", jsonDoc, exception.ToString())); + System.Diagnostics.Debug.WriteLine("Failed to deserialize `{0}` into {{{dataType}}}: {1}", jsonDoc, exception); } {{/composedSchemas.oneOf}} @@ -359,12 +369,6 @@ public class {{classname}}JsonConverter : JsonConverter<{{classname}}> throw new InvalidDataException("The JSON string `" + jsonDoc + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); } -{{#composedSchemas.allOf}} - {{#allVars}} - new{{classname}}.{{name}} = JsonSerializer.Deserialize<{{#isEnum}}{{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}>(jsonDoc.RootElement.GetProperty("{{baseName}}"), DeserializingOptions); - {{/allVars}} -{{/composedSchemas.allOf}} - // deserialization is considered successful at this point if no exception has been thrown. return new{{classname}}; } diff --git a/generation/templates/model_doc.mustache b/generation/templates/model_doc.mustache index 3c7f8b2d..63c38fd3 100644 --- a/generation/templates/model_doc.mustache +++ b/generation/templates/model_doc.mustache @@ -16,7 +16,5 @@ Name | Type | Description | Notes {{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} -[[Back to Model list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-models) [[Back to API list]](../{{#useGenericHost}}../{{/useGenericHost}}README.md#documentation-for-api-endpoints) [[Back to README]](../{{#useGenericHost}}../{{/useGenericHost}}README.md) - {{/model}} {{/models}} diff --git a/generation/templates/partial_getSet.mustache b/generation/templates/partial_getSet.mustache new file mode 100644 index 00000000..65a426a1 --- /dev/null +++ b/generation/templates/partial_getSet.mustache @@ -0,0 +1 @@ +{ get; set; } \ No newline at end of file diff --git a/generation/templates/partial_header.mustache b/generation/templates/partial_header.mustache index 7257ee65..f9c9a7df 100644 --- a/generation/templates/partial_header.mustache +++ b/generation/templates/partial_header.mustache @@ -1,13 +1,5 @@ -/* - {{#appName}} - * {{{.}}} - * - {{/appName}} - {{#version}} - * The version of the OpenAPI document: {{{.}}} - {{/version}} - {{#infoEmail}} - * Contact: {{{.}}} - {{/infoEmail}} - * Generated by: https://github.com/openapitools/openapi-generator.git - */ +// +// 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. diff --git a/generation/templates/partial_jsonAttributes.mustache b/generation/templates/partial_jsonAttributes.mustache new file mode 100644 index 00000000..f83bec0e --- /dev/null +++ b/generation/templates/partial_jsonAttributes.mustache @@ -0,0 +1 @@ +[JsonPropertyName("{{baseName}}"){{^isReadOnly}}, JsonPropertyOrder({{-index}}){{/isReadOnly}}{{#isReadOnly}}, JsonInclude{{/isReadOnly}}{{#isWriteOnly}}, JsonWriteOnly{{/isWriteOnly}}{{#isDate}}, JsonConverter(typeof(DateJsonConverter)){{/isDate}}{{#deprecated}}, Obsolete{{/deprecated}}] \ No newline at end of file diff --git a/generation/templates/partial_optional.mustache b/generation/templates/partial_optional.mustache new file mode 100644 index 00000000..dee66315 --- /dev/null +++ b/generation/templates/partial_optional.mustache @@ -0,0 +1 @@ +{{#isReadOnly}}?{{/isReadOnly}}{{^isReadOnly}}{{^required}}?{{/required}}{{/isReadOnly}} \ No newline at end of file diff --git a/generation/templates/partial_requiredAttribute.mustache b/generation/templates/partial_requiredAttribute.mustache new file mode 100644 index 00000000..15707f91 --- /dev/null +++ b/generation/templates/partial_requiredAttribute.mustache @@ -0,0 +1 @@ +{{^isReadOnly}}{{#required}} required{{/required}}{{/isReadOnly}} \ No newline at end of file diff --git a/openapitools.json b/openapitools.json index 6e8fd79c..e8b126b9 100644 --- a/openapitools.json +++ b/openapitools.json @@ -12,12 +12,18 @@ "skipValidateSpec": true, "packageName": "ShipEngineSDK", "ignoreFileOverride": "./.openapi-generator-ignore", + "library": "generichost", "additionalProperties": { - "packageVersion": "2.3.6", + "packageVersion": "3.0.0", "targetFramework": "netstandard2.0", "validatable": false, "sourceFolder": "", - "optionalProjectFile": false + "optionalProjectFile": false, + "nullableReferenceTypes": true, + "useDateTimeOffset": true, + "modelPropertySorting": "alphabetical", + "apiDocPath": "docs/apis/", + "modelDocPath": "docs/models/" } } } diff --git a/package-lock.json b/package-lock.json index 72635bd8..3e46ab52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "shipengine-dotnet", - "version": "2.3.3", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "shipengine-dotnet", - "version": "2.3.3", + "version": "3.0.0", "license": "Apache-2.0", "dependencies": { "shipengine-dotnet": "file:" diff --git a/package.json b/package.json index 4fd240e3..ca227541 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shipengine-dotnet", - "version": "2.3.3", + "version": "3.0.0", "description": "Package primarily used to generate the API and models from OpenApi spec\"", "main": "index.js", "directories": {