diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 785d0e76..b8816038 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -32,7 +32,7 @@ jobs: run: msbuild shipengine-dotnet.sln /p:Configuration=Release - name: Run Test - run: dotnet test ShipEngine.Tests/bin/Release/net462/ShipEngine.Tests.dll + run: dotnet test ShipEngineSDK.Test/bin/Release/net462/ShipEngineSDK.Test.dll dot_net_core_test: name: .Net 8.0 on ${{ matrix.os }} @@ -65,13 +65,13 @@ jobs: run: dotnet build --configuration Release - name: Run 8.0 Tests - run: dotnet test -f net8.0 --settings ShipEngine.Tests/coverage.runsettings + run: dotnet test -f net8.0 --settings ShipEngineSDK.Test/coverage.runsettings - name: Move generated lcov file to expected location shell: bash run: | - ls -Rlh ShipEngine.Tests/TestResults/*/coverage.info - cat ShipEngine.Tests/TestResults/*/coverage.info > ShipEngine.Tests/TestResults/lcov.info + 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 @@ -79,7 +79,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} parallel: true flag-name: run-${{ matrix.test_number }} - path-to-lcov: ShipEngine.Tests/TestResults/lcov.info + path-to-lcov: ShipEngineSDK.Test/TestResults/lcov.info coverage: name: Code Coverage @@ -112,7 +112,7 @@ jobs: with: # Filepath of the project to be packaged, relative to root of repository - PROJECT_FILE_PATH: ShipEngine/ShipEngine.csproj + PROJECT_FILE_PATH: ShipEngineSDK/ShipEngineSDK.csproj # NuGet package id, used for version detection & defaults to project name PACKAGE_NAME: ShipEngine diff --git a/.gitignore b/.gitignore index 78b73185..984299ed 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ TestResults .gitmodules dockerfile docker-compose.* + +node_modules +out \ No newline at end of file diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 00000000..52e2ea1c --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,37 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +*.sln +**/*.csproj +appveyor.yml +git_push.sh +ShipEngineSDK/Client/*.cs + +# We should re-enable these eventually +README.md +docs/*.md +ShipEngineSDK.Test/*/*.cs +api/** +.gitignore +.openapi-generator-ignore diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 00000000..b2ccc123 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,318 @@ +ShipEngineSDK/Api/AccountApi.cs +ShipEngineSDK/Api/AddressesApi.cs +ShipEngineSDK/Api/BatchesApi.cs +ShipEngineSDK/Api/CarrierAccountsApi.cs +ShipEngineSDK/Api/CarriersApi.cs +ShipEngineSDK/Api/DownloadsApi.cs +ShipEngineSDK/Api/InsuranceApi.cs +ShipEngineSDK/Api/LabelsApi.cs +ShipEngineSDK/Api/ManifestsApi.cs +ShipEngineSDK/Api/PackagePickupsApi.cs +ShipEngineSDK/Api/PackageTypesApi.cs +ShipEngineSDK/Api/RatesApi.cs +ShipEngineSDK/Api/ServicePointsApi.cs +ShipEngineSDK/Api/ShipmentsApi.cs +ShipEngineSDK/Api/TagsApi.cs +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 +ShipEngineSDK/Model/AddFundsToCarrierResponseBody.cs +ShipEngineSDK/Model/AddFundsToInsuranceRequestBody.cs +ShipEngineSDK/Model/AddFundsToInsuranceResponseBody.cs +ShipEngineSDK/Model/AddToBatchRequestBody.cs +ShipEngineSDK/Model/Address.cs +ShipEngineSDK/Model/AddressResidentialIndicator.cs +ShipEngineSDK/Model/AddressToValidate.cs +ShipEngineSDK/Model/AddressValidatingShipment.cs +ShipEngineSDK/Model/AddressValidationCode.cs +ShipEngineSDK/Model/AddressValidationDetailCode.cs +ShipEngineSDK/Model/AddressValidationMessageType.cs +ShipEngineSDK/Model/AddressValidationResult.cs +ShipEngineSDK/Model/AddressValidationStatus.cs +ShipEngineSDK/Model/AdvancedShipmentOptions.cs +ShipEngineSDK/Model/AdvancedShipmentOptionsDangerousGoodsContact.cs +ShipEngineSDK/Model/AdvancedShipmentOptionsFedexFreight.cs +ShipEngineSDK/Model/AllowedIncoterms.cs +ShipEngineSDK/Model/AlternativeIdentifier.cs +ShipEngineSDK/Model/AlternativeIdentifiers.cs +ShipEngineSDK/Model/AncillaryServiceEndorsement.cs +ShipEngineSDK/Model/Batch.cs +ShipEngineSDK/Model/BatchResponseError.cs +ShipEngineSDK/Model/BatchStatus.cs +ShipEngineSDK/Model/BatchesSortBy.cs +ShipEngineSDK/Model/BillToParty.cs +ShipEngineSDK/Model/BulkRate.cs +ShipEngineSDK/Model/CalculateRatesRequestBody.cs +ShipEngineSDK/Model/CalculateRatesResponseBody.cs +ShipEngineSDK/Model/Carrier.cs +ShipEngineSDK/Model/CarrierAdvancedOption.cs +ShipEngineSDK/Model/CarrierName.cs +ShipEngineSDK/Model/CarrierNameWithSettings.cs +ShipEngineSDK/Model/CollectOnDelivery.cs +ShipEngineSDK/Model/CollectOnDeliveryPaymentType.cs +ShipEngineSDK/Model/CompareBulkRatesRequestBody.cs +ShipEngineSDK/Model/ConnectAccessWorldwideRequestBody.cs +ShipEngineSDK/Model/ConnectAmazonBuyShippingRequestBody.cs +ShipEngineSDK/Model/ConnectAmazonShippingUk.cs +ShipEngineSDK/Model/ConnectApcRequestBody.cs +ShipEngineSDK/Model/ConnectAsendiaRequestBody.cs +ShipEngineSDK/Model/ConnectAustraliaPostRequestBody.cs +ShipEngineSDK/Model/ConnectCanadaPostRequestBody.cs +ShipEngineSDK/Model/ConnectCarrierRequestBody.cs +ShipEngineSDK/Model/ConnectCarrierResponseBody.cs +ShipEngineSDK/Model/ConnectDhlEcommerceRequestBody.cs +ShipEngineSDK/Model/ConnectDhlExpressAuRequestBody.cs +ShipEngineSDK/Model/ConnectDhlExpressCaRequestBody.cs +ShipEngineSDK/Model/ConnectDhlExpressRequestBody.cs +ShipEngineSDK/Model/ConnectDhlExpressUkRequestBody.cs +ShipEngineSDK/Model/ConnectDpdRequestBody.cs +ShipEngineSDK/Model/ConnectEndiciaRequestBody.cs +ShipEngineSDK/Model/ConnectFedexRequestBody.cs +ShipEngineSDK/Model/ConnectFedexUkRequestBody.cs +ShipEngineSDK/Model/ConnectFirstmileRequestBody.cs +ShipEngineSDK/Model/ConnectImexRequestBody.cs +ShipEngineSDK/Model/ConnectInsurerRequestBody.cs +ShipEngineSDK/Model/ConnectLasershipRequestBody.cs +ShipEngineSDK/Model/ConnectNewgisticsRequestBody.cs +ShipEngineSDK/Model/ConnectOntracRequestBody.cs +ShipEngineSDK/Model/ConnectPurolatorRequestBody.cs +ShipEngineSDK/Model/ConnectRoyalMailRequestBody.cs +ShipEngineSDK/Model/ConnectRrDonnelleyRequestBody.cs +ShipEngineSDK/Model/ConnectSekoRequestBody.cs +ShipEngineSDK/Model/ConnectSendleRequestBody.cs +ShipEngineSDK/Model/ConnectStampsRequestBody.cs +ShipEngineSDK/Model/ConnectUpsRequestBody.cs +ShipEngineSDK/Model/ContactDetails.cs +ShipEngineSDK/Model/CreateAccountSettingsImageRequestBody.cs +ShipEngineSDK/Model/CreateAndProcessBatchRequestBody.cs +ShipEngineSDK/Model/CreateAndProcessBatchRequestBodyProcessLabels.cs +ShipEngineSDK/Model/CreateAndValidateShipment.cs +ShipEngineSDK/Model/CreateBatchRequest.cs +ShipEngineSDK/Model/CreateBatchRequestBody.cs +ShipEngineSDK/Model/CreateBatchResponseBody.cs +ShipEngineSDK/Model/CreateLabelFromRateRequestBody.cs +ShipEngineSDK/Model/CreateLabelFromRateResponseBody.cs +ShipEngineSDK/Model/CreateLabelFromShipmentRequestBody.cs +ShipEngineSDK/Model/CreateLabelFromShipmentResponseBody.cs +ShipEngineSDK/Model/CreateLabelRequestBody.cs +ShipEngineSDK/Model/CreateLabelResponseBody.cs +ShipEngineSDK/Model/CreateManifestByObjectRequestBody.cs +ShipEngineSDK/Model/CreateManifestLabelIdsRequestBody.cs +ShipEngineSDK/Model/CreateManifestRequestBody.cs +ShipEngineSDK/Model/CreateManifestResponseBody.cs +ShipEngineSDK/Model/CreatePackageTypeRequestBody.cs +ShipEngineSDK/Model/CreatePackageTypeResponseBody.cs +ShipEngineSDK/Model/CreateReturnLabelRequestBody.cs +ShipEngineSDK/Model/CreateReturnLabelResponseBody.cs +ShipEngineSDK/Model/CreateShipmentResponseBodyFields.cs +ShipEngineSDK/Model/CreateShipmentsRequestBody.cs +ShipEngineSDK/Model/CreateShipmentsResponseBody.cs +ShipEngineSDK/Model/CreateTagResponseBody.cs +ShipEngineSDK/Model/CreateWarehouseRequestBody.cs +ShipEngineSDK/Model/CreateWarehouseResponseBody.cs +ShipEngineSDK/Model/CreateWebhookRequestBody.cs +ShipEngineSDK/Model/CreateWebhookResponseBody.cs +ShipEngineSDK/Model/CustomsItem.cs +ShipEngineSDK/Model/DangerousAmount.cs +ShipEngineSDK/Model/DangerousGoods.cs +ShipEngineSDK/Model/DefaultLabelLayout.cs +ShipEngineSDK/Model/DeletePickupByIdResponseBody.cs +ShipEngineSDK/Model/DeleteScheduledPickupResponseBody.cs +ShipEngineSDK/Model/DeliveryConfirmation.cs +ShipEngineSDK/Model/DeprecatedManifest.cs +ShipEngineSDK/Model/DhlExpressAccountSettings.cs +ShipEngineSDK/Model/DhlExpressSettingsResponseBody.cs +ShipEngineSDK/Model/DimensionUnit.cs +ShipEngineSDK/Model/Dimensions.cs +ShipEngineSDK/Model/DisplayScheme.cs +ShipEngineSDK/Model/Error.cs +ShipEngineSDK/Model/ErrorCode.cs +ShipEngineSDK/Model/ErrorResponseBody.cs +ShipEngineSDK/Model/ErrorSource.cs +ShipEngineSDK/Model/ErrorType.cs +ShipEngineSDK/Model/ErrorWithLabelIdResponseBody.cs +ShipEngineSDK/Model/EstimateRatesRequestBody.cs +ShipEngineSDK/Model/FedexAccountSettings.cs +ShipEngineSDK/Model/FedexAccountSettingsRequestBody.cs +ShipEngineSDK/Model/FedexPickupType.cs +ShipEngineSDK/Model/FedexSettingsResponseBody.cs +ShipEngineSDK/Model/GetAccountSettingsImagesResponseBody.cs +ShipEngineSDK/Model/GetAccountSettingsResponseBody.cs +ShipEngineSDK/Model/GetBatchByExternalIdResponseBody.cs +ShipEngineSDK/Model/GetBatchByIdResponseBody.cs +ShipEngineSDK/Model/GetCarrierByIdResponseBody.cs +ShipEngineSDK/Model/GetCarrierOptionsResponseBody.cs +ShipEngineSDK/Model/GetCarrierSettingsResponseBody.cs +ShipEngineSDK/Model/GetCarriersResponseBody.cs +ShipEngineSDK/Model/GetInsuranceBalanceResponseBody.cs +ShipEngineSDK/Model/GetLabelByExternalShipmentIdResponseBody.cs +ShipEngineSDK/Model/GetLabelByIdResponseBody.cs +ShipEngineSDK/Model/GetManifestByIdResponseBody.cs +ShipEngineSDK/Model/GetPackageTypeByIdResponseBody.cs +ShipEngineSDK/Model/GetPickupByIdResponseBody.cs +ShipEngineSDK/Model/GetPickupsResponseBody.cs +ShipEngineSDK/Model/GetRateByIdResponseBody.cs +ShipEngineSDK/Model/GetServicePointByIdResponseBody.cs +ShipEngineSDK/Model/GetServicePointByIdResponseBodyServicePoint.cs +ShipEngineSDK/Model/GetServicePointsRequest.cs +ShipEngineSDK/Model/GetServicePointsRequestBody.cs +ShipEngineSDK/Model/GetServicePointsRequestBodyAddress.cs +ShipEngineSDK/Model/GetServicePointsRequestBodyProvidersInner.cs +ShipEngineSDK/Model/GetServicePointsRequestBodyShipment.cs +ShipEngineSDK/Model/GetShipmentByExternalIdResponseBody.cs +ShipEngineSDK/Model/GetShipmentByIdResponseBody.cs +ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs +ShipEngineSDK/Model/GetTrackingLogResponseBody.cs +ShipEngineSDK/Model/GetWarehouseByIdResponseBody.cs +ShipEngineSDK/Model/GetWebhookByIdResponseBody.cs +ShipEngineSDK/Model/IdentifierType.cs +ShipEngineSDK/Model/ImporterOfRecords.cs +ShipEngineSDK/Model/InsuranceProvider.cs +ShipEngineSDK/Model/InternationalShipmentOptions.cs +ShipEngineSDK/Model/InvoiceAdditionalDetails.cs +ShipEngineSDK/Model/Label.cs +ShipEngineSDK/Model/LabelChargeEvent.cs +ShipEngineSDK/Model/LabelDownload.cs +ShipEngineSDK/Model/LabelDownloadType.cs +ShipEngineSDK/Model/LabelFormat.cs +ShipEngineSDK/Model/LabelLayout.cs +ShipEngineSDK/Model/LabelMessages.cs +ShipEngineSDK/Model/LabelPackagesInner.cs +ShipEngineSDK/Model/LabelStatus.cs +ShipEngineSDK/Model/Link.cs +ShipEngineSDK/Model/ListAccountImagesResponseBody.cs +ShipEngineSDK/Model/ListAccountSettingsBody.cs +ShipEngineSDK/Model/ListAccountSettingsImagesResponseBody.cs +ShipEngineSDK/Model/ListBatchErrorsResponseBody.cs +ShipEngineSDK/Model/ListBatchesResponseBody.cs +ShipEngineSDK/Model/ListCarrierPackageTypesResponseBody.cs +ShipEngineSDK/Model/ListCarrierServicesResponseBody.cs +ShipEngineSDK/Model/ListCarriersResponseBody.cs +ShipEngineSDK/Model/ListLabelsResponseBody.cs +ShipEngineSDK/Model/ListManifestsResponseBody.cs +ShipEngineSDK/Model/ListPackageTypesResponseBody.cs +ShipEngineSDK/Model/ListPickupResponseBody.cs +ShipEngineSDK/Model/ListServicePointsResponseBody.cs +ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInner.cs +ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.cs +ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.cs +ShipEngineSDK/Model/ListShipmentRatesResponseBody.cs +ShipEngineSDK/Model/ListShipmentsResponseBody.cs +ShipEngineSDK/Model/ListTagsResponseBody.cs +ShipEngineSDK/Model/ListWarehousesResponseBody.cs +ShipEngineSDK/Model/Manifest.cs +ShipEngineSDK/Model/ManifestDownload.cs +ShipEngineSDK/Model/ManifestRequest.cs +ShipEngineSDK/Model/ManifestRequestStatus.cs +ShipEngineSDK/Model/Manifests.cs +ShipEngineSDK/Model/ManifestsRequests.cs +ShipEngineSDK/Model/ModifyBatch.cs +ShipEngineSDK/Model/MonetaryValue.cs +ShipEngineSDK/Model/NonDelivery.cs +ShipEngineSDK/Model/OptionalLink.cs +ShipEngineSDK/Model/OrderSourceName.cs +ShipEngineSDK/Model/OriginType.cs +ShipEngineSDK/Model/Package.cs +ShipEngineSDK/Model/PackageContents.cs +ShipEngineSDK/Model/PackageType.cs +ShipEngineSDK/Model/PackagingGroup.cs +ShipEngineSDK/Model/PackagingInstructionSection.cs +ShipEngineSDK/Model/PagedListResponseBody.cs +ShipEngineSDK/Model/PaginationLink.cs +ShipEngineSDK/Model/PaperlessDownload.cs +ShipEngineSDK/Model/ParseAddressRequestBody.cs +ShipEngineSDK/Model/ParseAddressResponseBody.cs +ShipEngineSDK/Model/ParseShipmentRequestBody.cs +ShipEngineSDK/Model/ParseShipmentResponseBody.cs +ShipEngineSDK/Model/PartialAddress.cs +ShipEngineSDK/Model/PartialShipment.cs +ShipEngineSDK/Model/PartialShippingAddress.cs +ShipEngineSDK/Model/PartialShippingAddressTo.cs +ShipEngineSDK/Model/PartialShippingAddressToGeolocationInner.cs +ShipEngineSDK/Model/PaymentAmount.cs +ShipEngineSDK/Model/Pickup.cs +ShipEngineSDK/Model/PickupResponseBody.cs +ShipEngineSDK/Model/PickupWindow.cs +ShipEngineSDK/Model/PickupWindows.cs +ShipEngineSDK/Model/ProcessBatchRequestBody.cs +ShipEngineSDK/Model/Products.cs +ShipEngineSDK/Model/PurchaseLabelWithoutShipment.cs +ShipEngineSDK/Model/Rate.cs +ShipEngineSDK/Model/RateEstimate.cs +ShipEngineSDK/Model/RateEstimateByCarrierId.cs +ShipEngineSDK/Model/RateEstimateByCarrierIds.cs +ShipEngineSDK/Model/RateEstimateOptions.cs +ShipEngineSDK/Model/RateRequestBody.cs +ShipEngineSDK/Model/RateRequestByShipmentIds.cs +ShipEngineSDK/Model/RateRequestByShipments.cs +ShipEngineSDK/Model/RateRequestOptions.cs +ShipEngineSDK/Model/RateRequestRateOptions.cs +ShipEngineSDK/Model/RateResponse.cs +ShipEngineSDK/Model/RateResponseStatus.cs +ShipEngineSDK/Model/RateType.cs +ShipEngineSDK/Model/RatesInformation.cs +ShipEngineSDK/Model/ReasonCode.cs +ShipEngineSDK/Model/RecognizedEntity.cs +ShipEngineSDK/Model/Redirect.cs +ShipEngineSDK/Model/RegulationLevel.cs +ShipEngineSDK/Model/RemoveFromBatchRequestBody.cs +ShipEngineSDK/Model/ResponseMessage.cs +ShipEngineSDK/Model/SchedulePickupRequestBody.cs +ShipEngineSDK/Model/SchedulePickupResponseBody.cs +ShipEngineSDK/Model/Service.cs +ShipEngineSDK/Model/Shipment.cs +ShipEngineSDK/Model/ShipmentIdRequest.cs +ShipEngineSDK/Model/ShipmentItem.cs +ShipEngineSDK/Model/ShipmentRequest.cs +ShipEngineSDK/Model/ShipmentStatus.cs +ShipEngineSDK/Model/ShipmentsSortBy.cs +ShipEngineSDK/Model/ShippingAddress.cs +ShipEngineSDK/Model/ShippingAddressTo.cs +ShipEngineSDK/Model/SmartPostHub.cs +ShipEngineSDK/Model/SortDir.cs +ShipEngineSDK/Model/StatusCode.cs +ShipEngineSDK/Model/Tag.cs +ShipEngineSDK/Model/TagShipmentResponseBody.cs +ShipEngineSDK/Model/TaxIdentifier.cs +ShipEngineSDK/Model/TaxableEntityType.cs +ShipEngineSDK/Model/TokensGetEphemeralTokenResponseBodyYaml.cs +ShipEngineSDK/Model/TrackEvent.cs +ShipEngineSDK/Model/TrackingInformation.cs +ShipEngineSDK/Model/TrackingStatus.cs +ShipEngineSDK/Model/TransportMean.cs +ShipEngineSDK/Model/UpdateAccountSettingsImageRequestBody.cs +ShipEngineSDK/Model/UpdateAmazonBuyShippingRequestBody.cs +ShipEngineSDK/Model/UpdateCarrierSettingsRequestBody.cs +ShipEngineSDK/Model/UpdateDhlExpressSettingsRequestBody.cs +ShipEngineSDK/Model/UpdateFedexSettingsRequestBody.cs +ShipEngineSDK/Model/UpdateNewgisticsSettingsRequestBody.cs +ShipEngineSDK/Model/UpdatePackageTypeRequestBody.cs +ShipEngineSDK/Model/UpdateShipmentFields.cs +ShipEngineSDK/Model/UpdateShipmentRequestBody.cs +ShipEngineSDK/Model/UpdateShipmentResponseBody.cs +ShipEngineSDK/Model/UpdateShipmentsTags.cs +ShipEngineSDK/Model/UpdateShipmentsTagsRequestBody.cs +ShipEngineSDK/Model/UpdateShipmentsTagsShipmentsTagsInner.cs +ShipEngineSDK/Model/UpdateUpsSettingsRequestBody.cs +ShipEngineSDK/Model/UpdateWarehouseRequestBody.cs +ShipEngineSDK/Model/UpdateWarehouseSettingsRequestBody.cs +ShipEngineSDK/Model/UpdateWebhookRequestBody.cs +ShipEngineSDK/Model/UpsAccountSettings.cs +ShipEngineSDK/Model/UpsInvoice.cs +ShipEngineSDK/Model/UpsPickupType.cs +ShipEngineSDK/Model/UpsSettingsResponseBody.cs +ShipEngineSDK/Model/ValidateAddress.cs +ShipEngineSDK/Model/ValidateShipmentFields.cs +ShipEngineSDK/Model/ValidationStatus.cs +ShipEngineSDK/Model/VoidLabelResponseBody.cs +ShipEngineSDK/Model/Warehouse.cs +ShipEngineSDK/Model/Webhook.cs +ShipEngineSDK/Model/WebhookEvent.cs +ShipEngineSDK/Model/WebhookHeader.cs +ShipEngineSDK/Model/Weight.cs +ShipEngineSDK/Model/WeightUnit.cs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 00000000..1985849f --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.7.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c6ba005..b5c12baa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,4 +144,10 @@ Impoved handling of unexpected HTTP responses ### Changed -Updated nuget package dependencies \ No newline at end of file +Updated nuget package dependencies + +## 2.1.0 + +### Added + +- Created new SDK methods for the entire API that sit next to the pre-existing methods. The pre-existing methods will be deprecated eventually. diff --git a/README.md b/README.md index 00aa75be..b018e03e 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,9 @@ To build the project locally on your computer: ### 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 and models, but not docs or tests. + The templates for autogeneration were extracted using the command: ```bash npx @openapitools/openapi-generator-cli author template -g csharp -o generation/templates @@ -80,7 +83,7 @@ npx @openapitools/openapi-generator-cli author template -g csharp -o generation/ ## Release Create a [fork](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) for your changes. -Update the [Changelog](./CHANGELOG.md) with any relevant new features or bug fixes. +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 `ShipEngine.csproj` file, update to the desired version (using [semantic versioning](https://semver.org/)) and push to your fork. diff --git a/ShipEngine/PublicAPI.Unshipped.txt b/ShipEngine/PublicAPI.Unshipped.txt deleted file mode 100644 index 5f282702..00000000 --- a/ShipEngine/PublicAPI.Unshipped.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/ShipEngineSDK.Test/ClientUtilsTests.cs b/ShipEngineSDK.Test/ClientUtilsTests.cs new file mode 100644 index 00000000..c66d3ef8 --- /dev/null +++ b/ShipEngineSDK.Test/ClientUtilsTests.cs @@ -0,0 +1,129 @@ +using ShipEngineSDK; +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Xunit; + +namespace ShipEngineTest +{ + public class ClientUtilsTests + { + public class ParameterToMultiMap + { + [Fact] + public void WithCollectionAndMultiFormat_ShouldReturnCorrectMultimap() + { + var collection = new List { "value1", "value2" }; + var expected = new Multimap { { "key", "value1" }, { "key", "value2" } }; + + var result = ClientUtils.ParameterToMultiMap("multi", "key", collection); + + Assert.Equal(expected, result); + } + + + [Fact] + public void WithSingleValue_ShouldReturnMultimap() + { + var result = ClientUtils.ParameterToMultiMap("", "key", "value"); + Assert.Single(result); + Assert.Contains("key", result.Keys); + Assert.Contains("value", result["key"]); + } + + [Fact] + public void TestDictionaryWithDefaultFormat() + { + var dictionary = new Dictionary { { "key1", "value1" }, { "key2", "value2" } }; + var result = ClientUtils.ParameterToMultiMap("", "", dictionary); + Assert.Equal(dictionary.Count, result.Count); + foreach (var kvp in dictionary) + { + Assert.Contains(kvp.Key, result.Keys); + Assert.Contains(kvp.Value, result[kvp.Key]); + } + } + + [Fact] + public void WithDeepObject_ShouldReturnMultimap() + { + var dictionary = new Dictionary { { "key1", "value1" }, { "key2", "value2" } }; + var result = ClientUtils.ParameterToMultiMap("deepObject", "obj", dictionary); + foreach (var kvp in dictionary) + { + var expectedKey = $"obj[{kvp.Key}]"; + Assert.Contains(expectedKey, result.Keys); + Assert.Contains(kvp.Value, result[expectedKey]); + } + } + + [Fact] + public void WithUnsupportedCollectionFormat_ShouldReturnMultimap() + { + var collection = new List { "value1", "value2" }; + var result = ClientUtils.ParameterToMultiMap("csv", "key", collection); + Assert.Single(result); + Assert.Contains("key", result.Keys); + } + } + + public class ParameterToString + { + public enum TestEnum + { + [EnumMember(Value = "TestValue")] + WithAttribute, + WithoutAttribute + } + + [Fact] + public void WithDateTime_ShouldReturnIso8601String() + { + var dateTime = new DateTime(2020, 1, 1, 12, 0, 0, DateTimeKind.Utc); + var result = ClientUtils.ParameterToString(dateTime); + Assert.Equal("2020-01-01T12:00:00.0000000Z", result); + } + + [Fact] + public void WithDateTimeOffset_ShouldReturnIso8601String() + { + var testDateTimeOffset = new DateTimeOffset(2020, 1, 1, 12, 0, 0, TimeSpan.Zero); + string result = ClientUtils.ParameterToString(testDateTimeOffset); + Assert.Equal("2020-01-01T12:00:00.0000000+00:00", result); + } + + [Theory] + [InlineData(true, "true")] + [InlineData(false, "false")] + public void WithBoolean_ShouldReturnBooleanString(bool value, string expected) + { + string result = ClientUtils.ParameterToString(value); + Assert.Equal(expected, result); + } + + [Fact] + public void WithCollectionOfStrings_ShouldReturnCommaSeparatedList() + { + var testList = new List { "one", "two", "three" }; + string result = ClientUtils.ParameterToString(testList); + Assert.Equal("one,two,three", result); + } + + [Theory] + [InlineData(TestEnum.WithAttribute, "TestValue")] + [InlineData(TestEnum.WithoutAttribute, "WithoutAttribute")] + public void WithEnum_ShouldReturnAttributeOrName(TestEnum value, string expected) + { + string result = ClientUtils.ParameterToString(value); + Assert.Equal(expected, result); + } + + [Fact] + public void WithNull_ShouldReturnEmptyString() + { + string result = ClientUtils.ParameterToString(null); + Assert.Empty(result); + } + } + } +} \ No newline at end of file diff --git a/ShipEngine.Tests/ConfigTest.cs b/ShipEngineSDK.Test/ConfigTest.cs similarity index 100% rename from ShipEngine.Tests/ConfigTest.cs rename to ShipEngineSDK.Test/ConfigTest.cs diff --git a/ShipEngine.Tests/Helpers/MockShipEngineFixture.cs b/ShipEngineSDK.Test/Helpers/MockShipEngineFixture.cs similarity index 100% rename from ShipEngine.Tests/Helpers/MockShipEngineFixture.cs rename to ShipEngineSDK.Test/Helpers/MockShipEngineFixture.cs diff --git a/ShipEngine.Tests/Helpers/TestUtils.cs b/ShipEngineSDK.Test/Helpers/TestUtils.cs similarity index 100% rename from ShipEngine.Tests/Helpers/TestUtils.cs rename to ShipEngineSDK.Test/Helpers/TestUtils.cs diff --git a/ShipEngine.Tests/HttpResponseMocks/BadRequest400Response.json b/ShipEngineSDK.Test/HttpResponseMocks/BadRequest400Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/BadRequest400Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/BadRequest400Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/CreateLabelFromRate200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/CreateLabelFromRate200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/CreateLabelFromRate200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/CreateLabelFromRate200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/CreateLabelFromShipmentDetails200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/CreateLabelFromShipmentDetails200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/CreateLabelFromShipmentDetails200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/CreateLabelFromShipmentDetails200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/CreateManifest200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/CreateManifest200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/CreateManifest200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/CreateManifest200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/GetRatesWithShipmentDetails200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/GetRatesWithShipmentDetails200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/GetRatesWithShipmentDetails200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/GetRatesWithShipmentDetails200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/GetRatesWithShipmentDetailsMissingErrorCodeEnum200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/GetRatesWithShipmentDetailsMissingErrorCodeEnum200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/GetRatesWithShipmentDetailsMissingErrorCodeEnum200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/GetRatesWithShipmentDetailsMissingErrorCodeEnum200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/ListCarriers200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/ListCarriers200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/ListCarriers200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/ListCarriers200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/RateLimited429Response.json b/ShipEngineSDK.Test/HttpResponseMocks/RateLimited429Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/RateLimited429Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/RateLimited429Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/TrackUsingCarrierCodeAndTrackingNumber200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/TrackUsingCarrierCodeAndTrackingNumber200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/TrackUsingCarrierCodeAndTrackingNumber200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/TrackUsingCarrierCodeAndTrackingNumber200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/TrackUsingLabelId200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/TrackUsingLabelId200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/TrackUsingLabelId200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/TrackUsingLabelId200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/ValidateCommercialAddresses200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/ValidateCommercialAddresses200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/ValidateCommercialAddresses200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/ValidateCommercialAddresses200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/ValidateResidentialAddresses200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/ValidateResidentialAddresses200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/ValidateResidentialAddresses200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/ValidateResidentialAddresses200Response.json diff --git a/ShipEngine.Tests/HttpResponseMocks/VoidLabelWithLabelId200Response.json b/ShipEngineSDK.Test/HttpResponseMocks/VoidLabelWithLabelId200Response.json similarity index 100% rename from ShipEngine.Tests/HttpResponseMocks/VoidLabelWithLabelId200Response.json rename to ShipEngineSDK.Test/HttpResponseMocks/VoidLabelWithLabelId200Response.json diff --git a/ShipEngineSDK.Test/MultimapTests.cs b/ShipEngineSDK.Test/MultimapTests.cs new file mode 100644 index 00000000..becfb958 --- /dev/null +++ b/ShipEngineSDK.Test/MultimapTests.cs @@ -0,0 +1,181 @@ +using ShipEngineSDK; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace ShipEngineTest +{ + public class MultimapTests + { + public class AddWithKeyAndValue + { + [Fact] + public void ShouldAddNewEntry_WhenKeyDoesNotExist() + { + var map = new Multimap(); + map.Add("foo", "a"); + + Assert.Single(map["foo"]); + Assert.Contains("a", map["foo"]); + } + + [Fact] + public void ShouldUpdateExistingEntry_WhenEntryAlreadyExists() + { + var map = new Multimap(); + map.Add("foo", "a"); + map.Add("foo", "b"); + + Assert.Equal(2, map["foo"].Count); + Assert.Contains("a", map["foo"]); + Assert.Contains("b", map["foo"]); + } + + [Fact] + public void ShouldAddNewEntry_WhenKeysAreDifferent() + { + var map = new Multimap(); + map.Add("foo", "a"); + map.Add("bar", "b"); + + Assert.Single(map["foo"]); + Assert.Contains("a", map["foo"]); + Assert.Single(map["bar"]); + Assert.Contains("b", map["bar"]); + } + + [Fact] + public void ShouldNotAddEntry_WhenValueIsNull() + { + var map = new Multimap(); + map.Add("foo", (string)null); + Assert.Empty(map); + } + } + + public class AddWithKeyAndList + { + [Fact] + public void ShouldAddNewEntry_WhenKeyDoesNotExist() + { + var map = new Multimap(); + map.Add("foo", new List { "a", "b" }); + + Assert.Equal(2, map["foo"].Count); + Assert.Contains("a", map["foo"]); + Assert.Contains("b", map["foo"]); + } + + [Fact] + public void ShouldUpdateExistingEntry_WhenEntryAlreadyExists() + { + var map = new Multimap(); + map.Add("foo", new List { "a" }); + map.Add("foo", new List { "b" }); + + Assert.Equal(2, map["foo"].Count); + Assert.Contains("a", map["foo"]); + Assert.Contains("b", map["foo"]); + } + + [Fact] + public void ShouldAddNewEntry_WhenKeysAreDifferent() + { + var map = new Multimap(); + map.Add("foo", new List { "a" }); + map.Add("bar", new List { "b" }); + + Assert.Single(map["foo"]); + Assert.Contains("a", map["foo"]); + Assert.Single(map["bar"]); + Assert.Contains("b", map["bar"]); + } + + [Fact] + public void ShouldNotAddEntry_WhenValueIsEmpty() + { + var map = new Multimap(); + map.Add("foo", Enumerable.Empty().ToList()); + Assert.Empty(map); + } + } + + public class AddWithKeyValuePair + { + [Fact] + public void ShouldAddNewEntry_WhenKeyDoesNotExist() + { + var map = new Multimap(); + map.Add(new KeyValuePair>("foo", new List { "a", "b" })); + + Assert.Equal(2, map["foo"].Count); + Assert.Contains("a", map["foo"]); + Assert.Contains("b", map["foo"]); + } + + [Fact] + public void ShouldUpdateExistingEntry_WhenEntryAlreadyExists() + { + var map = new Multimap(); + map.Add(new KeyValuePair>("foo", new List { "a" })); + map.Add(new KeyValuePair>("foo", new List { "b" })); + + Assert.Equal(2, map["foo"].Count); + Assert.Contains("a", map["foo"]); + Assert.Contains("b", map["foo"]); + } + + [Fact] + public void ShouldAddNewEntry_WhenKeysAreDifferent() + { + var map = new Multimap(); + map.Add(new KeyValuePair>("foo", new List { "a" })); + map.Add(new KeyValuePair>("bar", new List { "b" })); + + Assert.Single(map["foo"]); + Assert.Contains("a", map["foo"]); + Assert.Single(map["bar"]); + Assert.Contains("b", map["bar"]); + } + } + + public class AddWithMultimap + { + [Fact] + public void ShouldAddNewEntry_WhenKeyDoesNotExist() + { + var map = new Multimap(); + map.Add(new Multimap { { "foo", new List { "a", "b" } } }); + + Assert.Equal(2, map["foo"].Count); + Assert.Contains("a", map["foo"]); + Assert.Contains("b", map["foo"]); + } + + [Fact] + public void ShouldUpdateExistingEntry_WhenEntryAlreadyExists() + { + var map = new Multimap(); + map.Add(new Multimap { { "foo", new List { "a" } } }); + map.Add(new Multimap { { "foo", new List { "b" } } }); + + Assert.Equal(2, map["foo"].Count); + Assert.Contains("a", map["foo"]); + Assert.Contains("b", map["foo"]); + } + + [Fact] + public void ShouldAddNewEntry_WhenKeysAreDifferent() + { + var map = new Multimap(); + map.Add(new Multimap { { "foo", new List { "a" } } }); + map.Add(new Multimap { { "bar", new List { "b" } } }); + + Assert.Single(map["foo"]); + Assert.Contains("a", map["foo"]); + Assert.Single(map["bar"]); + Assert.Contains("b", map["bar"]); + } + } + } +} \ No newline at end of file diff --git a/ShipEngine.Tests/NetworkTimeoutsTest.cs b/ShipEngineSDK.Test/NetworkTimeoutsTest.cs similarity index 99% rename from ShipEngine.Tests/NetworkTimeoutsTest.cs rename to ShipEngineSDK.Test/NetworkTimeoutsTest.cs index 78014bd5..dca31ec1 100644 --- a/ShipEngine.Tests/NetworkTimeoutsTest.cs +++ b/ShipEngineSDK.Test/NetworkTimeoutsTest.cs @@ -1,5 +1,6 @@ using Moq.Protected; using ShipEngineSDK; +using ShipEngineSDK.Enums; using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/ShipEngineSDK.Test/RequestOptionsTests.cs b/ShipEngineSDK.Test/RequestOptionsTests.cs new file mode 100644 index 00000000..9dc6f314 --- /dev/null +++ b/ShipEngineSDK.Test/RequestOptionsTests.cs @@ -0,0 +1,49 @@ +using ShipEngineSDK; +using Xunit; + +namespace ShipEngineTest +{ + public class RequestOptionsTests + { + [Fact] + public void FullPathReturnsPathWhenThereAreNoParameters() + { + var result = new RequestOptions("/v1/foo"); + Assert.Equal("/v1/foo", result.FullPath()); + } + + [Fact] + public void FullPathReturnsPathWithParametersReplaced() + { + var result = new RequestOptions("/v1/foo/{id}"); + result.PathParameters.Add("id", "se-12345"); + Assert.Equal("/v1/foo/se-12345", result.FullPath()); + } + + [Fact] + public void FullPathReturnsPathWithParametersReplacedAndEscaped() + { + var result = new RequestOptions("/v1/foo/{id}"); + result.PathParameters.Add("id", "foo bar"); + Assert.Equal("/v1/foo/foo%20bar", result.FullPath()); + } + + [Fact] + public void FullPathReturnsQueryParameters() + { + var result = new RequestOptions("/v1/foo"); + result.QueryParameters.Add("bar", "test-value"); + result.QueryParameters.Add("other", "1"); + Assert.Equal("/v1/foo?bar=test-value&other=1", result.FullPath()); + } + + [Fact] + public void FullPathReturnsEscapedQueryParameters() + { + var result = new RequestOptions("/v1/foo"); + result.QueryParameters.Add("bar", "1&2"); + result.QueryParameters.Add("other", "1"); + Assert.Equal("/v1/foo?bar=1%262&other=1", result.FullPath()); + } + } +} \ No newline at end of file diff --git a/ShipEngine.Tests/ShipEngineClientTests.cs b/ShipEngineSDK.Test/ShipEngineClientTests.cs similarity index 98% rename from ShipEngine.Tests/ShipEngineClientTests.cs rename to ShipEngineSDK.Test/ShipEngineClientTests.cs index 587705cf..28e26a22 100644 --- a/ShipEngine.Tests/ShipEngineClientTests.cs +++ b/ShipEngineSDK.Test/ShipEngineClientTests.cs @@ -1,6 +1,7 @@ namespace ShipEngineTest { using ShipEngineSDK; + using ShipEngineSDK.Enums; using ShipEngineSDK.VoidLabelWithLabelId; using System; using System.Linq; @@ -120,7 +121,7 @@ public async Task FailureStatusWithoutShipEngineDetailsThrowsShipEngineException ); Assert.NotNull(ex.ResponseMessage); - Assert.Equal(404, (int) ex.ResponseMessage.StatusCode); + Assert.Equal(404, (int)ex.ResponseMessage.StatusCode); Assert.Equal(requestId, ex.RequestId); } @@ -140,7 +141,7 @@ public async Task FailureStatusWithoutJsonContentThrowsShipEngineExceptionWithOr ); Assert.NotNull(ex.ResponseMessage); - Assert.Equal(502, (int) ex.ResponseMessage.StatusCode); + Assert.Equal(502, (int)ex.ResponseMessage.StatusCode); Assert.Equal(requestId, ex.RequestId); } diff --git a/ShipEngine.Tests/ShipEngineMethodTests/CreateLabelFromRateTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromRateTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/CreateLabelFromRateTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromRateTest.cs index b7d05ec5..c8480760 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/CreateLabelFromRateTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromRateTest.cs @@ -2,6 +2,7 @@ using ShipEngineSDK; using ShipEngineSDK.Common.Enums; using ShipEngineSDK.CreateLabelFromRate; +using ShipEngineSDK.Enums; using System; using System.IO; using System.Net.Http; diff --git a/ShipEngine.Tests/ShipEngineMethodTests/CreateLabelFromShipmentDetailsTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromShipmentDetailsTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/CreateLabelFromShipmentDetailsTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromShipmentDetailsTest.cs index d810f87a..4ef312a9 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/CreateLabelFromShipmentDetailsTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/CreateLabelFromShipmentDetailsTest.cs @@ -3,6 +3,7 @@ using ShipEngineSDK.Common; using ShipEngineSDK.Common.Enums; using ShipEngineSDK.CreateLabelFromShipmentDetails; +using ShipEngineSDK.Enums; using System; using System.Collections.Generic; using System.IO; diff --git a/ShipEngine.Tests/ShipEngineMethodTests/GetRatesFromShipmentTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/GetRatesFromShipmentTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/GetRatesFromShipmentTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/GetRatesFromShipmentTest.cs index abc2909d..8aad04b0 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/GetRatesFromShipmentTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/GetRatesFromShipmentTest.cs @@ -2,6 +2,7 @@ using ShipEngineSDK; using ShipEngineSDK.Common; using ShipEngineSDK.Common.Enums; +using ShipEngineSDK.Enums; using ShipEngineSDK.GetRatesWithShipmentDetails; using System; using System.Collections.Generic; diff --git a/ShipEngine.Tests/ShipEngineMethodTests/ListCarriersTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/ListCarriersTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/ListCarriersTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/ListCarriersTest.cs index c7337f72..1e05c83d 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/ListCarriersTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/ListCarriersTest.cs @@ -1,5 +1,6 @@ using Moq; using ShipEngineSDK; +using ShipEngineSDK.Enums; using ShipEngineSDK.ListCarriers; using System; using System.IO; diff --git a/ShipEngine.Tests/ShipEngineMethodTests/ManifestsTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/ManifestsTest.cs similarity index 100% rename from ShipEngine.Tests/ShipEngineMethodTests/ManifestsTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/ManifestsTest.cs diff --git a/ShipEngine.Tests/ShipEngineMethodTests/TrackUsingCarrierCodeAndTrackingNumberTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/TrackUsingCarrierCodeAndTrackingNumberTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/TrackUsingCarrierCodeAndTrackingNumberTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/TrackUsingCarrierCodeAndTrackingNumberTest.cs index 88b4613a..42d46d8c 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/TrackUsingCarrierCodeAndTrackingNumberTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/TrackUsingCarrierCodeAndTrackingNumberTest.cs @@ -2,6 +2,7 @@ using Moq.Protected; using ShipEngineSDK; using ShipEngineSDK.Common.Enums; +using ShipEngineSDK.Enums; using ShipEngineSDK.TrackUsingCarrierCodeAndTrackingNumber; using System; using System.IO; diff --git a/ShipEngine.Tests/ShipEngineMethodTests/TrackUsingLabelIdTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/TrackUsingLabelIdTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/TrackUsingLabelIdTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/TrackUsingLabelIdTest.cs index f8df457f..6b99acd0 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/TrackUsingLabelIdTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/TrackUsingLabelIdTest.cs @@ -1,6 +1,7 @@ using Moq; using ShipEngineSDK; using ShipEngineSDK.Common.Enums; +using ShipEngineSDK.Enums; using ShipEngineSDK.TrackUsingLabelId; using System; using System.IO; diff --git a/ShipEngine.Tests/ShipEngineMethodTests/ValidateAddressesTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/ValidateAddressesTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/ValidateAddressesTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/ValidateAddressesTest.cs index 23fa9323..5b2ccc3c 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/ValidateAddressesTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/ValidateAddressesTest.cs @@ -2,6 +2,7 @@ using ShipEngineSDK; using ShipEngineSDK.Common; using ShipEngineSDK.Common.Enums; +using ShipEngineSDK.Enums; using ShipEngineSDK.ValidateAddresses; using System; using System.Collections.Generic; diff --git a/ShipEngine.Tests/ShipEngineMethodTests/VoidLabelWithLabelIdTest.cs b/ShipEngineSDK.Test/ShipEngineMethodTests/VoidLabelWithLabelIdTest.cs similarity index 99% rename from ShipEngine.Tests/ShipEngineMethodTests/VoidLabelWithLabelIdTest.cs rename to ShipEngineSDK.Test/ShipEngineMethodTests/VoidLabelWithLabelIdTest.cs index bd343316..a6c66762 100644 --- a/ShipEngine.Tests/ShipEngineMethodTests/VoidLabelWithLabelIdTest.cs +++ b/ShipEngineSDK.Test/ShipEngineMethodTests/VoidLabelWithLabelIdTest.cs @@ -1,5 +1,6 @@ using Moq; using ShipEngineSDK; +using ShipEngineSDK.Enums; using ShipEngineSDK.VoidLabelWithLabelId; using System; using System.IO; diff --git a/ShipEngine.Tests/ShipEngine.Tests.csproj b/ShipEngineSDK.Test/ShipEngineSDK.Test.csproj similarity index 93% rename from ShipEngine.Tests/ShipEngine.Tests.csproj rename to ShipEngineSDK.Test/ShipEngineSDK.Test.csproj index 29b4347e..be4f5449 100644 --- a/ShipEngine.Tests/ShipEngine.Tests.csproj +++ b/ShipEngineSDK.Test/ShipEngineSDK.Test.csproj @@ -22,7 +22,7 @@ - + diff --git a/ShipEngine.Tests/ShipEngineTests.cs b/ShipEngineSDK.Test/ShipEngineTests.cs similarity index 98% rename from ShipEngine.Tests/ShipEngineTests.cs rename to ShipEngineSDK.Test/ShipEngineTests.cs index 1991c065..86d0fd0a 100644 --- a/ShipEngine.Tests/ShipEngineTests.cs +++ b/ShipEngineSDK.Test/ShipEngineTests.cs @@ -1,4 +1,5 @@ using ShipEngineSDK; +using ShipEngineSDK.Enums; using Xunit; namespace ShipEngineTest diff --git a/ShipEngine.Tests/coverage.runsettings b/ShipEngineSDK.Test/coverage.runsettings similarity index 100% rename from ShipEngine.Tests/coverage.runsettings rename to ShipEngineSDK.Test/coverage.runsettings diff --git a/ShipEngineSDK/Api/AccountApi.cs b/ShipEngineSDK/Api/AccountApi.cs new file mode 100644 index 00000000..82029f36 --- /dev/null +++ b/ShipEngineSDK/Api/AccountApi.cs @@ -0,0 +1,403 @@ +/* + * 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 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(string labelImageId, UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, 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, string labelImageId, UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, 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", ShipEngineSDK.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", ShipEngineSDK.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(string labelImageId, UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, CancellationToken cancellationToken = default) + { + return UpdateAccountSettingsImagesById(_client, labelImageId, updateAccountSettingsImageRequestBody, 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, string labelImageId, UpdateAccountSettingsImageRequestBody updateAccountSettingsImageRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'labelImageId' is set + if (labelImageId == null) + { + throw new ArgumentNullException(nameof(labelImageId)); + } + + // verify the required parameter 'updateAccountSettingsImageRequestBody' is set + if (updateAccountSettingsImageRequestBody == null) + { + throw new ArgumentNullException(nameof(updateAccountSettingsImageRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/account/settings/images/{label_image_id}"); + + requestOptions.PathParameters.Add("label_image_id", ShipEngineSDK.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..385afd1c --- /dev/null +++ b/ShipEngineSDK/Api/AddressesApi.cs @@ -0,0 +1,162 @@ +/* + * 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 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..b5d49c22 --- /dev/null +++ b/ShipEngineSDK/Api/BatchesApi.cs @@ -0,0 +1,752 @@ +/* + * 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 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(string batchId, AddToBatchRequestBody addToBatchRequestBody, 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, string batchId, AddToBatchRequestBody addToBatchRequestBody, 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 + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchErrorsResponseBody) + Task ListBatchErrors(string batchId, int? page, int? pagesize, 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 + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchErrorsResponseBody) + Task ListBatchErrors(HttpClient methodClient, string batchId, 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 + /// (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 the sort order of the query. (optional) + /// Batch Number (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchesResponseBody) + Task ListBatches(BatchStatus? status, int? page, int? pageSize, SortDir? sortDir, string batchNumber, BatchesSortBy? sortBy, 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) + /// 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 the sort order of the query. (optional) + /// Batch Number (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchesResponseBody) + Task ListBatches(HttpClient methodClient, BatchStatus? status, int? page, int? pageSize, SortDir? sortDir, string batchNumber, BatchesSortBy? sortBy, 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(string batchId, ProcessBatchRequestBody processBatchRequestBody, 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, string batchId, ProcessBatchRequestBody processBatchRequestBody, 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(string batchId, RemoveFromBatchRequestBody removeFromBatchRequestBody, 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, string batchId, RemoveFromBatchRequestBody removeFromBatchRequestBody, 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(string batchId, AddToBatchRequestBody addToBatchRequestBody, CancellationToken cancellationToken = default) + { + return AddToBatch(_client, batchId, addToBatchRequestBody, 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, string batchId, AddToBatchRequestBody addToBatchRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'batchId' is set + if (batchId == null) + { + throw new ArgumentNullException(nameof(batchId)); + } + + // verify the required parameter 'addToBatchRequestBody' is set + if (addToBatchRequestBody == null) + { + throw new ArgumentNullException(nameof(addToBatchRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/batches/{batch_id}/add"); + + requestOptions.PathParameters.Add("batch_id", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.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 + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchErrorsResponseBody) + public Task ListBatchErrors(string batchId, int? page = default, int? pagesize = default, CancellationToken cancellationToken = default) + { + return ListBatchErrors(_client, batchId, page, pagesize, 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 + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchErrorsResponseBody) + public async Task ListBatchErrors(HttpClient methodClient, string batchId, int? page = default, int? pagesize = 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", ShipEngineSDK.ClientUtils.ParameterToString(batchId)); // path parameter + if (page != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pagesize != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "pagesize", pagesize)); + } + + 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) + /// 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 the sort order of the query. (optional) + /// Batch Number (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchesResponseBody) + public Task ListBatches(BatchStatus? status = default, int? page = default, int? pageSize = default, SortDir? sortDir = default, string batchNumber = default, BatchesSortBy? sortBy = default, CancellationToken cancellationToken = default) + { + return ListBatches(_client, status, page, pageSize, sortDir, batchNumber, sortBy, 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) + /// 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 the sort order of the query. (optional) + /// Batch Number (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListBatchesResponseBody) + public async Task ListBatches(HttpClient methodClient, BatchStatus? status = default, int? page = default, int? pageSize = default, SortDir? sortDir = default, string batchNumber = default, BatchesSortBy? sortBy = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/batches"); + + if (status != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "status", status)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (sortDir != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "sort_dir", sortDir)); + } + if (batchNumber != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "batch_number", batchNumber)); + } + if (sortBy != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "sort_by", sortBy)); + } + + 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(string batchId, ProcessBatchRequestBody processBatchRequestBody, CancellationToken cancellationToken = default) + { + return ProcessBatch(_client, batchId, processBatchRequestBody, 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, string batchId, ProcessBatchRequestBody processBatchRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'batchId' is set + if (batchId == null) + { + throw new ArgumentNullException(nameof(batchId)); + } + + // verify the required parameter 'processBatchRequestBody' is set + if (processBatchRequestBody == null) + { + throw new ArgumentNullException(nameof(processBatchRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/batches/{batch_id}/process/labels"); + + requestOptions.PathParameters.Add("batch_id", ShipEngineSDK.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(string batchId, RemoveFromBatchRequestBody removeFromBatchRequestBody, CancellationToken cancellationToken = default) + { + return RemoveFromBatch(_client, batchId, removeFromBatchRequestBody, 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, string batchId, RemoveFromBatchRequestBody removeFromBatchRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'batchId' is set + if (batchId == null) + { + throw new ArgumentNullException(nameof(batchId)); + } + + // verify the required parameter 'removeFromBatchRequestBody' is set + if (removeFromBatchRequestBody == null) + { + throw new ArgumentNullException(nameof(removeFromBatchRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/batches/{batch_id}/remove"); + + requestOptions.PathParameters.Add("batch_id", ShipEngineSDK.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", ShipEngineSDK.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..b3dcd874 --- /dev/null +++ b/ShipEngineSDK/Api/CarrierAccountsApi.cs @@ -0,0 +1,319 @@ +/* + * 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 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, string carrierId, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, 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, string carrierId, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, 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 'connectCarrierRequestBody' is set + if (connectCarrierRequestBody == null) + { + throw new ArgumentNullException(nameof(connectCarrierRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/connections/carriers/{carrier_name}"); + + requestOptions.PathParameters.Add("carrier_name", ShipEngineSDK.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 '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", ShipEngineSDK.ClientUtils.ParameterToString(carrierName)); // path parameter + requestOptions.PathParameters.Add("carrier_id", ShipEngineSDK.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 '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", ShipEngineSDK.ClientUtils.ParameterToString(carrierName)); // path parameter + requestOptions.PathParameters.Add("carrier_id", ShipEngineSDK.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, string carrierId, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, CancellationToken cancellationToken = default) + { + return UpdateCarrierSettings(_client, carrierName, carrierId, updateCarrierSettingsRequestBody, 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, string carrierId, UpdateCarrierSettingsRequestBody updateCarrierSettingsRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'carrierId' is set + if (carrierId == null) + { + throw new ArgumentNullException(nameof(carrierId)); + } + + // verify the required parameter 'updateCarrierSettingsRequestBody' is set + if (updateCarrierSettingsRequestBody == null) + { + throw new ArgumentNullException(nameof(updateCarrierSettingsRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/connections/carriers/{carrier_name}/{carrier_id}/settings"); + + requestOptions.PathParameters.Add("carrier_name", ShipEngineSDK.ClientUtils.ParameterToString(carrierName)); // path parameter + requestOptions.PathParameters.Add("carrier_id", ShipEngineSDK.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..b1bdd096 --- /dev/null +++ b/ShipEngineSDK/Api/CarriersApi.cs @@ -0,0 +1,477 @@ +/* + * 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 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(string carrierId, AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, 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, string carrierId, AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, 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(string carrierId, AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, CancellationToken cancellationToken = default) + { + return AddFundsToCarrier(_client, carrierId, addFundsToCarrierRequestBody, 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, string carrierId, AddFundsToCarrierRequestBody addFundsToCarrierRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'carrierId' is set + if (carrierId == null) + { + throw new ArgumentNullException(nameof(carrierId)); + } + + // verify the required parameter 'addFundsToCarrierRequestBody' is set + if (addFundsToCarrierRequestBody == null) + { + throw new ArgumentNullException(nameof(addFundsToCarrierRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/carriers/{carrier_id}/add_funds"); + + requestOptions.PathParameters.Add("carrier_id", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.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..6c24cf09 --- /dev/null +++ b/ShipEngineSDK/Api/DownloadsApi.cs @@ -0,0 +1,137 @@ +/* + * 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 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, string download, int? rotation, 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, string download, int? rotation, 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, string download = default, int? rotation = default, CancellationToken cancellationToken = default) + { + return DownloadFile(_client, subdir, filename, dir, download, rotation, 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, string download = default, int? rotation = 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", ShipEngineSDK.ClientUtils.ParameterToString(subdir)); // path parameter + requestOptions.PathParameters.Add("filename", ShipEngineSDK.ClientUtils.ParameterToString(filename)); // path parameter + requestOptions.PathParameters.Add("dir", ShipEngineSDK.ClientUtils.ParameterToString(dir)); // path parameter + if (download != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "download", download)); + } + if (rotation != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "rotation", rotation)); + } + + 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..482f3360 --- /dev/null +++ b/ShipEngineSDK/Api/InsuranceApi.cs @@ -0,0 +1,266 @@ +/* + * 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 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..59a7cd78 --- /dev/null +++ b/ShipEngineSDK/Api/LabelsApi.cs @@ -0,0 +1,753 @@ +/* + * 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 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(string rateId, CreateLabelFromRateRequestBody createLabelFromRateRequestBody, 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, string rateId, CreateLabelFromRateRequestBody createLabelFromRateRequestBody, 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(string shipmentId, CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, 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, string shipmentId, CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, 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(string labelId, CreateReturnLabelRequestBody createReturnLabelRequestBody, 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, string labelId, CreateReturnLabelRequestBody createReturnLabelRequestBody, 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 are currently in the specified status (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) + /// 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) + /// 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 the sort order of the query. (optional) + /// 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(LabelStatus? labelStatus, string serviceCode, string carrierId, string trackingNumber, string batchId, string rateId, string shipmentId, string warehouseId, DateTime? createdAtStart, DateTime? createdAtEnd, int? page, int? pageSize, SortDir? sortDir, 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 are currently in the specified status (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) + /// 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) + /// 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 the sort order of the query. (optional) + /// 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, LabelStatus? labelStatus, string serviceCode, string carrierId, string trackingNumber, string batchId, string rateId, string shipmentId, string warehouseId, DateTime? createdAtStart, DateTime? createdAtEnd, int? page, int? pageSize, SortDir? sortDir, 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(string rateId, CreateLabelFromRateRequestBody createLabelFromRateRequestBody, CancellationToken cancellationToken = default) + { + return CreateLabelFromRate(_client, rateId, createLabelFromRateRequestBody, 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, string rateId, CreateLabelFromRateRequestBody createLabelFromRateRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'rateId' is set + if (rateId == null) + { + throw new ArgumentNullException(nameof(rateId)); + } + + // verify the required parameter 'createLabelFromRateRequestBody' is set + if (createLabelFromRateRequestBody == null) + { + throw new ArgumentNullException(nameof(createLabelFromRateRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/labels/rates/{rate_id}"); + + requestOptions.PathParameters.Add("rate_id", ShipEngineSDK.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(string shipmentId, CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, CancellationToken cancellationToken = default) + { + return CreateLabelFromShipment(_client, shipmentId, createLabelFromShipmentRequestBody, 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, string shipmentId, CreateLabelFromShipmentRequestBody createLabelFromShipmentRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + // verify the required parameter 'createLabelFromShipmentRequestBody' is set + if (createLabelFromShipmentRequestBody == null) + { + throw new ArgumentNullException(nameof(createLabelFromShipmentRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/labels/shipment/{shipment_id}"); + + requestOptions.PathParameters.Add("shipment_id", ShipEngineSDK.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(string labelId, CreateReturnLabelRequestBody createReturnLabelRequestBody, CancellationToken cancellationToken = default) + { + return CreateReturnLabel(_client, labelId, createReturnLabelRequestBody, 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, string labelId, CreateReturnLabelRequestBody createReturnLabelRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'labelId' is set + if (labelId == null) + { + throw new ArgumentNullException(nameof(labelId)); + } + + // verify the required parameter 'createReturnLabelRequestBody' is set + if (createReturnLabelRequestBody == null) + { + throw new ArgumentNullException(nameof(createReturnLabelRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/labels/{label_id}/return"); + + requestOptions.PathParameters.Add("label_id", ShipEngineSDK.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", ShipEngineSDK.ClientUtils.ParameterToString(externalShipmentId)); // path parameter + if (labelDownloadType != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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", ShipEngineSDK.ClientUtils.ParameterToString(labelId)); // path parameter + if (labelDownloadType != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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", ShipEngineSDK.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 are currently in the specified status (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) + /// 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) + /// 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 the sort order of the query. (optional) + /// 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(LabelStatus? labelStatus = default, string serviceCode = default, string carrierId = default, string trackingNumber = default, string batchId = default, string rateId = default, string shipmentId = default, string warehouseId = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, int? page = default, int? pageSize = default, SortDir? sortDir = default, string sortBy = default, CancellationToken cancellationToken = default) + { + return ListLabels(_client, labelStatus, serviceCode, carrierId, trackingNumber, batchId, rateId, shipmentId, warehouseId, createdAtStart, createdAtEnd, page, pageSize, sortDir, 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 are currently in the specified status (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) + /// 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) + /// 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 the sort order of the query. (optional) + /// 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, LabelStatus? labelStatus = default, string serviceCode = default, string carrierId = default, string trackingNumber = default, string batchId = default, string rateId = default, string shipmentId = default, string warehouseId = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, int? page = default, int? pageSize = default, SortDir? sortDir = default, string sortBy = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/labels"); + + if (labelStatus != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "label_status", labelStatus)); + } + if (serviceCode != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "service_code", serviceCode)); + } + if (carrierId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "carrier_id", carrierId)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "tracking_number", trackingNumber)); + } + if (batchId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "batch_id", batchId)); + } + if (rateId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "rate_id", rateId)); + } + if (shipmentId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "shipment_id", shipmentId)); + } + if (warehouseId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "warehouse_id", warehouseId)); + } + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (sortDir != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "sort_dir", sortDir)); + } + if (sortBy != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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", ShipEngineSDK.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..4ff1c6f9 --- /dev/null +++ b/ShipEngineSDK/Api/ManifestsApi.cs @@ -0,0 +1,349 @@ +/* + * 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 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 + /// Warehouse ID (optional) + /// 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) + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + Task ListManifests(string warehouseId, DateTime? shipDateStart, DateTime? shipDateEnd, DateTime? createdAtStart, DateTime? createdAtEnd, string carrierId, int? page, int? pageSize, List labelIds, 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 + /// Warehouse ID (optional) + /// 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) + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + Task ListManifests(HttpClient methodClient, string warehouseId, DateTime? shipDateStart, DateTime? shipDateEnd, DateTime? createdAtStart, DateTime? createdAtEnd, string carrierId, int? page, int? pageSize, List labelIds, 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", ShipEngineSDK.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", ShipEngineSDK.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 + /// Warehouse ID (optional) + /// 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) + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + public Task ListManifests(string warehouseId = default, DateTime? shipDateStart = default, DateTime? shipDateEnd = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, string carrierId = default, int? page = default, int? pageSize = default, List labelIds = default, CancellationToken cancellationToken = default) + { + return ListManifests(_client, warehouseId, shipDateStart, shipDateEnd, createdAtStart, createdAtEnd, carrierId, page, pageSize, labelIds, 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 + /// Warehouse ID (optional) + /// 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) + /// 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) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListManifestsResponseBody) + public async Task ListManifests(HttpClient methodClient, string warehouseId = default, DateTime? shipDateStart = default, DateTime? shipDateEnd = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, string carrierId = default, int? page = default, int? pageSize = default, List labelIds = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/manifests"); + + if (warehouseId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "warehouse_id", warehouseId)); + } + if (shipDateStart != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "ship_date_start", shipDateStart)); + } + if (shipDateEnd != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "ship_date_end", shipDateEnd)); + } + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (carrierId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "carrier_id", carrierId)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (labelIds != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("multi", "label_ids", labelIds)); + } + + 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..5e3baf49 --- /dev/null +++ b/ShipEngineSDK/Api/PackagePickupsApi.cs @@ -0,0 +1,325 @@ +/* + * 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 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 + /// Carrier ID (optional) + /// Warehouse ID (optional) + /// 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) + /// 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(string carrierId, string warehouseId, DateTime? createdAtStart, DateTime? createdAtEnd, 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 + /// Carrier ID (optional) + /// Warehouse ID (optional) + /// 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) + /// 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, string carrierId, string warehouseId, DateTime? createdAtStart, DateTime? createdAtEnd, 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", ShipEngineSDK.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", ShipEngineSDK.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 + /// Carrier ID (optional) + /// Warehouse ID (optional) + /// 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) + /// 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(string carrierId = default, string warehouseId = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + return ListScheduledPickups(_client, carrierId, warehouseId, createdAtStart, createdAtEnd, 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 + /// Carrier ID (optional) + /// Warehouse ID (optional) + /// 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) + /// 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, string carrierId = default, string warehouseId = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/pickups"); + + if (carrierId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "carrier_id", carrierId)); + } + if (warehouseId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "warehouse_id", warehouseId)); + } + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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..c39c0d96 --- /dev/null +++ b/ShipEngineSDK/Api/PackageTypesApi.cs @@ -0,0 +1,351 @@ +/* + * 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 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(string packageId, UpdatePackageTypeRequestBody updatePackageTypeRequestBody, 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, string packageId, UpdatePackageTypeRequestBody updatePackageTypeRequestBody, 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", ShipEngineSDK.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", ShipEngineSDK.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(string packageId, UpdatePackageTypeRequestBody updatePackageTypeRequestBody, CancellationToken cancellationToken = default) + { + return UpdatePackageType(_client, packageId, updatePackageTypeRequestBody, 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, string packageId, UpdatePackageTypeRequestBody updatePackageTypeRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'packageId' is set + if (packageId == null) + { + throw new ArgumentNullException(nameof(packageId)); + } + + // verify the required parameter 'updatePackageTypeRequestBody' is set + if (updatePackageTypeRequestBody == null) + { + throw new ArgumentNullException(nameof(updatePackageTypeRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/packages/{package_id}"); + + requestOptions.PathParameters.Add("package_id", ShipEngineSDK.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..1e5d2c64 --- /dev/null +++ b/ShipEngineSDK/Api/RatesApi.cs @@ -0,0 +1,288 @@ +/* + * 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 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", ShipEngineSDK.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..f23c48af --- /dev/null +++ b/ShipEngineSDK/Api/ServicePointsApi.cs @@ -0,0 +1,184 @@ +/* + * 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 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", ShipEngineSDK.ClientUtils.ParameterToString(carrierCode)); // path parameter + requestOptions.PathParameters.Add("country_code", ShipEngineSDK.ClientUtils.ParameterToString(countryCode)); // path parameter + requestOptions.PathParameters.Add("service_point_id", ShipEngineSDK.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..4bfb4094 --- /dev/null +++ b/ShipEngineSDK/Api/ShipmentsApi.cs @@ -0,0 +1,918 @@ +/* + * 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 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, DateTime? 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, DateTime? createdAtStart, CancellationToken cancellationToken = default); + + /// + /// List Shipments Get list of Shipments + /// + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (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) + /// 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) + /// 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) + /// Sales Order ID (optional) + /// Controls the sort order of the query. (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + Task ListShipments(ShipmentStatus? shipmentStatus, string batchId, string tag, DateTime? createdAtStart, DateTime? createdAtEnd, DateTime? modifiedAtStart, DateTime? modifiedAtEnd, int? page, int? pageSize, string salesOrderId, SortDir? sortDir, ShipmentsSortBy? sortBy, 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 + /// (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (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) + /// 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) + /// 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) + /// Sales Order ID (optional) + /// Controls the sort order of the query. (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + Task ListShipments(HttpClient methodClient, ShipmentStatus? shipmentStatus, string batchId, string tag, DateTime? createdAtStart, DateTime? createdAtEnd, DateTime? modifiedAtStart, DateTime? modifiedAtEnd, int? page, int? pageSize, string salesOrderId, SortDir? sortDir, ShipmentsSortBy? sortBy, 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(string shipmentId, UpdateShipmentRequestBody updateShipmentRequestBody, 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, string shipmentId, UpdateShipmentRequestBody updateShipmentRequestBody, 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", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.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, DateTime? 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, DateTime? 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", ShipEngineSDK.ClientUtils.ParameterToString(shipmentId)); // path parameter + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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 + /// (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (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) + /// 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) + /// 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) + /// Sales Order ID (optional) + /// Controls the sort order of the query. (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + public Task ListShipments(ShipmentStatus? shipmentStatus = default, string batchId = default, string tag = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, DateTime? modifiedAtStart = default, DateTime? modifiedAtEnd = default, int? page = default, int? pageSize = default, string salesOrderId = default, SortDir? sortDir = default, ShipmentsSortBy? sortBy = default, CancellationToken cancellationToken = default) + { + return ListShipments(_client, shipmentStatus, batchId, tag, createdAtStart, createdAtEnd, modifiedAtStart, modifiedAtEnd, page, pageSize, salesOrderId, sortDir, sortBy, 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 + /// (optional) + /// Batch ID (optional) + /// Search for shipments based on the custom tag added to the shipment object (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) + /// 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) + /// 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) + /// Sales Order ID (optional) + /// Controls the sort order of the query. (optional) + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListShipmentsResponseBody) + public async Task ListShipments(HttpClient methodClient, ShipmentStatus? shipmentStatus = default, string batchId = default, string tag = default, DateTime? createdAtStart = default, DateTime? createdAtEnd = default, DateTime? modifiedAtStart = default, DateTime? modifiedAtEnd = default, int? page = default, int? pageSize = default, string salesOrderId = default, SortDir? sortDir = default, ShipmentsSortBy? sortBy = default, CancellationToken cancellationToken = default) + { + + RequestOptions requestOptions = new("/v1/shipments"); + + if (shipmentStatus != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "shipment_status", shipmentStatus)); + } + if (batchId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "batch_id", batchId)); + } + if (tag != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "tag", tag)); + } + if (createdAtStart != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_start", createdAtStart)); + } + if (createdAtEnd != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "created_at_end", createdAtEnd)); + } + if (modifiedAtStart != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "modified_at_start", modifiedAtStart)); + } + if (modifiedAtEnd != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "modified_at_end", modifiedAtEnd)); + } + if (page != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (salesOrderId != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "sales_order_id", salesOrderId)); + } + if (sortDir != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "sort_dir", sortDir)); + } + if (sortBy != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "sort_by", sortBy)); + } + + 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", ShipEngineSDK.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", ShipEngineSDK.ClientUtils.ParameterToString(shipmentId)); // path parameter + requestOptions.PathParameters.Add("tag_name", ShipEngineSDK.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", ShipEngineSDK.ClientUtils.ParameterToString(shipmentId)); // path parameter + requestOptions.PathParameters.Add("tag_name", ShipEngineSDK.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(string shipmentId, UpdateShipmentRequestBody updateShipmentRequestBody, CancellationToken cancellationToken = default) + { + return UpdateShipment(_client, shipmentId, updateShipmentRequestBody, 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, string shipmentId, UpdateShipmentRequestBody updateShipmentRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'shipmentId' is set + if (shipmentId == null) + { + throw new ArgumentNullException(nameof(shipmentId)); + } + + // verify the required parameter 'updateShipmentRequestBody' is set + if (updateShipmentRequestBody == null) + { + throw new ArgumentNullException(nameof(updateShipmentRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/shipments/{shipment_id}"); + + requestOptions.PathParameters.Add("shipment_id", ShipEngineSDK.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..c1144fd7 --- /dev/null +++ b/ShipEngineSDK/Api/TagsApi.cs @@ -0,0 +1,288 @@ +/* + * 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 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", ShipEngineSDK.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", ShipEngineSDK.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", ShipEngineSDK.ClientUtils.ParameterToString(tagName)); // path parameter + requestOptions.PathParameters.Add("new_tag_name", ShipEngineSDK.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..0a3c3bfa --- /dev/null +++ b/ShipEngineSDK/Api/TokensApi.cs @@ -0,0 +1,96 @@ +/* + * 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 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(ShipEngineSDK.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..c3e211e4 --- /dev/null +++ b/ShipEngineSDK/Api/TrackingApi.cs @@ -0,0 +1,240 @@ +/* + * 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 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(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "carrier_code", carrierCode)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "carrier_code", carrierCode)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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(ShipEngineSDK.ClientUtils.ParameterToMultiMap("", "carrier_code", carrierCode)); + } + if (trackingNumber != null) + { + requestOptions.QueryParameters.Add(ShipEngineSDK.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..efde33f2 --- /dev/null +++ b/ShipEngineSDK/Api/WarehousesApi.cs @@ -0,0 +1,425 @@ +/* + * 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 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(string warehouseId, UpdateWarehouseRequestBody updateWarehouseRequestBody, 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, string warehouseId, UpdateWarehouseRequestBody updateWarehouseRequestBody, 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(string warehouseId, UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, 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, string warehouseId, UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, 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", ShipEngineSDK.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", ShipEngineSDK.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(string warehouseId, UpdateWarehouseRequestBody updateWarehouseRequestBody, CancellationToken cancellationToken = default) + { + return UpdateWarehouse(_client, warehouseId, updateWarehouseRequestBody, 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, string warehouseId, UpdateWarehouseRequestBody updateWarehouseRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'warehouseId' is set + if (warehouseId == null) + { + throw new ArgumentNullException(nameof(warehouseId)); + } + + // verify the required parameter 'updateWarehouseRequestBody' is set + if (updateWarehouseRequestBody == null) + { + throw new ArgumentNullException(nameof(updateWarehouseRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/warehouses/{warehouse_id}"); + + requestOptions.PathParameters.Add("warehouse_id", ShipEngineSDK.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(string warehouseId, UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, CancellationToken cancellationToken = default) + { + return UpdateWarehouseSettings(_client, warehouseId, updateWarehouseSettingsRequestBody, 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, string warehouseId, UpdateWarehouseSettingsRequestBody updateWarehouseSettingsRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'warehouseId' is set + if (warehouseId == null) + { + throw new ArgumentNullException(nameof(warehouseId)); + } + + // verify the required parameter 'updateWarehouseSettingsRequestBody' is set + if (updateWarehouseSettingsRequestBody == null) + { + throw new ArgumentNullException(nameof(updateWarehouseSettingsRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/warehouses/{warehouse_id}/settings"); + + requestOptions.PathParameters.Add("warehouse_id", ShipEngineSDK.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..501a06e6 --- /dev/null +++ b/ShipEngineSDK/Api/WebhooksApi.cs @@ -0,0 +1,351 @@ +/* + * 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 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(string webhookId, UpdateWebhookRequestBody updateWebhookRequestBody, 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, string webhookId, UpdateWebhookRequestBody updateWebhookRequestBody, 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", ShipEngineSDK.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", ShipEngineSDK.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(string webhookId, UpdateWebhookRequestBody updateWebhookRequestBody, CancellationToken cancellationToken = default) + { + return UpdateWebhook(_client, webhookId, updateWebhookRequestBody, 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, string webhookId, UpdateWebhookRequestBody updateWebhookRequestBody, CancellationToken cancellationToken = default) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + { + throw new ArgumentNullException(nameof(webhookId)); + } + + // verify the required parameter 'updateWebhookRequestBody' is set + if (updateWebhookRequestBody == null) + { + throw new ArgumentNullException(nameof(updateWebhookRequestBody)); + } + + + RequestOptions requestOptions = new("/v1/environment/webhooks/{webhook_id}"); + + requestOptions.PathParameters.Add("webhook_id", ShipEngineSDK.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 new file mode 100644 index 00000000..0ee5539b --- /dev/null +++ b/ShipEngineSDK/ClientUtils.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections; +using System.Globalization; +using System.Linq; +using System.Runtime.Serialization; + +namespace ShipEngineSDK; + +/// +/// Utility functions providing some benefit to API client consumers. +/// +internal static class ClientUtils +{ + private const string DateTimeFormat = "o"; + + /// + /// Convert params to key/value pairs. + /// Use collectionFormat to properly format lists and collections. + /// + /// The swagger-supported collection format, one of: csv, tsv, ssv, pipes, multi + /// Key name. + /// Value object. + /// A multimap of keys with 1..n associated values. + public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) + { + var parameters = new Multimap(); + + switch (value) + { + case ICollection collection when collectionFormat == "multi": + { + foreach (var item in collection) + { + parameters.Add(name, ParameterToString(item)); + } + + break; + } + case IDictionary dictionary when collectionFormat == "deepObject": + { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); + } + + break; + } + case IDictionary dictionary: + { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); + } + + break; + } + default: + parameters.Add(name, ParameterToString(value)); + break; + } + + return parameters; + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// Formatted string. + public static string ParameterToString(object obj) + { + return obj switch + { + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + DateTime dateTime => dateTime.ToString(DateTimeFormat), + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + DateTimeOffset dateTimeOffset => dateTimeOffset.ToString(DateTimeFormat), + bool boolean => boolean ? "true" : "false", + ICollection collection => string.Join(",", collection.OfType().Select(ParameterToString)), + Enum when HasEnumMemberAttrValue(obj) => GetEnumMemberAttrValue(obj), + _ => Convert.ToString(obj, CultureInfo.InvariantCulture) + }; + } + + /// + /// Is the Enum decorated with EnumMember Attribute + /// + /// + /// true if found + private static bool HasEnumMemberAttrValue(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(); + + return attr != null; + } + + /// + /// Get the EnumMember value + /// + /// + /// EnumMember value as string otherwise null + 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; + } +} \ No newline at end of file diff --git a/ShipEngine/Config.cs b/ShipEngineSDK/Config.cs similarity index 98% rename from ShipEngine/Config.cs rename to ShipEngineSDK/Config.cs index 9f813c47..b4b0c39e 100644 --- a/ShipEngine/Config.cs +++ b/ShipEngineSDK/Config.cs @@ -1,3 +1,4 @@ +using ShipEngineSDK.Enums; using System; namespace ShipEngineSDK diff --git a/ShipEngineSDK/DateJsonConverter.cs b/ShipEngineSDK/DateJsonConverter.cs new file mode 100644 index 00000000..c874b5f0 --- /dev/null +++ b/ShipEngineSDK/DateJsonConverter.cs @@ -0,0 +1,17 @@ +namespace ShipEngineSDK; + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +public class DateJsonConverter : JsonConverter +{ + private const string Format = "yyyy-MM-dd"; + + 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)); +} \ No newline at end of file diff --git a/ShipEngine/Enums/ErrorCode.cs b/ShipEngineSDK/Enums/ErrorCode.cs similarity index 99% rename from ShipEngine/Enums/ErrorCode.cs rename to ShipEngineSDK/Enums/ErrorCode.cs index 3ed873da..26062a59 100644 --- a/ShipEngine/Enums/ErrorCode.cs +++ b/ShipEngineSDK/Enums/ErrorCode.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace ShipEngineSDK +namespace ShipEngineSDK.Enums { /// /// Indicates the specific error that occurred. @@ -60,7 +60,7 @@ public enum ErrorCode /// /// When shipping internationally, you must add a customs declaration which outlines the items you are shipping. /// This is helpful to customs agents when your package enters it's destination country. This error arises when you - /// do not add a customs declaration to your shipment before attempting to create a shipping label for an + /// do not add a customs declaration to your shipment before attempting to create a shipping label for an /// international shipment. /// [EnumMember(Value = "customs_items_required")] diff --git a/ShipEngine/Enums/ErrorSource.cs b/ShipEngineSDK/Enums/ErrorSource.cs similarity index 97% rename from ShipEngine/Enums/ErrorSource.cs rename to ShipEngineSDK/Enums/ErrorSource.cs index a485acf8..15481f2f 100644 --- a/ShipEngine/Enums/ErrorSource.cs +++ b/ShipEngineSDK/Enums/ErrorSource.cs @@ -1,4 +1,4 @@ -namespace ShipEngineSDK +namespace ShipEngineSDK.Enums { /// /// The error_source field indicates where the error originated. diff --git a/ShipEngine/Enums/ErrorType.cs b/ShipEngineSDK/Enums/ErrorType.cs similarity index 98% rename from ShipEngine/Enums/ErrorType.cs rename to ShipEngineSDK/Enums/ErrorType.cs index 03ba95b2..cc17f80c 100644 --- a/ShipEngine/Enums/ErrorType.cs +++ b/ShipEngineSDK/Enums/ErrorType.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace ShipEngineSDK +namespace ShipEngineSDK.Enums { /// diff --git a/ShipEngineSDK/HttpMethods.cs b/ShipEngineSDK/HttpMethods.cs new file mode 100644 index 00000000..1358a03d --- /dev/null +++ b/ShipEngineSDK/HttpMethods.cs @@ -0,0 +1,18 @@ +using System.Net.Http; + +namespace ShipEngineSDK; + +/// +/// Http methods +/// +/// +/// This is needed because the HttpMethod class does not have a PATCH method in the version of .NET that we are using. +/// +internal static class HttpMethods +{ + public static HttpMethod Delete => HttpMethod.Delete; + public static HttpMethod Get => HttpMethod.Get; + public static HttpMethod Patch => new("PATCH"); + public static HttpMethod Post => HttpMethod.Post; + public static HttpMethod Put => HttpMethod.Put; +} \ No newline at end of file diff --git a/ShipEngineSDK/Model/AbstractOpenAPISchema.cs b/ShipEngineSDK/Model/AbstractOpenAPISchema.cs new file mode 100644 index 00000000..9371f286 --- /dev/null +++ b/ShipEngineSDK/Model/AbstractOpenAPISchema.cs @@ -0,0 +1,50 @@ +/* + * 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 + }; + + /// + /// 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..7d0adfe6 --- /dev/null +++ b/ShipEngineSDK/Model/AccountSettings.cs @@ -0,0 +1,59 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("default_label_layout")] + public DefaultLabelLayout? DefaultLabelLayout { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AccountSettings {\n"); + sb.Append(" DefaultLabelLayout: ").Append(DefaultLabelLayout).Append("\n"); + 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..6c450d6c --- /dev/null +++ b/ShipEngineSDK/Model/AccountSettingsImages.cs @@ -0,0 +1,172 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _value; + + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + public ImageContentTypeEnum(string 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"); + + + 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 CLOVUS + /// + /// The image type + [JsonPropertyName("image_content_type")] + public ImageContentTypeEnum? ImageContentType { 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. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id")] + public string LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name")] + 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")] + public bool IsDefault { 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")] + 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")] + public DateTime 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")] + public DateTime ModifiedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AccountSettingsImages {\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + 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..ac8c4218 --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToCarrierRequestBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + [JsonRequired] + public string Currency { get; set; } + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount")] + [JsonRequired] + public double Amount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddFundsToCarrierRequestBody {\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + 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..2c73a767 --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToCarrierResponseBody.cs @@ -0,0 +1,62 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("balance")] + [JsonRequired] + public MonetaryValue Balance { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddFundsToCarrierResponseBody {\n"); + sb.Append(" Balance: ").Append(Balance).Append("\n"); + 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..b5ab318c --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToInsuranceRequestBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + [JsonRequired] + public string Currency { get; set; } + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount")] + [JsonRequired] + public double Amount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddFundsToInsuranceRequestBody {\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + 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..61b77b06 --- /dev/null +++ b/ShipEngineSDK/Model/AddFundsToInsuranceResponseBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + [JsonRequired] + public string Currency { get; set; } + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount")] + [JsonRequired] + public double Amount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddFundsToInsuranceResponseBody {\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + 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..ac178568 --- /dev/null +++ b/ShipEngineSDK/Model/AddToBatchRequestBody.cs @@ -0,0 +1,69 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The Shipment Ids to be modified on the batch + /// + /// The Shipment Ids to be modified on the batch + [JsonPropertyName("shipment_ids")] + public List ShipmentIds { get; set; } + + /// + /// Array of Rate IDs to be modifed on the batch + /// + /// Array of Rate IDs to be modifed on the batch + [JsonPropertyName("rate_ids")] + public List RateIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddToBatchRequestBody {\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + 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..7fbe8d11 --- /dev/null +++ b/ShipEngineSDK/Model/Address.cs @@ -0,0 +1,191 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Indicates whether this is a residential address. CLOVUS + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator")] + [JsonRequired] + public AddressResidentialIndicator AddressResidentialIndicator { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + 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")] + [JsonRequired] + public string Phone { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email")] + public string Email { 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")] + public string CompanyName { 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")] + [JsonRequired] + 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")] + 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")] + public string AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality")] + [JsonRequired] + public string CityLocality { 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")] + [JsonRequired] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { 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")] + [JsonRequired] + public string CountryCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Address {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).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(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + 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..bcc94090 --- /dev/null +++ b/ShipEngineSDK/Model/AddressResidentialIndicator.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..3fdd775a --- /dev/null +++ b/ShipEngineSDK/Model/AddressToValidate.cs @@ -0,0 +1,185 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Indicates whether this is a residential address. CLOVUS + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator")] + public AddressResidentialIndicator? AddressResidentialIndicator { 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")] + 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")] + public string Phone { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email")] + public string Email { 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")] + public string CompanyName { 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")] + [JsonRequired] + 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")] + 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")] + public string AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality")] + [JsonRequired] + public string CityLocality { 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")] + [JsonRequired] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + public string PostalCode { 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")] + [JsonRequired] + public string CountryCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddressToValidate {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).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(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + 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..f0e11f7c --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidatingShipment.cs @@ -0,0 +1,301 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// The current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + public ShipmentStatus? ShipmentStatus { get; set; } + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + public DeliveryConfirmation? Confirmation { get; set; } + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + public InsuranceProvider? InsuranceProvider { get; set; } + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + [JsonRequired] + public ShippingAddressTo ShipTo { 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")] + [JsonRequired] + public ShippingAddress ShipFrom { 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")] + public string WarehouseId { 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")] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + public List Tags { 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")] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + 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")] + public string ComparisonRateType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddressValidatingShipment {\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + 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..6d67ec18 --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationCode.cs @@ -0,0 +1,143 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..a3546b44 --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationDetailCode.cs @@ -0,0 +1,413 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..ac59692d --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationMessageType.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..db456746 --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationResult.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public AddressValidationStatus Status { get; set; } = new(); + + + /// + /// The original address that was sent for validation + /// + /// The original address that was sent for validation + [JsonPropertyName("original_address")] + [JsonRequired] + public Address OriginalAddress { get; set; } + + /// + /// The matched address found by the Shipengine API + /// + /// The matched address found by the Shipengine API + [JsonPropertyName("matched_address")] + [JsonRequired] + public Address MatchedAddress { get; set; } + + /// + /// The list of messages that were generated during the address validation request. + /// + /// The list of messages that were generated during the address validation request. + [JsonPropertyName("messages")] + [JsonRequired] + public List Messages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddressValidationResult {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" OriginalAddress: ").Append(OriginalAddress).Append("\n"); + sb.Append(" MatchedAddress: ").Append(MatchedAddress).Append("\n"); + sb.Append(" Messages: ").Append(Messages).Append("\n"); + 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..737ac040 --- /dev/null +++ b/ShipEngineSDK/Model/AddressValidationStatus.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..cebb43be --- /dev/null +++ b/ShipEngineSDK/Model/AdvancedShipmentOptions.cs @@ -0,0 +1,236 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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. CLOVUS + /// + /// 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")] + public BillToParty? BillToParty { get; set; } + /// + /// Gets or Sets OriginType CLOVUS + /// + [JsonPropertyName("origin_type")] + public OriginType? OriginType { 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")] + 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")] + public string BillToCountryCode { 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")] + public string BillToPostalCode { get; set; } + + /// + /// Indicates that the shipment contains alcohol. + /// + /// Indicates that the shipment contains alcohol. + [JsonPropertyName("contains_alcohol")] + public bool ContainsAlcohol { 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")] + public bool DeliveredDutyPaid { get; set; } + + /// + /// Indicates if the shipment contain dry ice + /// + /// Indicates if the shipment contain dry ice + [JsonPropertyName("dry_ice")] + 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")] + public Weight DryIceWeight { 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")] + public bool NonMachinable { get; set; } + + /// + /// Enables Saturday delivery, if supported by the carrier. + /// + /// Enables Saturday delivery, if supported by the carrier. + [JsonPropertyName("saturday_delivery")] + public bool SaturdayDelivery { get; set; } + + /// + /// Gets or Sets FedexFreight + /// + [JsonPropertyName("fedex_freight")] + public AdvancedShipmentOptionsFedexFreight FedexFreight { 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")] + public bool? UseUpsGroundFreightPricing { 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")] + public string FreightClass { 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")] + 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")] + 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")] + public string CustomField3 { get; set; } + + /// + /// Indicate to the carrier that this shipment requires additional handling. + /// + /// Indicate to the carrier that this shipment requires additional handling. + [JsonPropertyName("additional_handling")] + public bool? AdditionalHandling { get; set; } + + /// + /// Gets or Sets ShipperRelease + /// + [JsonPropertyName("shipper_release")] + public bool? ShipperRelease { get; set; } + + /// + /// Gets or Sets CollectOnDelivery + /// + [JsonPropertyName("collect_on_delivery")] + public CollectOnDelivery CollectOnDelivery { 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")] + public bool ThirdPartyConsignee { 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")] + public bool DangerousGoods { get; set; } + + /// + /// Gets or Sets DangerousGoodsContact + /// + [JsonPropertyName("dangerous_goods_contact")] + public AdvancedShipmentOptionsDangerousGoodsContact DangerousGoodsContact { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AdvancedShipmentOptions {\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(" ContainsAlcohol: ").Append(ContainsAlcohol).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(" NonMachinable: ").Append(NonMachinable).Append("\n"); + sb.Append(" SaturdayDelivery: ").Append(SaturdayDelivery).Append("\n"); + sb.Append(" FedexFreight: ").Append(FedexFreight).Append("\n"); + sb.Append(" UseUpsGroundFreightPricing: ").Append(UseUpsGroundFreightPricing).Append("\n"); + sb.Append(" FreightClass: ").Append(FreightClass).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(" OriginType: ").Append(OriginType).Append("\n"); + sb.Append(" AdditionalHandling: ").Append(AdditionalHandling).Append("\n"); + sb.Append(" ShipperRelease: ").Append(ShipperRelease).Append("\n"); + sb.Append(" CollectOnDelivery: ").Append(CollectOnDelivery).Append("\n"); + sb.Append(" ThirdPartyConsignee: ").Append(ThirdPartyConsignee).Append("\n"); + sb.Append(" DangerousGoods: ").Append(DangerousGoods).Append("\n"); + sb.Append(" DangerousGoodsContact: ").Append(DangerousGoodsContact).Append("\n"); + 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..ceb9922b --- /dev/null +++ b/ShipEngineSDK/Model/AdvancedShipmentOptionsDangerousGoodsContact.cs @@ -0,0 +1,69 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string Name { get; set; } + + /// + /// Phone number of the contact + /// + /// Phone number of the contact + [JsonPropertyName("phone")] + public string Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AdvancedShipmentOptionsDangerousGoodsContact {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + 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..6ee2545d --- /dev/null +++ b/ShipEngineSDK/Model/AdvancedShipmentOptionsFedexFreight.cs @@ -0,0 +1,67 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 ShipperLoadAndCount + /// + [JsonPropertyName("shipper_load_and_count")] + public string ShipperLoadAndCount { get; set; } + + /// + /// Gets or Sets BookingConfirmation + /// + [JsonPropertyName("booking_confirmation")] + public string BookingConfirmation { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AdvancedShipmentOptionsFedexFreight {\n"); + sb.Append(" ShipperLoadAndCount: ").Append(ShipperLoadAndCount).Append("\n"); + sb.Append(" BookingConfirmation: ").Append(BookingConfirmation).Append("\n"); + 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..a8bd17b2 --- /dev/null +++ b/ShipEngineSDK/Model/AllowedIncoterms.cs @@ -0,0 +1,154 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..a5cfb608 --- /dev/null +++ b/ShipEngineSDK/Model/AlternativeIdentifier.cs @@ -0,0 +1,75 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string Type { get; set; } + + /// + /// The value of the alternative_identifier. + /// + /// The value of the alternative_identifier. + /// + /// 12345678912345678912 + /// + [JsonPropertyName("value")] + public string Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AlternativeIdentifier {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + 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..39751e11 --- /dev/null +++ b/ShipEngineSDK/Model/AlternativeIdentifiers.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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. + [JsonPropertyName("alternative_identifiers")] + public List VarAlternativeIdentifiers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AlternativeIdentifiers {\n"); + sb.Append(" VarAlternativeIdentifiers: ").Append(VarAlternativeIdentifiers).Append("\n"); + 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..6dfa711e --- /dev/null +++ b/ShipEngineSDK/Model/AncillaryServiceEndorsement.cs @@ -0,0 +1,101 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..8195e9b3 --- /dev/null +++ b/ShipEngineSDK/Model/Batch.cs @@ -0,0 +1,270 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// label layout CLOVUS + /// + /// label layout + [JsonPropertyName("label_layout")] + [JsonRequired] + public LabelLayout LabelLayout { get; set; } = new(); + + + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + [JsonRequired] + public LabelFormat LabelFormat { get; set; } = new(); + + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public BatchStatus Status { get; set; } = new(); + + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id")] + [JsonRequired] + public string BatchId { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + [JsonPropertyName("batch_number")] + [JsonRequired] + public string BatchNumber { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + [JsonPropertyName("external_batch_id")] + [JsonRequired] + public string ExternalBatchId { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes")] + [JsonRequired] + public string BatchNotes { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at")] + [JsonRequired] + public DateTime ProcessedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// 2 + /// + [JsonPropertyName("errors")] + [JsonRequired] + public int Errors { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("process_errors")] + [JsonRequired] + public List ProcessErrors { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// 1 + /// + [JsonPropertyName("warnings")] + [JsonRequired] + public int Warnings { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// 1 + /// + [JsonPropertyName("completed")] + [JsonRequired] + public int Completed { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// 3 + /// + [JsonPropertyName("forms")] + [JsonRequired] + public int Forms { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// 2 + /// + [JsonPropertyName("count")] + [JsonRequired] + public int Count { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url")] + [JsonRequired] + public OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url")] + [JsonRequired] + public OptionalLink BatchLabelsUrl { get; set; } + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + [JsonPropertyName("batch_errors_url")] + [JsonRequired] + public OptionalLink BatchErrorsUrl { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + [JsonPropertyName("label_download")] + [JsonRequired] + public LabelDownload LabelDownload { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + [JsonPropertyName("form_download")] + [JsonRequired] + public OptionalLink 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")] + [JsonRequired] + public PaperlessDownload PaperlessDownload { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Batch {\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + 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..49fc0641 --- /dev/null +++ b/ShipEngineSDK/Model/BatchResponseError.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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. + /// + /// Recipient address has not been verified. + /// + [JsonPropertyName("error")] + public string Error { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + public string ShipmentId { get; set; } + + /// + /// An external shipment id associated with the shipment + /// + /// An external shipment id associated with the shipment + [JsonPropertyName("external_shipment_id")] + public string ExternalShipmentId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BatchResponseError {\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + 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..3ea0b579 --- /dev/null +++ b/ShipEngineSDK/Model/BatchStatus.cs @@ -0,0 +1,113 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..2dc236c7 --- /dev/null +++ b/ShipEngineSDK/Model/BatchesSortBy.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..67fd5fd5 --- /dev/null +++ b/ShipEngineSDK/Model/BillToParty.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..12f62922 --- /dev/null +++ b/ShipEngineSDK/Model/BulkRate.cs @@ -0,0 +1,107 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public RateResponseStatus Status { get; set; } = new(); + + + /// + /// A string that uniquely identifies the rate request + /// + /// A string that uniquely identifies the rate request + /// + /// se-28529731 + /// + [JsonPropertyName("rate_request_id")] + [JsonRequired] + public string RateRequestId { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { 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("created_at")] + [JsonRequired] + public DateTime 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 + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BulkRate {\n"); + sb.Append(" RateRequestId: ").Append(RateRequestId).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..e848a3f1 --- /dev/null +++ b/ShipEngineSDK/Model/CalculateRatesRequestBody.cs @@ -0,0 +1,274 @@ +/* + * 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.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")] + public RateRequestBody RateOptions { get; set; } + + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ShipmentIdRequest. + public CalculateRatesRequestBody(ShipmentIdRequest actualInstance) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 ShipmentRequest. + public CalculateRatesRequestBody(ShipmentRequest actualInstance) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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(ShipmentRequest)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: ShipmentIdRequest, ShipmentRequest"); + } + } + } + + /// + /// 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 `ShipmentRequest`. If the actual instance is not `ShipmentRequest`, + /// the InvalidClassException will be thrown + /// + /// An instance of ShipmentRequest + public ShipmentRequest GetShipmentRequest() + { + return (ShipmentRequest)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 HashSet OneOfTypes = [typeof(ShipmentIdRequest), typeof(ShipmentRequest)]; + private static HashSet MandatoryFields = ["Shipment", "ShipmentId"]; + private static 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; + + int match = 0; + var matchedTypes = new List(); + + try + { + newCalculateRatesRequestBody = new CalculateRatesRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ShipmentIdRequest"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ShipmentIdRequest: {1}", jsonDoc, exception.ToString())); + } + + try + { + newCalculateRatesRequestBody = new CalculateRatesRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ShipmentRequest"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ShipmentRequest: {1}", jsonDoc, exception.ToString())); + } + + 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); + } + + newCalculateRatesRequestBody.RateOptions = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("rate_options"), DeserializingOptions); + + // 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..bb5f107f --- /dev/null +++ b/ShipEngineSDK/Model/CalculateRatesResponseBody.cs @@ -0,0 +1,318 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + [JsonRequired] + public ShipmentStatus ShipmentStatus { get; set; } = new(); + + + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + [JsonRequired] + public DeliveryConfirmation Confirmation { get; set; } = new(); + + + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + [JsonRequired] + public InsuranceProvider InsuranceProvider { get; set; } = new(); + + + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { 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")] + public 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")] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + [JsonRequired] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + public ShippingAddressTo ShipTo { 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")] + public ShippingAddress ShipFrom { 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")] + public string WarehouseId { 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")] + [JsonRequired] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + [JsonRequired] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + [JsonRequired] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + [JsonRequired] + public List Tags { 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")] + [JsonRequired] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + [JsonRequired] + 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")] + public string ComparisonRateType { get; set; } + + /// + /// The rates response + /// + /// The rates response + [JsonPropertyName("rate_response")] + [JsonRequired] + public RatesInformation RateResponse { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CalculateRatesResponseBody {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" RateResponse: ").Append(RateResponse).Append("\n"); + 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..3836f301 --- /dev/null +++ b/ShipEngineSDK/Model/Carrier.cs @@ -0,0 +1,183 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the carrier. + /// + /// A string that uniquely identifies the carrier. + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + public string CarrierId { 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")] + public string CarrierCode { get; set; } + + /// + /// The account number that the carrier is connected to. + /// + /// The account number that the carrier is connected to. + /// + /// account_570827 + /// + [JsonPropertyName("account_number")] + public string AccountNumber { get; set; } + + /// + /// Indicates whether the carrier requires funding to use its services + /// + /// Indicates whether the carrier requires funding to use its services + [JsonPropertyName("requires_funded_amount")] + public bool RequiresFundedAmount { get; set; } + + /// + /// Current available balance + /// + /// Current available balance + /// + /// 3799.52 + /// + [JsonPropertyName("balance")] + public double Balance { get; set; } + + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// ShipEngine Account - Stamps.com + /// + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Screen readable name + /// + /// Screen readable name + /// + /// Stamps.com + /// + [JsonPropertyName("friendly_name")] + public string FriendlyName { 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 + [JsonPropertyName("primary")] + public bool Primary { get; set; } + + /// + /// Carrier supports multiple packages per shipment + /// + /// Carrier supports multiple packages per shipment + [JsonPropertyName("has_multi_package_supporting_services")] + public bool HasMultiPackageSupportingServices { get; set; } + + /// + /// The carrier supports adding custom label messages to an order. + /// + /// The carrier supports adding custom label messages to an order. + [JsonPropertyName("supports_label_messages")] + public bool SupportsLabelMessages { 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. + [JsonPropertyName("disabled_by_billing_plan")] + public bool DisabledByBillingPlan { get; set; } + + /// + /// A list of services that are offered by the carrier + /// + /// A list of services that are offered by the carrier + [JsonPropertyName("services")] + public List Services { get; set; } + + /// + /// A list of package types that are supported by the carrier + /// + /// A list of package types that are supported by the carrier + [JsonPropertyName("packages")] + public List Packages { get; set; } + + /// + /// A list of options that are available to that carrier + /// + /// A list of options that are available to that carrier + [JsonPropertyName("options")] + public List Options { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Carrier {\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" RequiresFundedAmount: ").Append(RequiresFundedAmount).Append("\n"); + sb.Append(" Balance: ").Append(Balance).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" FriendlyName: ").Append(FriendlyName).Append("\n"); + sb.Append(" Primary: ").Append(Primary).Append("\n"); + sb.Append(" HasMultiPackageSupportingServices: ").Append(HasMultiPackageSupportingServices).Append("\n"); + sb.Append(" SupportsLabelMessages: ").Append(SupportsLabelMessages).Append("\n"); + sb.Append(" DisabledByBillingPlan: ").Append(DisabledByBillingPlan).Append("\n"); + sb.Append(" Services: ").Append(Services).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" Options: ").Append(Options).Append("\n"); + 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..40017ad6 --- /dev/null +++ b/ShipEngineSDK/Model/CarrierAdvancedOption.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Name of advanced option + /// + /// Name of advanced option + /// + /// contains_alcohol + /// + [JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// Default value of option + /// + /// Default value of option + /// + /// false + /// + [JsonPropertyName("default_value")] + public string DefaultValue { get; set; } + + /// + /// Description of option + /// + /// Description of option + [JsonPropertyName("description")] + public string Description { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CarrierAdvancedOption {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" DefaultValue: ").Append(DefaultValue).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + 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..27b09555 --- /dev/null +++ b/ShipEngineSDK/Model/CarrierName.cs @@ -0,0 +1,233 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..fe9dce94 --- /dev/null +++ b/ShipEngineSDK/Model/CarrierNameWithSettings.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..49446865 --- /dev/null +++ b/ShipEngineSDK/Model/CollectOnDelivery.cs @@ -0,0 +1,66 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 PaymentType CLOVUS + /// + [JsonPropertyName("payment_type")] + public CollectOnDeliveryPaymentType? PaymentType { get; set; } + /// + /// Gets or Sets PaymentAmount + /// + [JsonPropertyName("payment_amount")] + public PaymentAmount PaymentAmount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CollectOnDelivery {\n"); + sb.Append(" PaymentType: ").Append(PaymentType).Append("\n"); + sb.Append(" PaymentAmount: ").Append(PaymentAmount).Append("\n"); + 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..9929b535 --- /dev/null +++ b/ShipEngineSDK/Model/CollectOnDeliveryPaymentType.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..bb2913cd --- /dev/null +++ b/ShipEngineSDK/Model/CompareBulkRatesRequestBody.cs @@ -0,0 +1,275 @@ +/* + * 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.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")] + [JsonRequired] + public RateRequestBody RateOptions { get; set; } + + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RateRequestByShipmentIds. + public CompareBulkRatesRequestBody(RateRequestByShipmentIds actualInstance) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 HashSet OneOfTypes = [typeof(RateRequestByShipmentIds), typeof(RateRequestByShipments)]; + private static HashSet MandatoryFields = ["RateOptions"]; + private static 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; + + int match = 0; + var matchedTypes = new List(); + + try + { + newCompareBulkRatesRequestBody = new CompareBulkRatesRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("RateRequestByShipmentIds"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RateRequestByShipmentIds: {1}", jsonDoc, exception.ToString())); + } + + try + { + newCompareBulkRatesRequestBody = new CompareBulkRatesRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("RateRequestByShipments"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RateRequestByShipments: {1}", jsonDoc, exception.ToString())); + } + + 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); + } + + newCompareBulkRatesRequestBody.RateOptions = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("rate_options"), DeserializingOptions); + + // 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..d7109fa1 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAccessWorldwideRequestBody.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Access Worldwide Username + /// + /// Access Worldwide Username + [JsonPropertyName("username")] + [JsonRequired] + public string Username { get; set; } + + /// + /// Access Worldwide Password + /// + /// Access Worldwide Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectAccessWorldwideRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + 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..e452c93b --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAmazonBuyShippingRequestBody.cs @@ -0,0 +1,93 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname to be associated with the account connection + /// + /// Nickname to be associated with the account connection + /// + /// Test Amazon Buy Shipping + /// + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Gets or Sets MerchantSellerId + /// + [JsonPropertyName("merchant_seller_id")] + [JsonRequired] + public string MerchantSellerId { get; set; } + + /// + /// Gets or Sets MwsAuthToken + /// + [JsonPropertyName("mws_auth_token")] + [JsonRequired] + public string MwsAuthToken { get; set; } + + /// + /// An email address. + /// + /// An email address. + /// + /// john.doe@example.com + /// + [JsonPropertyName("email")] + [JsonRequired] + public string Email { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectAmazonBuyShippingRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" MerchantSellerId: ").Append(MerchantSellerId).Append("\n"); + sb.Append(" MwsAuthToken: ").Append(MwsAuthToken).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + 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..04879a9f --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAmazonShippingUk.cs @@ -0,0 +1,74 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The nickname associated with the carrier connection + /// + /// The nickname associated with the carrier connection + /// + /// Stamps.com + /// + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Amazon UK Shipping auth code. + /// + /// Amazon UK Shipping auth code. + [JsonPropertyName("auth_code")] + [JsonRequired] + public string AuthCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectAmazonShippingUk {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); + 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..71eef843 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectApcRequestBody.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// The username for the APC account + /// + /// The username for the APC account + /// + /// john_doe + /// + [JsonPropertyName("username")] + [JsonRequired] + public string Username { get; set; } + + /// + /// The password for the APC account + /// + /// The password for the APC account + /// + /// 12345 + /// + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectApcRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + 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..d53c35a6 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAsendiaRequestBody.cs @@ -0,0 +1,92 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The nickname of the Asendia account + /// + /// The nickname of the Asendia account + /// + /// Asendia account + /// + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Asendia account number + /// + /// Asendia account number + [JsonPropertyName("account_number")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// FTP username + /// + /// FTP username + [JsonPropertyName("ftp_username")] + [JsonRequired] + public string FtpUsername { get; set; } + + /// + /// FTP password + /// + /// FTP password + [JsonPropertyName("ftp_password")] + [JsonRequired] + public string FtpPassword { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectAsendiaRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FtpUsername: ").Append(FtpUsername).Append("\n"); + sb.Append(" FtpPassword: ").Append(FtpPassword).Append("\n"); + 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..d82798e8 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectAustraliaPostRequestBody.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// API key + /// + /// API key + [JsonPropertyName("api_key")] + [JsonRequired] + public string ApiKey { get; set; } + + /// + /// API secret + /// + /// API secret + [JsonPropertyName("api_secret")] + [JsonRequired] + public string ApiSecret { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectAustraliaPostRequestBody {\n"); + 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"); + 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..3dfa58fe --- /dev/null +++ b/ShipEngineSDK/Model/ConnectCanadaPostRequestBody.cs @@ -0,0 +1,98 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Canada Post Account API Key + /// + /// Canada Post Account API Key + [JsonPropertyName("api_key")] + [JsonRequired] + public string ApiKey { get; set; } + + /// + /// Canada Post Account API Secret + /// + /// Canada Post Account API Secret + [JsonPropertyName("api_secret")] + [JsonRequired] + public string ApiSecret { get; set; } + + /// + /// Canada Post Account Number + /// + /// Canada Post Account Number + [JsonPropertyName("account_number")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// Canada Post Account Contract ID + /// + /// Canada Post Account Contract ID + [JsonPropertyName("contract_id")] + [JsonRequired] + public string ContractId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectCanadaPostRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" ApiSecret: ").Append(ApiSecret).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" ContractId: ").Append(ContractId).Append("\n"); + 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..2c7822ce --- /dev/null +++ b/ShipEngineSDK/Model/ConnectCarrierRequestBody.cs @@ -0,0 +1,1276 @@ +/* + * 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.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 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 HashSet MandatoryFields = ["AccessKey", "Account", "AccountNumber", "ActivationKey", "Address", "Address1", "AgreeToEula", "ApiKey", "ApiSecret", "AuthCode", "City", "ClientId", "ContactName", "ContractId", "CountryCode", "CustomerBranch", "DistributionCenter", "Email", "FirstName", "FtpPassword", "FtpUsername", "InductionSite", "LasershipCriticalEntryTime", "LasershipCriticalPullTime", "LastName", "MailerId", "MerchantSellerId", "MwsAuthToken", "Nickname", "Passphrase", "Password", "Phone", "PickupNumber", "PostalCode", "SendleId", "SiteId", "State", "Username", "WebServicesId", "WebServicesKey"]; + private static 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(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectAccessWorldwideRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectAccessWorldwideRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectAmazonBuyShippingRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectAmazonBuyShippingRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectAmazonShippingUk"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectAmazonShippingUk: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectApcRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectApcRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectAsendiaRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectAsendiaRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectAustraliaPostRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectAustraliaPostRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectCanadaPostRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectCanadaPostRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectDhlEcommerceRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectDhlEcommerceRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectDhlExpressRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectDhlExpressRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectDhlExpressAuRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectDhlExpressAuRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectDhlExpressCaRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectDhlExpressCaRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectDhlExpressUkRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectDhlExpressUkRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectDpdRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectDpdRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectEndiciaRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectEndiciaRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectFedexRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectFedexRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectFedexUkRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectFedexUkRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectFirstmileRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectFirstmileRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectImexRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectImexRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectLasershipRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectLasershipRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectNewgisticsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectNewgisticsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectOntracRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectOntracRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectPurolatorRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectPurolatorRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectRoyalMailRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectRoyalMailRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectRrDonnelleyRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectRrDonnelleyRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectSekoRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectSekoRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectSendleRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectSendleRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectStampsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectStampsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newConnectCarrierRequestBody = new ConnectCarrierRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("ConnectUpsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ConnectUpsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + 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..969f66e6 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectCarrierResponseBody.cs @@ -0,0 +1,65 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string CarrierId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectCarrierResponseBody {\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + 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..917dea6e --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlEcommerceRequestBody.cs @@ -0,0 +1,178 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets AncillaryEndorsement CLOVUS + /// + [JsonPropertyName("ancillary_endorsement")] + public AncillaryServiceEndorsement? AncillaryEndorsement { get; set; } + /// + /// A nickname to help you identify this account + /// + /// A nickname to help you identify this account + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// The client id + /// + /// The client id + [JsonPropertyName("client_id")] + [JsonRequired] + public string ClientId { get; set; } + + /// + /// The account username + /// + /// The account username + [JsonPropertyName("username")] + [JsonRequired] + public string Username { get; set; } + + /// + /// The account password + /// + /// The account password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + /// + /// The pickup number + /// + /// The pickup number + [JsonPropertyName("pickup_number")] + [JsonRequired] + public string PickupNumber { get; set; } + + /// + /// The distribution center + /// + /// The distribution center + [JsonPropertyName("distribution_center")] + [JsonRequired] + public string DistributionCenter { 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")] + 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")] + public string ApiSecret { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number")] + [Obsolete] + public string AccountNumber { get; set; } + + /// + /// FTP username + /// + /// FTP username + [JsonPropertyName("ftp_username")] + [Obsolete] + public string FtpUsername { get; set; } + + /// + /// FTP password + /// + /// FTP password + [JsonPropertyName("ftp_password")] + [Obsolete] + public string FtpPassword { get; set; } + + /// + /// Sold To field + /// + /// Sold To field + [JsonPropertyName("sold_to")] + public string SoldTo { get; set; } + + /// + /// Gets or Sets RegistrationId + /// + [JsonPropertyName("registration_id")] + public string RegistrationId { get; set; } + + /// + /// Gets or Sets SoftwareName + /// + [JsonPropertyName("software_name")] + public string SoftwareName { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectDhlEcommerceRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" PickupNumber: ").Append(PickupNumber).Append("\n"); + sb.Append(" DistributionCenter: ").Append(DistributionCenter).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + sb.Append(" ApiSecret: ").Append(ApiSecret).Append("\n"); + sb.Append(" AncillaryEndorsement: ").Append(AncillaryEndorsement).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FtpUsername: ").Append(FtpUsername).Append("\n"); + sb.Append(" FtpPassword: ").Append(FtpPassword).Append("\n"); + sb.Append(" SoldTo: ").Append(SoldTo).Append("\n"); + sb.Append(" RegistrationId: ").Append(RegistrationId).Append("\n"); + sb.Append(" SoftwareName: ").Append(SoftwareName).Append("\n"); + 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..a5317c02 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressAuRequestBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number")] + [JsonRequired] + public string AccountNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressAuRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + 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..5a09aee5 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressCaRequestBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number")] + [JsonRequired] + public string AccountNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressCaRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + 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..2519b0ec --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressRequestBody.cs @@ -0,0 +1,98 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// Required if password is provided + /// + /// Required if password is provided + [JsonPropertyName("site_id")] + public string SiteId { get; set; } + + /// + /// Required if site id is provided + /// + /// Required if site id is provided + [JsonPropertyName("password")] + public string Password { 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")] + public string CountryCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" SiteId: ").Append(SiteId).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + 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..952f9674 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDhlExpressUkRequestBody.cs @@ -0,0 +1,92 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// A string that uniquely identifies the site + /// + /// A string that uniquely identifies the site + /// + /// se-28529731 + /// + [JsonPropertyName("site_id")] + [JsonRequired] + public string SiteId { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectDhlExpressUkRequestBody {\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" SiteId: ").Append(SiteId).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + 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..ed9b15a1 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectDpdRequestBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectDpdRequestBody {\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + 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..8c2ab8ce --- /dev/null +++ b/ShipEngineSDK/Model/ConnectEndiciaRequestBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Account + /// + /// Account + [JsonPropertyName("account")] + [JsonRequired] + public string Account { get; set; } + + /// + /// Passphrase + /// + /// Passphrase + [JsonPropertyName("passphrase")] + [JsonRequired] + public string Passphrase { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectEndiciaRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Account: ").Append(Account).Append("\n"); + sb.Append(" Passphrase: ").Append(Passphrase).Append("\n"); + 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..386b69db --- /dev/null +++ b/ShipEngineSDK/Model/ConnectFedexRequestBody.cs @@ -0,0 +1,188 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address1")] + [JsonRequired] + public string Address1 { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address2")] + public string Address2 { get; set; } + + /// + /// The city + /// + /// The city + [JsonPropertyName("city")] + [JsonRequired] + public string City { get; set; } + + /// + /// The company + /// + /// The company + [JsonPropertyName("company")] + public string Company { get; set; } + + /// + /// Country code + /// + /// Country code + [JsonPropertyName("country_code")] + [JsonRequired] + public string CountryCode { get; set; } + + /// + /// The email address + /// + /// The email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("email")] + [JsonRequired] + public string Email { get; set; } + + /// + /// First name + /// + /// First name + [JsonPropertyName("first_name")] + [JsonRequired] + public string FirstName { get; set; } + + /// + /// Last name + /// + /// Last name + [JsonPropertyName("last_name")] + [JsonRequired] + public string LastName { get; set; } + + /// + /// Phone number + /// + /// Phone number + [JsonPropertyName("phone")] + [JsonRequired] + public string Phone { get; set; } + + /// + /// Postal Code + /// + /// Postal Code + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { get; set; } + + /// + /// State + /// + /// State + [JsonPropertyName("state")] + [JsonRequired] + public string State { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { 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")] + [JsonRequired] + public bool AgreeToEula { get; set; } + + /// + /// Meter number + /// + /// Meter number + [JsonPropertyName("meter_number")] + public string MeterNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectFedexRequestBody {\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Address1: ").Append(Address1).Append("\n"); + sb.Append(" Address2: ").Append(Address2).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Company: ").Append(Company).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(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AgreeToEula: ").Append(AgreeToEula).Append("\n"); + sb.Append(" MeterNumber: ").Append(MeterNumber).Append("\n"); + 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..b2921853 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectFedexUkRequestBody.cs @@ -0,0 +1,188 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address1")] + [JsonRequired] + public string Address1 { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("address2")] + public string Address2 { get; set; } + + /// + /// The city + /// + /// The city + [JsonPropertyName("city")] + [JsonRequired] + public string City { get; set; } + + /// + /// The company + /// + /// The company + [JsonPropertyName("company")] + public string Company { get; set; } + + /// + /// Country code + /// + /// Country code + [JsonPropertyName("country_code")] + [JsonRequired] + public string CountryCode { get; set; } + + /// + /// The email address + /// + /// The email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("email")] + [JsonRequired] + public string Email { get; set; } + + /// + /// First name + /// + /// First name + [JsonPropertyName("first_name")] + [JsonRequired] + public string FirstName { get; set; } + + /// + /// Last name + /// + /// Last name + [JsonPropertyName("last_name")] + [JsonRequired] + public string LastName { get; set; } + + /// + /// Phone number + /// + /// Phone number + [JsonPropertyName("phone")] + [JsonRequired] + public string Phone { get; set; } + + /// + /// Postal Code + /// + /// Postal Code + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { get; set; } + + /// + /// State + /// + /// State + [JsonPropertyName("state")] + [JsonRequired] + public string State { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { 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")] + [JsonRequired] + public bool AgreeToEula { get; set; } + + /// + /// Meter number + /// + /// Meter number + [JsonPropertyName("meter_number")] + public string MeterNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectFedexUkRequestBody {\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Address1: ").Append(Address1).Append("\n"); + sb.Append(" Address2: ").Append(Address2).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Company: ").Append(Company).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(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AgreeToEula: ").Append(AgreeToEula).Append("\n"); + sb.Append(" MeterNumber: ").Append(MeterNumber).Append("\n"); + 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..f16eb45b --- /dev/null +++ b/ShipEngineSDK/Model/ConnectFirstmileRequestBody.cs @@ -0,0 +1,91 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// A string that uniquely identifies the mailer + /// + /// A string that uniquely identifies the mailer + /// + /// se-28529731 + /// + [JsonPropertyName("mailer_id")] + [JsonRequired] + public string MailerId { get; set; } + + /// + /// Profile name + /// + /// Profile name + [JsonPropertyName("profile_name")] + public string ProfileName { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectFirstmileRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" MailerId: ").Append(MailerId).Append("\n"); + sb.Append(" ProfileName: ").Append(ProfileName).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + 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..1d1c1d22 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectImexRequestBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Username + /// + /// Username + [JsonPropertyName("username")] + [JsonRequired] + public string Username { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectImexRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + 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..a00ca969 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectInsurerRequestBody.cs @@ -0,0 +1,73 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Email { get; set; } + + /// + /// Gets or Sets PolicyId + /// + [JsonPropertyName("policy_id")] + [JsonRequired] + public string PolicyId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectInsurerRequestBody {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" PolicyId: ").Append(PolicyId).Append("\n"); + 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..0936bf68 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectLasershipRequestBody.cs @@ -0,0 +1,271 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Web Service ID (WSID) + /// + /// Web Service ID (WSID) + [JsonPropertyName("web_services_id")] + [JsonRequired] + public string WebServicesId { get; set; } + + /// + /// Web Service Key (WSKey) + /// + /// Web Service Key (WSKey) + [JsonPropertyName("web_services_key")] + [JsonRequired] + public string WebServicesKey { get; set; } + + /// + /// Customer Branch + /// + /// Customer Branch + [JsonPropertyName("customer_branch")] + [JsonRequired] + public string CustomerBranch { get; set; } + + /// + /// Address + /// + /// Address + [JsonPropertyName("Address")] + [JsonRequired] + public String Address { get; set; } + + /// + /// Address2 + /// + /// Address2 + [JsonPropertyName("Address2")] + public String Address2 { get; set; } + + /// + /// PostalCode + /// + /// PostalCode + [JsonPropertyName("PostalCode")] + [JsonRequired] + public String PostalCode { get; set; } + + /// + /// City + /// + /// City + [JsonPropertyName("City")] + [JsonRequired] + public String City { get; set; } + + /// + /// State + /// + /// State + [JsonPropertyName("State")] + [JsonRequired] + public String State { get; set; } + + /// + /// Country + /// + /// Country + [JsonPropertyName("country")] + public String Country { get; set; } + + /// + /// Phone + /// + /// Phone + [JsonPropertyName("Phone")] + public String Phone { get; set; } + + /// + /// Email + /// + /// Email + [JsonPropertyName("Email")] + public String Email { get; set; } + + /// + /// Instructions + /// + /// Instructions + [JsonPropertyName("instructions")] + public String Instructions { get; set; } + + /// + /// Facility Code + /// + /// Facility Code + [JsonPropertyName("facility_code")] + public String FacilityCode { get; set; } + + /// + /// Critical Pull Time (local time) + /// + /// Critical Pull Time (local time) + [JsonPropertyName("lasership_critical_pull_time")] + [JsonRequired] + public String LasershipCriticalPullTime { get; set; } + + /// + /// Critical Entry Time (local time) + /// + /// Critical Entry Time (local time) + [JsonPropertyName("lasership_critical_entry_time")] + [JsonRequired] + public String LasershipCriticalEntryTime { 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")] + public Boolean DeclarePieceAttributesSeparatelyForEveryShipment { 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")] + public Boolean AttrAlcohol { 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")] + public Boolean AttrDryIce { 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")] + public Boolean AttrHazmat { 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")] + public Boolean AttrTwoPersons { 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")] + public Boolean AttrExplosive { 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")] + public Boolean AttrControlledSubstance { 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")] + public Boolean AttrRefrigerated { 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")] + public Boolean AttrPerishable { 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")] + public Boolean AttrNoRTS { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectLasershipRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" WebServicesId: ").Append(WebServicesId).Append("\n"); + sb.Append(" WebServicesKey: ").Append(WebServicesKey).Append("\n"); + sb.Append(" CustomerBranch: ").Append(CustomerBranch).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" Address2: ").Append(Address2).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + sb.Append(" FacilityCode: ").Append(FacilityCode).Append("\n"); + sb.Append(" LasershipCriticalPullTime: ").Append(LasershipCriticalPullTime).Append("\n"); + sb.Append(" LasershipCriticalEntryTime: ").Append(LasershipCriticalEntryTime).Append("\n"); + sb.Append(" DeclarePieceAttributesSeparatelyForEveryShipment: ").Append(DeclarePieceAttributesSeparatelyForEveryShipment).Append("\n"); + sb.Append(" AttrAlcohol: ").Append(AttrAlcohol).Append("\n"); + sb.Append(" AttrDryIce: ").Append(AttrDryIce).Append("\n"); + sb.Append(" AttrHazmat: ").Append(AttrHazmat).Append("\n"); + sb.Append(" AttrTwoPersons: ").Append(AttrTwoPersons).Append("\n"); + sb.Append(" AttrExplosive: ").Append(AttrExplosive).Append("\n"); + sb.Append(" AttrControlledSubstance: ").Append(AttrControlledSubstance).Append("\n"); + sb.Append(" AttrRefrigerated: ").Append(AttrRefrigerated).Append("\n"); + sb.Append(" AttrPerishable: ").Append(AttrPerishable).Append("\n"); + sb.Append(" AttrNoRTS: ").Append(AttrNoRTS).Append("\n"); + 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..74d361a9 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectNewgisticsRequestBody.cs @@ -0,0 +1,87 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Merchant id + /// + /// Merchant id + [JsonPropertyName("merchant_id")] + public int MerchantId { get; set; } + + /// + /// Mailer id + /// + /// Mailer id + [JsonPropertyName("mailer_id")] + public int MailerId { get; set; } + + /// + /// Induction site + /// + /// Induction site + [JsonPropertyName("induction_site")] + [JsonRequired] + public string InductionSite { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectNewgisticsRequestBody {\n"); + sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); + sb.Append(" MailerId: ").Append(MailerId).Append("\n"); + sb.Append(" InductionSite: ").Append(InductionSite).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + 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..1af2af35 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectOntracRequestBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectOntracRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + 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..bf27967b --- /dev/null +++ b/ShipEngineSDK/Model/ConnectPurolatorRequestBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// Activation key + /// + /// Activation key + [JsonPropertyName("activation_key")] + [JsonRequired] + public string ActivationKey { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectPurolatorRequestBody {\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" ActivationKey: ").Append(ActivationKey).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + 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..789a2a10 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectRoyalMailRequestBody.cs @@ -0,0 +1,160 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string AccountNumber { get; set; } + + /// + /// The oba email address + /// + /// The oba email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("oba_email")] + public string ObaEmail { get; set; } + + /// + /// Contact name + /// + /// Contact name + [JsonPropertyName("contact_name")] + [JsonRequired] + public string ContactName { get; set; } + + /// + /// The email address + /// + /// The email address + /// + /// john.doe@example.com + /// + [JsonPropertyName("email")] + public string Email { get; set; } + + /// + /// Company name + /// + /// Company name + [JsonPropertyName("company_name")] + public string CompanyName { get; set; } + + /// + /// Street line1 + /// + /// Street line1 + [JsonPropertyName("street_line1")] + public string StreetLine1 { get; set; } + + /// + /// Street line2 + /// + /// Street line2 + [JsonPropertyName("street_line2")] + public string StreetLine2 { get; set; } + + /// + /// Street line3 + /// + /// Street line3 + [JsonPropertyName("street_line3")] + public string StreetLine3 { get; set; } + + /// + /// City + /// + /// City + [JsonPropertyName("city")] + [JsonRequired] + public string City { get; set; } + + /// + /// Postal code + /// + /// Postal code + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { get; set; } + + /// + /// Phone + /// + /// Phone + [JsonPropertyName("phone")] + public string Phone { get; set; } + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectRoyalMailRequestBody {\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" ObaEmail: ").Append(ObaEmail).Append("\n"); + sb.Append(" ContactName: ").Append(ContactName).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" StreetLine1: ").Append(StreetLine1).Append("\n"); + sb.Append(" StreetLine2: ").Append(StreetLine2).Append("\n"); + sb.Append(" StreetLine3: ").Append(StreetLine3).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + 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..7d07dddd --- /dev/null +++ b/ShipEngineSDK/Model/ConnectRrDonnelleyRequestBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Username + /// + /// Username + [JsonPropertyName("username")] + [JsonRequired] + public string Username { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectRrDonnelleyRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + 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..7c5aa65a --- /dev/null +++ b/ShipEngineSDK/Model/ConnectSekoRequestBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Seko Account Access Key + /// + /// Seko Account Access Key + [JsonPropertyName("access_key")] + [JsonRequired] + public string AccessKey { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectSekoRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AccessKey: ").Append(AccessKey).Append("\n"); + 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..b69ed9df --- /dev/null +++ b/ShipEngineSDK/Model/ConnectSendleRequestBody.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// A string that uniquely identifies the sendle + /// + /// A string that uniquely identifies the sendle + /// + /// se-28529731 + /// + [JsonPropertyName("sendle_id")] + [JsonRequired] + public string SendleId { get; set; } + + /// + /// API key + /// + /// API key + [JsonPropertyName("api_key")] + [JsonRequired] + public string ApiKey { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectSendleRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" SendleId: ").Append(SendleId).Append("\n"); + sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); + 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..b08c3f1d --- /dev/null +++ b/ShipEngineSDK/Model/ConnectStampsRequestBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Username + /// + /// Username + [JsonPropertyName("username")] + [JsonRequired] + public string Username { get; set; } + + /// + /// Password + /// + /// Password + [JsonPropertyName("password")] + [JsonRequired] + public string Password { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectStampsRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + 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..b38c9957 --- /dev/null +++ b/ShipEngineSDK/Model/ConnectUpsRequestBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Nickname + /// + /// Nickname + [JsonPropertyName("nickname")] + [JsonRequired] + public string Nickname { get; set; } + + /// + /// Account number + /// + /// Account number + [JsonPropertyName("account_number")] + [JsonRequired] + public string AccountNumber { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConnectUpsRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + 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..753f58a9 --- /dev/null +++ b/ShipEngineSDK/Model/ContactDetails.cs @@ -0,0 +1,82 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Name + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// An email address. + /// + /// An email address. + /// + /// john.doe@example.com + /// + [JsonPropertyName("email")] + [JsonRequired] + public string Email { get; set; } + + /// + /// Phone number associated + /// + /// Phone number associated + [JsonPropertyName("phone")] + [JsonRequired] + public string Phone { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ContactDetails {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + 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..8d784395 --- /dev/null +++ b/ShipEngineSDK/Model/CreateAccountSettingsImageRequestBody.cs @@ -0,0 +1,177 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _value; + + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + public ImageContentTypeEnum(string 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"); + + + 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 CLOVUS + /// + /// The image type + [JsonPropertyName("image_content_type")] + [JsonRequired] + public ImageContentTypeEnum ImageContentType { get; set; } = new(); + + + /// + /// 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")] + public string LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name")] + [JsonRequired] + 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")] + public bool IsDefault { 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")] + [JsonRequired] + 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")] + public DateTime 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")] + public DateTime ModifiedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateAccountSettingsImageRequestBody {\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + 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..b3686ccd --- /dev/null +++ b/ShipEngineSDK/Model/CreateAndProcessBatchRequestBody.cs @@ -0,0 +1,98 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// se-28529731 + /// + [JsonPropertyName("external_batch_id")] + public string ExternalBatchId { get; set; } + + /// + /// Add custom messages for a particular batch + /// + /// Add custom messages for a particular batch + /// + /// This is my batch + /// + [JsonPropertyName("batch_notes")] + public string BatchNotes { get; set; } + + /// + /// Array of shipment IDs used in the batch + /// + /// Array of shipment IDs used in the batch + [JsonPropertyName("shipment_ids")] + public List ShipmentIds { get; set; } + + /// + /// Array of rate IDs used in the batch + /// + /// Array of rate IDs used in the batch + [JsonPropertyName("rate_ids")] + public List RateIds { get; set; } + + /// + /// Gets or Sets ProcessLabels + /// + [JsonPropertyName("process_labels")] + public CreateAndProcessBatchRequestBodyProcessLabels ProcessLabels { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateAndProcessBatchRequestBody {\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + sb.Append(" ProcessLabels: ").Append(ProcessLabels).Append("\n"); + 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..865c859f --- /dev/null +++ b/ShipEngineSDK/Model/CreateAndProcessBatchRequestBodyProcessLabels.cs @@ -0,0 +1,91 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets LabelLayout CLOVUS + /// + [JsonPropertyName("label_layout")] + public LabelLayout? LabelLayout { get; set; } + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + public DisplayScheme? DisplayScheme { get; set; } + /// + /// When 'true', the batch will be enqueued for processing + /// + /// When 'true', the batch will be enqueued for processing + [JsonPropertyName("create_batch_and_process_labels")] + public bool CreateBatchAndProcessLabels { 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")] + public DateTime ShipDate { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateAndProcessBatchRequestBodyProcessLabels {\n"); + sb.Append(" CreateBatchAndProcessLabels: ").Append(CreateBatchAndProcessLabels).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + 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..2e5b8441 --- /dev/null +++ b/ShipEngineSDK/Model/CreateAndValidateShipment.cs @@ -0,0 +1,307 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + public ShipmentStatus? ShipmentStatus { get; set; } + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + public DeliveryConfirmation? Confirmation { get; set; } + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + public InsuranceProvider? InsuranceProvider { get; set; } + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + public string ShipmentId { 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")] + public 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")] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + public ShippingAddressTo ShipTo { 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")] + public ShippingAddress ShipFrom { 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")] + public string WarehouseId { 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")] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + public List Tags { 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")] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + 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")] + public string ComparisonRateType { get; set; } + + /// + /// An array of errors that occurred while creating shipment. + /// + /// An array of errors that occurred while creating shipment. + [JsonPropertyName("errors")] + [Obsolete] + public List Errors { get; set; } + + /// + /// The address validation + /// + /// The address validation + [JsonPropertyName("address_validation")] + public AddressValidationResult AddressValidation { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateAndValidateShipment {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" AddressValidation: ").Append(AddressValidation).Append("\n"); + 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..0627a2b6 --- /dev/null +++ b/ShipEngineSDK/Model/CreateBatchRequest.cs @@ -0,0 +1,262 @@ +/* + * 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.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 HashSet OneOfTypes = [typeof(CreateBatchRequestBody), typeof(CreateAndProcessBatchRequestBody)]; + private static HashSet MandatoryFields = []; + private static 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(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("CreateBatchRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into CreateBatchRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newCreateBatchRequest = new CreateBatchRequest(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("CreateAndProcessBatchRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into CreateAndProcessBatchRequestBody: {1}", jsonDoc, exception.ToString())); + } + + 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..8666c921 --- /dev/null +++ b/ShipEngineSDK/Model/CreateBatchRequestBody.cs @@ -0,0 +1,91 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + /// + /// se-28529731 + /// + [JsonPropertyName("external_batch_id")] + public string ExternalBatchId { get; set; } + + /// + /// Add custom messages for a particular batch + /// + /// Add custom messages for a particular batch + /// + /// This is my batch + /// + [JsonPropertyName("batch_notes")] + public string BatchNotes { get; set; } + + /// + /// Array of shipment IDs used in the batch + /// + /// Array of shipment IDs used in the batch + [JsonPropertyName("shipment_ids")] + public List ShipmentIds { get; set; } + + /// + /// Array of rate IDs used in the batch + /// + /// Array of rate IDs used in the batch + [JsonPropertyName("rate_ids")] + public List RateIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateBatchRequestBody {\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + 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..b3fb1d4e --- /dev/null +++ b/ShipEngineSDK/Model/CreateBatchResponseBody.cs @@ -0,0 +1,270 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// label layout CLOVUS + /// + /// label layout + [JsonPropertyName("label_layout")] + [JsonRequired] + public LabelLayout LabelLayout { get; set; } = new(); + + + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + [JsonRequired] + public LabelFormat LabelFormat { get; set; } = new(); + + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public BatchStatus Status { get; set; } = new(); + + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id")] + [JsonRequired] + public string BatchId { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + [JsonPropertyName("batch_number")] + [JsonRequired] + public string BatchNumber { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + [JsonPropertyName("external_batch_id")] + [JsonRequired] + public string ExternalBatchId { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes")] + [JsonRequired] + public string BatchNotes { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at")] + [JsonRequired] + public DateTime ProcessedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// 2 + /// + [JsonPropertyName("errors")] + [JsonRequired] + public int Errors { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("process_errors")] + [JsonRequired] + public List ProcessErrors { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// 1 + /// + [JsonPropertyName("warnings")] + [JsonRequired] + public int Warnings { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// 1 + /// + [JsonPropertyName("completed")] + [JsonRequired] + public int Completed { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// 3 + /// + [JsonPropertyName("forms")] + [JsonRequired] + public int Forms { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// 2 + /// + [JsonPropertyName("count")] + [JsonRequired] + public int Count { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url")] + [JsonRequired] + public OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url")] + [JsonRequired] + public OptionalLink BatchLabelsUrl { get; set; } + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + [JsonPropertyName("batch_errors_url")] + [JsonRequired] + public OptionalLink BatchErrorsUrl { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + [JsonPropertyName("label_download")] + [JsonRequired] + public LabelDownload LabelDownload { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + [JsonPropertyName("form_download")] + [JsonRequired] + public OptionalLink 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")] + [JsonRequired] + public PaperlessDownload PaperlessDownload { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateBatchResponseBody {\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + 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..c3a10a36 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromRateRequestBody.cs @@ -0,0 +1,84 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelLayout CLOVUS + /// + [JsonPropertyName("label_layout")] + public LabelLayout? LabelLayout { get; set; } + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + public LabelFormat? LabelFormat { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + public LabelDownloadType? LabelDownloadType { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateLabelFromRateRequestBody {\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + 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..7262deb6 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromRateResponseBody.cs @@ -0,0 +1,388 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public LabelStatus? Status { get; set; } + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { get; set; } + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + public TrackingStatus? TrackingStatus { 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. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id")] + public string LabelId { 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { 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")] + 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")] + 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")] + [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")] + public string PackageCode { 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")] + 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")] + public DateTime VoidedAt { 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")] + 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")] + 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateLabelFromRateResponseBody {\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..e0716539 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromShipmentRequestBody.cs @@ -0,0 +1,84 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelLayout CLOVUS + /// + [JsonPropertyName("label_layout")] + public LabelLayout? LabelLayout { get; set; } + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + public LabelFormat? LabelFormat { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + public LabelDownloadType? LabelDownloadType { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateLabelFromShipmentRequestBody {\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + 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..89bff431 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelFromShipmentResponseBody.cs @@ -0,0 +1,388 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public LabelStatus? Status { get; set; } + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { get; set; } + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + public TrackingStatus? TrackingStatus { 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. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id")] + public string LabelId { 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { 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")] + 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")] + 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")] + [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")] + public string PackageCode { 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")] + 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")] + public DateTime VoidedAt { 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")] + 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")] + 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateLabelFromShipmentResponseBody {\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..a3186a7f --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelRequestBody.cs @@ -0,0 +1,411 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public LabelStatus? Status { get; set; } + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { get; set; } + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + public TrackingStatus? TrackingStatus { 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")] + public string ShipToServicePointId { 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")] + public string ShipFromServicePointId { 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. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id")] + public string LabelId { 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + [JsonRequired] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { 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")] + 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")] + 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")] + [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")] + public string PackageCode { 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")] + 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")] + public DateTime VoidedAt { 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")] + 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")] + 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateLabelRequestBody {\n"); + sb.Append(" ShipToServicePointId: ").Append(ShipToServicePointId).Append("\n"); + sb.Append(" ShipFromServicePointId: ").Append(ShipFromServicePointId).Append("\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..b1164dc6 --- /dev/null +++ b/ShipEngineSDK/Model/CreateLabelResponseBody.cs @@ -0,0 +1,430 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public LabelStatus Status { get; set; } = new(); + + + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + [JsonRequired] + public LabelChargeEvent ChargeEvent { get; set; } = new(); + + + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + [JsonRequired] + public LabelFormat LabelFormat { get; set; } = new(); + + + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + [JsonRequired] + public DisplayScheme DisplayScheme { get; set; } = new(); + + + /// + /// 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. CLOVUS + /// + /// 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")] + [JsonRequired] + public LabelLayout LabelLayout { get; set; } = new(); + + + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + [JsonRequired] + public TrackingStatus TrackingStatus { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + public string LabelId { 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")] + [JsonRequired] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + [JsonRequired] + public DateTime 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")] + [JsonRequired] + public DateTime 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + public string CarrierId { 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")] + 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")] + [JsonRequired] + 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")] + [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")] + [JsonRequired] + public string PackageCode { 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")] + [JsonRequired] + 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")] + [JsonRequired] + public DateTime VoidedAt { 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + [JsonRequired] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateLabelResponseBody {\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..1d04776a --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestByObjectRequestBody.cs @@ -0,0 +1,105 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string CarrierId { 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")] + 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")] + public List LabelIds { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [JsonRequired] + public string WarehouseId { 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")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateManifestByObjectRequestBody {\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ExcludedLabelIds: ").Append(ExcludedLabelIds).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + 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..216c891c --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestLabelIdsRequestBody.cs @@ -0,0 +1,62 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public List LabelIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateManifestLabelIdsRequestBody {\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + 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..35217d49 --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestRequestBody.cs @@ -0,0 +1,262 @@ +/* + * 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.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 HashSet OneOfTypes = [typeof(CreateManifestByObjectRequestBody), typeof(CreateManifestLabelIdsRequestBody)]; + private static HashSet MandatoryFields = ["CarrierId", "LabelIds", "ShipDate", "WarehouseId"]; + private static 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(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("CreateManifestByObjectRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into CreateManifestByObjectRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newCreateManifestRequestBody = new CreateManifestRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("CreateManifestLabelIdsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into CreateManifestLabelIdsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + 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..31d6d921 --- /dev/null +++ b/ShipEngineSDK/Model/CreateManifestResponseBody.cs @@ -0,0 +1,212 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Resulting Manifests + /// + /// Resulting Manifests + [JsonPropertyName("manifests")] + public List Manifests { get; set; } + + /// + /// Resulting manifest requests with statuses + /// + /// Resulting manifest requests with statuses + [JsonPropertyName("manifest_requests")] + public List ManifestRequests { get; set; } + + /// + /// A string that uniquely identifies the manifest + /// + /// A string that uniquely identifies the manifest + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id")] + [JsonRequired] + [Obsolete] + public string ManifestId { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// se-28529731 + /// + [JsonPropertyName("form_id")] + [JsonRequired] + [Obsolete] + public string FormId { 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")] + [JsonRequired] + [Obsolete] + public DateTime CreatedAt { 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")] + [JsonRequired] + [Obsolete] + public DateTime ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// 100 + /// + [JsonPropertyName("shipments")] + [JsonRequired] + [Obsolete] + public int Shipments { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [JsonRequired] + [Obsolete] + public string WarehouseId { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id")] + [JsonRequired] + [Obsolete] + public string SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [JsonRequired] + [Obsolete] + public string CarrierId { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + [JsonPropertyName("manifest_download")] + [JsonRequired] + [Obsolete] + public ManifestDownload ManifestDownload { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + [JsonPropertyName("label_ids")] + [Obsolete] + public List LabelIds { 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateManifestResponseBody {\n"); + sb.Append(" Manifests: ").Append(Manifests).Append("\n"); + sb.Append(" ManifestRequests: ").Append(ManifestRequests).Append("\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..e5c364cd --- /dev/null +++ b/ShipEngineSDK/Model/CreatePackageTypeRequestBody.cs @@ -0,0 +1,106 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id")] + public string PackageId { 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")] + [JsonRequired] + public string PackageCode { get; set; } + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description")] + public string Description { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreatePackageTypeRequestBody {\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + 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..10903c4b --- /dev/null +++ b/ShipEngineSDK/Model/CreatePackageTypeResponseBody.cs @@ -0,0 +1,106 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id")] + public string PackageId { 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")] + [JsonRequired] + public string PackageCode { get; set; } + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description")] + public string Description { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreatePackageTypeResponseBody {\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + 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..fe82fe62 --- /dev/null +++ b/ShipEngineSDK/Model/CreateReturnLabelRequestBody.cs @@ -0,0 +1,98 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + public LabelDownloadType? LabelDownloadType { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + public DisplayScheme? DisplayScheme { 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")] + public string LabelImageId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateReturnLabelRequestBody {\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + 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..82578d5e --- /dev/null +++ b/ShipEngineSDK/Model/CreateReturnLabelResponseBody.cs @@ -0,0 +1,388 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public LabelStatus? Status { get; set; } + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { get; set; } + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + public TrackingStatus? TrackingStatus { 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. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id")] + public string LabelId { 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { 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")] + 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")] + 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")] + [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")] + public string PackageCode { 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")] + 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")] + public DateTime VoidedAt { 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")] + 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")] + 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateReturnLabelResponseBody {\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..be8e0e11 --- /dev/null +++ b/ShipEngineSDK/Model/CreateShipmentResponseBodyFields.cs @@ -0,0 +1,70 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// An array of errors that occurred while creating shipment. + /// + /// An array of errors that occurred while creating shipment. + [JsonPropertyName("errors")] + [Obsolete] + public List Errors { get; set; } + + /// + /// The address validation + /// + /// The address validation + [JsonPropertyName("address_validation")] + public AddressValidationResult AddressValidation { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateShipmentResponseBodyFields {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" AddressValidation: ").Append(AddressValidation).Append("\n"); + 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..1395787e --- /dev/null +++ b/ShipEngineSDK/Model/CreateShipmentsRequestBody.cs @@ -0,0 +1,62 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public List Shipments { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateShipmentsRequestBody {\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + 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..e50461ec --- /dev/null +++ b/ShipEngineSDK/Model/CreateShipmentsResponseBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Indicates if errors occured while creating the shipments + /// + /// Indicates if errors occured while creating the shipments + [JsonPropertyName("has_errors")] + [JsonRequired] + public bool HasErrors { get; set; } + + /// + /// An array of shipments that were created. + /// + /// An array of shipments that were created. + [JsonPropertyName("shipments")] + [JsonRequired] + public List Shipments { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateShipmentsResponseBody {\n"); + sb.Append(" HasErrors: ").Append(HasErrors).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + 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..434126da --- /dev/null +++ b/ShipEngineSDK/Model/CreateTagResponseBody.cs @@ -0,0 +1,65 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateTagResponseBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + 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..38fc0f89 --- /dev/null +++ b/ShipEngineSDK/Model/CreateWarehouseRequestBody.cs @@ -0,0 +1,112 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + 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")] + public bool? IsDefault { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address")] + [JsonRequired] + public Address OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address")] + public Address ReturnAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateWarehouseRequestBody {\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + 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..1316e575 --- /dev/null +++ b/ShipEngineSDK/Model/CreateWarehouseResponseBody.cs @@ -0,0 +1,115 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [JsonRequired] + 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")] + public bool? IsDefault { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address")] + [JsonRequired] + public Address OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address")] + [JsonRequired] + public Address ReturnAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateWarehouseResponseBody {\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + 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..fe892be2 --- /dev/null +++ b/ShipEngineSDK/Model/CreateWebhookRequestBody.cs @@ -0,0 +1,82 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("event")] + [JsonRequired] + public WebhookEvent Event { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + public string Url { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers")] + public List Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateWebhookRequestBody {\n"); + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + 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..77fb2977 --- /dev/null +++ b/ShipEngineSDK/Model/CreateWebhookResponseBody.cs @@ -0,0 +1,94 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("event")] + [JsonRequired] + public WebhookEvent Event { get; set; } = new(); + + + /// + /// A string that uniquely identifies the webhook + /// + /// A string that uniquely identifies the webhook + /// + /// se-28529731 + /// + [JsonPropertyName("webhook_id")] + [JsonRequired] + public string WebhookId { 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")] + [JsonRequired] + public string Url { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers")] + public List Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateWebhookResponseBody {\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + 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..433e90a0 --- /dev/null +++ b/ShipEngineSDK/Model/CustomsItem.cs @@ -0,0 +1,150 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + /// + /// se-28529731 + /// + [JsonPropertyName("customs_item_id")] + [JsonRequired] + public string CustomsItemId { get; set; } + + /// + /// A description of the item + /// + /// A description of the item + [JsonPropertyName("description")] + public string Description { get; set; } + + /// + /// The quantity of this item in the shipment. + /// + /// The quantity of this item in the shipment. + [JsonPropertyName("quantity")] + public int Quantity { get; set; } + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("value")] + public double 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")] + public string ValueCurrency { get; set; } + + /// + /// The item weight + /// + /// The item weight + [JsonPropertyName("weight")] + public Weight Weight { 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")] + public string HarmonizedTariffCode { 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")] + public string CountryOfOrigin { get; set; } + + /// + /// Gets or Sets UnitOfMeasure + /// + [JsonPropertyName("unit_of_measure")] + public string UnitOfMeasure { get; set; } + + /// + /// The SKU (Stock Keeping Unit) of the customs item + /// + /// The SKU (Stock Keeping Unit) of the customs item + [JsonPropertyName("sku")] + public string Sku { get; set; } + + /// + /// Description of the Custom Item's SKU + /// + /// Description of the Custom Item's SKU + [JsonPropertyName("sku_description")] + public string SkuDescription { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CustomsItem {\n"); + sb.Append(" CustomsItemId: ").Append(CustomsItemId).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" ValueCurrency: ").Append(ValueCurrency).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" HarmonizedTariffCode: ").Append(HarmonizedTariffCode).Append("\n"); + sb.Append(" CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n"); + sb.Append(" UnitOfMeasure: ").Append(UnitOfMeasure).Append("\n"); + sb.Append(" Sku: ").Append(Sku).Append("\n"); + sb.Append(" SkuDescription: ").Append(SkuDescription).Append("\n"); + 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..6ae8fba1 --- /dev/null +++ b/ShipEngineSDK/Model/DangerousAmount.cs @@ -0,0 +1,69 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public double Amount { get; set; } + + /// + /// The unit of dangerous goods. + /// + /// The unit of dangerous goods. + [JsonPropertyName("unit")] + public string Unit { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DangerousAmount {\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Unit: ").Append(Unit).Append("\n"); + 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..4f5cb43e --- /dev/null +++ b/ShipEngineSDK/Model/DangerousGoods.cs @@ -0,0 +1,203 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets PackagingGroup CLOVUS + /// + [JsonPropertyName("packaging_group")] + public PackagingGroup? PackagingGroup { get; set; } + /// + /// Gets or Sets PackagingInstructionSection CLOVUS + /// + [JsonPropertyName("packaging_instruction_section")] + public PackagingInstructionSection? PackagingInstructionSection { get; set; } + /// + /// Gets or Sets TransportMean CLOVUS + /// + [JsonPropertyName("transport_mean")] + public TransportMean? TransportMean { get; set; } + /// + /// Gets or Sets RegulationLevel CLOVUS + /// + [JsonPropertyName("regulation_level")] + public RegulationLevel? RegulationLevel { get; set; } + /// + /// UN number to identify the dangerous goods. + /// + /// UN number to identify the dangerous goods. + [JsonPropertyName("id_number")] + public string IdNumber { get; set; } + + /// + /// Trade description of the dangerous goods. + /// + /// Trade description of the dangerous goods. + [JsonPropertyName("shipping_name")] + public string ShippingName { get; set; } + + /// + /// Recognized Technical or chemical name of dangerous goods. + /// + /// Recognized Technical or chemical name of dangerous goods. + [JsonPropertyName("technical_name")] + public string TechnicalName { get; set; } + + /// + /// Dangerous goods product class based on regulation. + /// + /// Dangerous goods product class based on regulation. + [JsonPropertyName("product_class")] + 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")] + public string ProductClassSubsidiary { get; set; } + + /// + /// This model represents the amount of the dangerous goods. + /// + /// This model represents the amount of the dangerous goods. + [JsonPropertyName("dangerous_amount")] + public DangerousAmount DangerousAmount { get; set; } + + /// + /// Quantity of dangerous goods. + /// + /// Quantity of dangerous goods. + [JsonPropertyName("quantity")] + public int Quantity { 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")] + public string PackagingInstruction { 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")] + public string PackagingType { 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")] + public string TransportCategory { get; set; } + + /// + /// Name of the regulatory authority. + /// + /// Name of the regulatory authority. + [JsonPropertyName("regulation_authority")] + public string RegulationAuthority { get; set; } + + /// + /// Indication if the substance is radioactive. + /// + /// Indication if the substance is radioactive. + /// + /// false + /// + [JsonPropertyName("radioactive")] + public bool? Radioactive { 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")] + public bool? ReportableQuantity { 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")] + public string TunnelCode { get; set; } + + /// + /// 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")] + public string AdditionalDescription { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DangerousGoods {\n"); + sb.Append(" IdNumber: ").Append(IdNumber).Append("\n"); + sb.Append(" ShippingName: ").Append(ShippingName).Append("\n"); + sb.Append(" TechnicalName: ").Append(TechnicalName).Append("\n"); + sb.Append(" ProductClass: ").Append(ProductClass).Append("\n"); + sb.Append(" ProductClassSubsidiary: ").Append(ProductClassSubsidiary).Append("\n"); + sb.Append(" PackagingGroup: ").Append(PackagingGroup).Append("\n"); + sb.Append(" DangerousAmount: ").Append(DangerousAmount).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).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(" TransportMean: ").Append(TransportMean).Append("\n"); + sb.Append(" TransportCategory: ").Append(TransportCategory).Append("\n"); + sb.Append(" RegulationAuthority: ").Append(RegulationAuthority).Append("\n"); + sb.Append(" RegulationLevel: ").Append(RegulationLevel).Append("\n"); + sb.Append(" Radioactive: ").Append(Radioactive).Append("\n"); + sb.Append(" ReportableQuantity: ").Append(ReportableQuantity).Append("\n"); + sb.Append(" TunnelCode: ").Append(TunnelCode).Append("\n"); + sb.Append(" AdditionalDescription: ").Append(AdditionalDescription).Append("\n"); + 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..75c76b12 --- /dev/null +++ b/ShipEngineSDK/Model/DefaultLabelLayout.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..e9190dd9 --- /dev/null +++ b/ShipEngineSDK/Model/DeletePickupByIdResponseBody.cs @@ -0,0 +1,86 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id")] + [JsonRequired] + public string PickupId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DeletePickupByIdResponseBody {\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + 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..13cb20e2 --- /dev/null +++ b/ShipEngineSDK/Model/DeleteScheduledPickupResponseBody.cs @@ -0,0 +1,65 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string PickupId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DeleteScheduledPickupResponseBody {\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + 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..6e792775 --- /dev/null +++ b/ShipEngineSDK/Model/DeliveryConfirmation.cs @@ -0,0 +1,107 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..ac4c18a7 --- /dev/null +++ b/ShipEngineSDK/Model/DeprecatedManifest.cs @@ -0,0 +1,166 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 manifest + /// + /// A string that uniquely identifies the manifest + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id")] + [Obsolete] + public string ManifestId { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// se-28529731 + /// + [JsonPropertyName("form_id")] + [Obsolete] + public string FormId { 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")] + [Obsolete] + public DateTime CreatedAt { 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")] + [Obsolete] + public DateTime ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// 100 + /// + [JsonPropertyName("shipments")] + [Obsolete] + public int Shipments { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [Obsolete] + public string WarehouseId { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id")] + [Obsolete] + public string SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [Obsolete] + public string CarrierId { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + [JsonPropertyName("manifest_download")] + [Obsolete] + public ManifestDownload ManifestDownload { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + [JsonPropertyName("label_ids")] + [Obsolete] + public List LabelIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DeprecatedManifest {\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + 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..46b44b6b --- /dev/null +++ b/ShipEngineSDK/Model/DhlExpressAccountSettings.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname")] + 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")] + public bool ShouldHideAccountNumberOnArchiveDoc { get; set; } + + /// + /// Indicates if this is primary account + /// + /// Indicates if this is primary account + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DhlExpressAccountSettings {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ShouldHideAccountNumberOnArchiveDoc: ").Append(ShouldHideAccountNumberOnArchiveDoc).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + 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..cf01ffcb --- /dev/null +++ b/ShipEngineSDK/Model/DhlExpressSettingsResponseBody.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname")] + 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")] + public bool ShouldHideAccountNumberOnArchiveDoc { get; set; } + + /// + /// Indicates if this is primary account + /// + /// Indicates if this is primary account + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DhlExpressSettingsResponseBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ShouldHideAccountNumberOnArchiveDoc: ").Append(ShouldHideAccountNumberOnArchiveDoc).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + 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..96b980bf --- /dev/null +++ b/ShipEngineSDK/Model/DimensionUnit.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..976b74c2 --- /dev/null +++ b/ShipEngineSDK/Model/Dimensions.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("unit")] + [JsonRequired] + public DimensionUnit Unit { get; set; } = new(); + + + /// + /// The length of the package, in the specified unit + /// + /// The length of the package, in the specified unit + [JsonPropertyName("length")] + [JsonRequired] + public double Length { get; set; } + + /// + /// The width of the package, in the specified unit + /// + /// The width of the package, in the specified unit + [JsonPropertyName("width")] + [JsonRequired] + public double Width { get; set; } + + /// + /// The height of the package, in the specified unit + /// + /// The height of the package, in the specified unit + [JsonPropertyName("height")] + [JsonRequired] + public double Height { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Dimensions {\n"); + sb.Append(" Unit: ").Append(Unit).Append("\n"); + sb.Append(" Length: ").Append(Length).Append("\n"); + sb.Append(" Width: ").Append(Width).Append("\n"); + sb.Append(" Height: ").Append(Height).Append("\n"); + 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..6023a0f0 --- /dev/null +++ b/ShipEngineSDK/Model/DisplayScheme.cs @@ -0,0 +1,95 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..c1906b9d --- /dev/null +++ b/ShipEngineSDK/Model/Error.cs @@ -0,0 +1,92 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 ErrorSource CLOVUS + /// + [JsonPropertyName("error_source")] + [JsonRequired] + public ErrorSource ErrorSource { get; set; } = new(); + + + /// + /// Gets or Sets ErrorType CLOVUS + /// + [JsonPropertyName("error_type")] + [JsonRequired] + public ErrorType ErrorType { get; set; } = new(); + + + /// + /// Gets or Sets ErrorCode CLOVUS + /// + [JsonPropertyName("error_code")] + [JsonRequired] + public ErrorCode ErrorCode { get; set; } = new(); + + + /// + /// An error message associated with the failed API call + /// + /// An error message associated with the failed API call + /// + /// Body of request cannot be null. + /// + [JsonPropertyName("message")] + [JsonRequired] + public string Message { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Error {\n"); + sb.Append(" ErrorSource: ").Append(ErrorSource).Append("\n"); + sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); + sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + 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..25c8b99b --- /dev/null +++ b/ShipEngineSDK/Model/ErrorCode.cs @@ -0,0 +1,323 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..b977ffaa --- /dev/null +++ b/ShipEngineSDK/Model/ErrorResponseBody.cs @@ -0,0 +1,74 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ErrorResponseBody {\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..ccc68753 --- /dev/null +++ b/ShipEngineSDK/Model/ErrorSource.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..95c47c41 --- /dev/null +++ b/ShipEngineSDK/Model/ErrorType.cs @@ -0,0 +1,101 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..5e9bea3f --- /dev/null +++ b/ShipEngineSDK/Model/ErrorWithLabelIdResponseBody.cs @@ -0,0 +1,74 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ErrorWithLabelIdResponseBody {\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..62dd7c5d --- /dev/null +++ b/ShipEngineSDK/Model/EstimateRatesRequestBody.cs @@ -0,0 +1,439 @@ +/* + * 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.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 +{ + + /// + /// Gets or Sets Confirmation + /// + [JsonPropertyName("confirmation")] + public DeliveryConfirmation? Confirmation { get; set; } + /// + /// Gets or Sets AddressResidentialIndicator + /// + [JsonPropertyName("address_residential_indicator")] + public AddressResidentialIndicator? AddressResidentialIndicator { 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")] + [JsonRequired] + public string FromCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("from_postal_code")] + [JsonRequired] + public string FromPostalCode { get; set; } + + /// + /// from postal code + /// + /// from postal code + /// + /// Austin + /// + [JsonPropertyName("from_city_locality")] + [JsonRequired] + public string FromCityLocality { get; set; } + + /// + /// From state province + /// + /// From state province + /// + /// Austin + /// + [JsonPropertyName("from_state_province")] + [JsonRequired] + public string FromStateProvince { 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")] + [JsonRequired] + public string ToCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("to_postal_code")] + [JsonRequired] + public string ToPostalCode { 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")] + [JsonRequired] + public string ToCityLocality { get; set; } + + /// + /// To state province + /// + /// To state province + /// + /// Houston + /// + [JsonPropertyName("to_state_province")] + [JsonRequired] + public string ToStateProvince { get; set; } + + /// + /// The weight of the package + /// + /// The weight of the package + [JsonPropertyName("weight")] + [JsonRequired] + public Weight Weight { get; set; } + + /// + /// The dimensions of the package + /// + /// The dimensions of the package + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { get; set; } + + /// + /// ship date + /// + /// ship date + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RateEstimateByCarrierId. + public EstimateRatesRequestBody(RateEstimateByCarrierId actualInstance) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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(" FromCountryCode: ").Append(this.FromCountryCode).Append("\n"); + sb.Append(" FromPostalCode: ").Append(this.FromPostalCode).Append("\n"); + sb.Append(" FromCityLocality: ").Append(this.FromCityLocality).Append("\n"); + sb.Append(" FromStateProvince: ").Append(this.FromStateProvince).Append("\n"); + sb.Append(" ToCountryCode: ").Append(this.ToCountryCode).Append("\n"); + sb.Append(" ToPostalCode: ").Append(this.ToPostalCode).Append("\n"); + sb.Append(" ToCityLocality: ").Append(this.ToCityLocality).Append("\n"); + sb.Append(" ToStateProvince: ").Append(this.ToStateProvince).Append("\n"); + sb.Append(" Weight: ").Append(this.Weight).Append("\n"); + sb.Append(" Dimensions: ").Append(this.Dimensions).Append("\n"); + sb.Append(" Confirmation: ").Append(this.Confirmation).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(this.AddressResidentialIndicator).Append("\n"); + sb.Append(" ShipDate: ").Append(this.ShipDate).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 HashSet OneOfTypes = [typeof(RateEstimateByCarrierId), typeof(RateEstimateByCarrierIds)]; + private static HashSet MandatoryFields = ["FromCityLocality", "FromCountryCode", "FromPostalCode", "FromStateProvince", "ShipDate", "ToCityLocality", "ToCountryCode", "ToPostalCode", "ToStateProvince", "Weight"]; + private static 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_country_code"); + JsonSerializer.Serialize(writer, value.FromCountryCode, options); + writer.WritePropertyName("from_postal_code"); + JsonSerializer.Serialize(writer, value.FromPostalCode, options); + writer.WritePropertyName("from_city_locality"); + JsonSerializer.Serialize(writer, value.FromCityLocality, options); + writer.WritePropertyName("from_state_province"); + JsonSerializer.Serialize(writer, value.FromStateProvince, 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_city_locality"); + JsonSerializer.Serialize(writer, value.ToCityLocality, options); + writer.WritePropertyName("to_state_province"); + JsonSerializer.Serialize(writer, value.ToStateProvince, options); + writer.WritePropertyName("weight"); + JsonSerializer.Serialize(writer, value.Weight, options); + writer.WritePropertyName("dimensions"); + JsonSerializer.Serialize(writer, value.Dimensions, options); + writer.WritePropertyName("confirmation"); + JsonSerializer.Serialize(writer, value.Confirmation, options); + writer.WritePropertyName("address_residential_indicator"); + JsonSerializer.Serialize(writer, value.AddressResidentialIndicator, options); + writer.WritePropertyName("ship_date"); + JsonSerializer.Serialize(writer, value.ShipDate, 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; + + int match = 0; + var matchedTypes = new List(); + + try + { + newEstimateRatesRequestBody = new EstimateRatesRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("RateEstimateByCarrierId"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RateEstimateByCarrierId: {1}", jsonDoc, exception.ToString())); + } + + try + { + newEstimateRatesRequestBody = new EstimateRatesRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("RateEstimateByCarrierIds"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RateEstimateByCarrierIds: {1}", jsonDoc, exception.ToString())); + } + + 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); + } + + newEstimateRatesRequestBody.FromCountryCode = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("from_country_code"), DeserializingOptions); + newEstimateRatesRequestBody.FromPostalCode = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("from_postal_code"), DeserializingOptions); + newEstimateRatesRequestBody.FromCityLocality = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("from_city_locality"), DeserializingOptions); + newEstimateRatesRequestBody.FromStateProvince = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("from_state_province"), DeserializingOptions); + newEstimateRatesRequestBody.ToCountryCode = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("to_country_code"), DeserializingOptions); + newEstimateRatesRequestBody.ToPostalCode = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("to_postal_code"), DeserializingOptions); + newEstimateRatesRequestBody.ToCityLocality = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("to_city_locality"), DeserializingOptions); + newEstimateRatesRequestBody.ToStateProvince = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("to_state_province"), DeserializingOptions); + newEstimateRatesRequestBody.Weight = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("weight"), DeserializingOptions); + newEstimateRatesRequestBody.Dimensions = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("dimensions"), DeserializingOptions); + newEstimateRatesRequestBody.Confirmation = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("confirmation"), DeserializingOptions); + newEstimateRatesRequestBody.AddressResidentialIndicator = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("address_residential_indicator"), DeserializingOptions); + newEstimateRatesRequestBody.ShipDate = JsonSerializer.Deserialize(jsonDoc.RootElement.GetProperty("ship_date"), DeserializingOptions); + + // 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..1087fbfc --- /dev/null +++ b/ShipEngineSDK/Model/FedexAccountSettings.cs @@ -0,0 +1,100 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 PickupType CLOVUS + /// + [JsonPropertyName("pickup_type")] + public FedexPickupType? PickupType { get; set; } + /// + /// Gets or Sets SmartPostHub CLOVUS + /// + [JsonPropertyName("smart_post_hub")] + public SmartPostHub? SmartPostHub { get; set; } + /// + /// Gets or Sets SmartPostEndorsement CLOVUS + /// + [JsonPropertyName("smart_post_endorsement")] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image")] + public string SignatureImage { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image")] + public string LetterheadImage { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FedexAccountSettings {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + 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..b8a0eb5a --- /dev/null +++ b/ShipEngineSDK/Model/FedexAccountSettingsRequestBody.cs @@ -0,0 +1,100 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 PickupType CLOVUS + /// + [JsonPropertyName("pickup_type")] + public FedexPickupType? PickupType { get; set; } + /// + /// Gets or Sets SmartPostHub CLOVUS + /// + [JsonPropertyName("smart_post_hub")] + public SmartPostHub? SmartPostHub { get; set; } + /// + /// Gets or Sets SmartPostEndorsement CLOVUS + /// + [JsonPropertyName("smart_post_endorsement")] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image")] + public string SignatureImage { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image")] + public string LetterheadImage { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FedexAccountSettingsRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + 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..9eacf38e --- /dev/null +++ b/ShipEngineSDK/Model/FedexPickupType.cs @@ -0,0 +1,101 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..299427b2 --- /dev/null +++ b/ShipEngineSDK/Model/FedexSettingsResponseBody.cs @@ -0,0 +1,100 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 PickupType CLOVUS + /// + [JsonPropertyName("pickup_type")] + public FedexPickupType? PickupType { get; set; } + /// + /// Gets or Sets SmartPostHub CLOVUS + /// + [JsonPropertyName("smart_post_hub")] + public SmartPostHub? SmartPostHub { get; set; } + /// + /// Gets or Sets SmartPostEndorsement CLOVUS + /// + [JsonPropertyName("smart_post_endorsement")] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image")] + public string SignatureImage { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image")] + public string LetterheadImage { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FedexSettingsResponseBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + 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..9c0c6343 --- /dev/null +++ b/ShipEngineSDK/Model/GetAccountSettingsImagesResponseBody.cs @@ -0,0 +1,172 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _value; + + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + public ImageContentTypeEnum(string 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"); + + + 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 CLOVUS + /// + /// The image type + [JsonPropertyName("image_content_type")] + public ImageContentTypeEnum? ImageContentType { 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. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id")] + public string LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name")] + 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")] + public bool IsDefault { 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")] + 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")] + public DateTime 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")] + public DateTime ModifiedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetAccountSettingsImagesResponseBody {\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + 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..61ef35bf --- /dev/null +++ b/ShipEngineSDK/Model/GetAccountSettingsResponseBody.cs @@ -0,0 +1,59 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("default_label_layout")] + public DefaultLabelLayout? DefaultLabelLayout { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetAccountSettingsResponseBody {\n"); + sb.Append(" DefaultLabelLayout: ").Append(DefaultLabelLayout).Append("\n"); + 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..f0ccb18b --- /dev/null +++ b/ShipEngineSDK/Model/GetBatchByExternalIdResponseBody.cs @@ -0,0 +1,270 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// label layout CLOVUS + /// + /// label layout + [JsonPropertyName("label_layout")] + [JsonRequired] + public LabelLayout LabelLayout { get; set; } = new(); + + + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + [JsonRequired] + public LabelFormat LabelFormat { get; set; } = new(); + + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public BatchStatus Status { get; set; } = new(); + + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id")] + [JsonRequired] + public string BatchId { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + [JsonPropertyName("batch_number")] + [JsonRequired] + public string BatchNumber { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + [JsonPropertyName("external_batch_id")] + [JsonRequired] + public string ExternalBatchId { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes")] + [JsonRequired] + public string BatchNotes { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at")] + [JsonRequired] + public DateTime ProcessedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// 2 + /// + [JsonPropertyName("errors")] + [JsonRequired] + public int Errors { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("process_errors")] + [JsonRequired] + public List ProcessErrors { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// 1 + /// + [JsonPropertyName("warnings")] + [JsonRequired] + public int Warnings { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// 1 + /// + [JsonPropertyName("completed")] + [JsonRequired] + public int Completed { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// 3 + /// + [JsonPropertyName("forms")] + [JsonRequired] + public int Forms { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// 2 + /// + [JsonPropertyName("count")] + [JsonRequired] + public int Count { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url")] + [JsonRequired] + public OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url")] + [JsonRequired] + public OptionalLink BatchLabelsUrl { get; set; } + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + [JsonPropertyName("batch_errors_url")] + [JsonRequired] + public OptionalLink BatchErrorsUrl { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + [JsonPropertyName("label_download")] + [JsonRequired] + public LabelDownload LabelDownload { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + [JsonPropertyName("form_download")] + [JsonRequired] + public OptionalLink 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")] + [JsonRequired] + public PaperlessDownload PaperlessDownload { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetBatchByExternalIdResponseBody {\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + 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..d09f9535 --- /dev/null +++ b/ShipEngineSDK/Model/GetBatchByIdResponseBody.cs @@ -0,0 +1,270 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// label layout CLOVUS + /// + /// label layout + [JsonPropertyName("label_layout")] + [JsonRequired] + public LabelLayout LabelLayout { get; set; } = new(); + + + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + [JsonRequired] + public LabelFormat LabelFormat { get; set; } = new(); + + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public BatchStatus Status { get; set; } = new(); + + + /// + /// A string that uniquely identifies the batch + /// + /// A string that uniquely identifies the batch + /// + /// se-28529731 + /// + [JsonPropertyName("batch_id")] + [JsonRequired] + public string BatchId { get; set; } + + /// + /// The batch number. + /// + /// The batch number. + [JsonPropertyName("batch_number")] + [JsonRequired] + public string BatchNumber { get; set; } + + /// + /// A string that uniquely identifies the external batch + /// + /// A string that uniquely identifies the external batch + [JsonPropertyName("external_batch_id")] + [JsonRequired] + public string ExternalBatchId { get; set; } + + /// + /// Custom notes you can add for each created batch + /// + /// Custom notes you can add for each created batch + /// + /// Batch for morning shipment + /// + [JsonPropertyName("batch_notes")] + [JsonRequired] + public string BatchNotes { get; set; } + + /// + /// The date and time the batch was created in ShipEngine + /// + /// The date and time the batch was created in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time the batch was processed in ShipEngine + /// + /// The date and time the batch was processed in ShipEngine + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("processed_at")] + [JsonRequired] + public DateTime ProcessedAt { get; set; } + + /// + /// The number of errors that occurred while generating the batch + /// + /// The number of errors that occurred while generating the batch + /// + /// 2 + /// + [JsonPropertyName("errors")] + [JsonRequired] + public int Errors { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("process_errors")] + [JsonRequired] + public List ProcessErrors { get; set; } + + /// + /// The number of warnings that occurred while generating the batch + /// + /// The number of warnings that occurred while generating the batch + /// + /// 1 + /// + [JsonPropertyName("warnings")] + [JsonRequired] + public int Warnings { get; set; } + + /// + /// The number of labels generated in the batch + /// + /// The number of labels generated in the batch + /// + /// 1 + /// + [JsonPropertyName("completed")] + [JsonRequired] + public int Completed { get; set; } + + /// + /// The number of forms for customs that are available for download + /// + /// The number of forms for customs that are available for download + /// + /// 3 + /// + [JsonPropertyName("forms")] + [JsonRequired] + public int Forms { get; set; } + + /// + /// The total of errors, warnings, and completed properties + /// + /// The total of errors, warnings, and completed properties + /// + /// 2 + /// + [JsonPropertyName("count")] + [JsonRequired] + public int Count { get; set; } + + /// + /// The batch shipments endpoint + /// + /// The batch shipments endpoint + [JsonPropertyName("batch_shipments_url")] + [JsonRequired] + public OptionalLink BatchShipmentsUrl { get; set; } + + /// + /// Link to batch labels query + /// + /// Link to batch labels query + [JsonPropertyName("batch_labels_url")] + [JsonRequired] + public OptionalLink BatchLabelsUrl { get; set; } + + /// + /// Link to batch errors endpoint + /// + /// Link to batch errors endpoint + [JsonPropertyName("batch_errors_url")] + [JsonRequired] + public OptionalLink BatchErrorsUrl { get; set; } + + /// + /// The label download for the batch + /// + /// The label download for the batch + [JsonPropertyName("label_download")] + [JsonRequired] + public LabelDownload LabelDownload { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + [JsonPropertyName("form_download")] + [JsonRequired] + public OptionalLink 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")] + [JsonRequired] + public PaperlessDownload PaperlessDownload { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetBatchByIdResponseBody {\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" BatchNumber: ").Append(BatchNumber).Append("\n"); + sb.Append(" ExternalBatchId: ").Append(ExternalBatchId).Append("\n"); + sb.Append(" BatchNotes: ").Append(BatchNotes).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ProcessedAt: ").Append(ProcessedAt).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" ProcessErrors: ").Append(ProcessErrors).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append(" Completed: ").Append(Completed).Append("\n"); + sb.Append(" Forms: ").Append(Forms).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" BatchShipmentsUrl: ").Append(BatchShipmentsUrl).Append("\n"); + sb.Append(" BatchLabelsUrl: ").Append(BatchLabelsUrl).Append("\n"); + sb.Append(" BatchErrorsUrl: ").Append(BatchErrorsUrl).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + 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..3c26922d --- /dev/null +++ b/ShipEngineSDK/Model/GetCarrierByIdResponseBody.cs @@ -0,0 +1,183 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the carrier. + /// + /// A string that uniquely identifies the carrier. + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + public string CarrierId { 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")] + public string CarrierCode { get; set; } + + /// + /// The account number that the carrier is connected to. + /// + /// The account number that the carrier is connected to. + /// + /// account_570827 + /// + [JsonPropertyName("account_number")] + public string AccountNumber { get; set; } + + /// + /// Indicates whether the carrier requires funding to use its services + /// + /// Indicates whether the carrier requires funding to use its services + [JsonPropertyName("requires_funded_amount")] + public bool RequiresFundedAmount { get; set; } + + /// + /// Current available balance + /// + /// Current available balance + /// + /// 3799.52 + /// + [JsonPropertyName("balance")] + public double Balance { get; set; } + + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// Nickname given to the account when initially setting up the carrier. + /// + /// ShipEngine Account - Stamps.com + /// + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Screen readable name + /// + /// Screen readable name + /// + /// Stamps.com + /// + [JsonPropertyName("friendly_name")] + public string FriendlyName { 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 + [JsonPropertyName("primary")] + public bool Primary { get; set; } + + /// + /// Carrier supports multiple packages per shipment + /// + /// Carrier supports multiple packages per shipment + [JsonPropertyName("has_multi_package_supporting_services")] + public bool HasMultiPackageSupportingServices { get; set; } + + /// + /// The carrier supports adding custom label messages to an order. + /// + /// The carrier supports adding custom label messages to an order. + [JsonPropertyName("supports_label_messages")] + public bool SupportsLabelMessages { 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. + [JsonPropertyName("disabled_by_billing_plan")] + public bool DisabledByBillingPlan { get; set; } + + /// + /// A list of services that are offered by the carrier + /// + /// A list of services that are offered by the carrier + [JsonPropertyName("services")] + public List Services { get; set; } + + /// + /// A list of package types that are supported by the carrier + /// + /// A list of package types that are supported by the carrier + [JsonPropertyName("packages")] + public List Packages { get; set; } + + /// + /// A list of options that are available to that carrier + /// + /// A list of options that are available to that carrier + [JsonPropertyName("options")] + public List Options { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetCarrierByIdResponseBody {\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" RequiresFundedAmount: ").Append(RequiresFundedAmount).Append("\n"); + sb.Append(" Balance: ").Append(Balance).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" FriendlyName: ").Append(FriendlyName).Append("\n"); + sb.Append(" Primary: ").Append(Primary).Append("\n"); + sb.Append(" HasMultiPackageSupportingServices: ").Append(HasMultiPackageSupportingServices).Append("\n"); + sb.Append(" SupportsLabelMessages: ").Append(SupportsLabelMessages).Append("\n"); + sb.Append(" DisabledByBillingPlan: ").Append(DisabledByBillingPlan).Append("\n"); + sb.Append(" Services: ").Append(Services).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" Options: ").Append(Options).Append("\n"); + 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..90fd80f2 --- /dev/null +++ b/ShipEngineSDK/Model/GetCarrierOptionsResponseBody.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("options")] + public List Options { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetCarrierOptionsResponseBody {\n"); + sb.Append(" Options: ").Append(Options).Append("\n"); + 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..f53a5a7e --- /dev/null +++ b/ShipEngineSDK/Model/GetCarrierSettingsResponseBody.cs @@ -0,0 +1,301 @@ +/* + * 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.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 HashSet OneOfTypes = [typeof(DhlExpressSettingsResponseBody), typeof(FedexSettingsResponseBody), typeof(UpsSettingsResponseBody)]; + private static HashSet MandatoryFields = []; + private static 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(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("DhlExpressSettingsResponseBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DhlExpressSettingsResponseBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newGetCarrierSettingsResponseBody = new GetCarrierSettingsResponseBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("FedexSettingsResponseBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into FedexSettingsResponseBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newGetCarrierSettingsResponseBody = new GetCarrierSettingsResponseBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("UpsSettingsResponseBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into UpsSettingsResponseBody: {1}", jsonDoc, exception.ToString())); + } + + 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..10439965 --- /dev/null +++ b/ShipEngineSDK/Model/GetCarriersResponseBody.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("carriers")] + [JsonRequired] + public List Carriers { 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetCarriersResponseBody {\n"); + sb.Append(" Carriers: ").Append(Carriers).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..d8de398f --- /dev/null +++ b/ShipEngineSDK/Model/GetInsuranceBalanceResponseBody.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + [JsonRequired] + public string Currency { get; set; } + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount")] + [JsonRequired] + public double Amount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetInsuranceBalanceResponseBody {\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + 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..8614d9cc --- /dev/null +++ b/ShipEngineSDK/Model/GetLabelByExternalShipmentIdResponseBody.cs @@ -0,0 +1,388 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public LabelStatus? Status { get; set; } + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { get; set; } + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + public TrackingStatus? TrackingStatus { 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. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id")] + public string LabelId { 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { 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")] + 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")] + 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")] + [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")] + public string PackageCode { 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")] + 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")] + public DateTime VoidedAt { 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")] + 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")] + 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetLabelByExternalShipmentIdResponseBody {\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..5e6d7cbb --- /dev/null +++ b/ShipEngineSDK/Model/GetLabelByIdResponseBody.cs @@ -0,0 +1,388 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public LabelStatus? Status { get; set; } + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { get; set; } + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + public TrackingStatus? TrackingStatus { 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. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id")] + public string LabelId { 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { 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")] + 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")] + 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")] + [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")] + public string PackageCode { 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")] + 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")] + public DateTime VoidedAt { 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")] + 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")] + 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetLabelByIdResponseBody {\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..602f584f --- /dev/null +++ b/ShipEngineSDK/Model/GetManifestByIdResponseBody.cs @@ -0,0 +1,166 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 manifest + /// + /// A string that uniquely identifies the manifest + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id")] + [JsonRequired] + public string ManifestId { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// se-28529731 + /// + [JsonPropertyName("form_id")] + [JsonRequired] + public string FormId { 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")] + [JsonRequired] + public DateTime CreatedAt { 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")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// 100 + /// + [JsonPropertyName("shipments")] + [JsonRequired] + public int Shipments { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + [JsonPropertyName("label_ids")] + [JsonRequired] + public List LabelIds { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [JsonRequired] + public string WarehouseId { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id")] + [JsonRequired] + public string SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [JsonRequired] + public string CarrierId { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + [JsonPropertyName("manifest_download")] + [JsonRequired] + public ManifestDownload ManifestDownload { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetManifestByIdResponseBody {\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + 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..a5028ae7 --- /dev/null +++ b/ShipEngineSDK/Model/GetPackageTypeByIdResponseBody.cs @@ -0,0 +1,106 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id")] + public string PackageId { 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")] + [JsonRequired] + public string PackageCode { get; set; } + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description")] + public string Description { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetPackageTypeByIdResponseBody {\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + 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..dc285722 --- /dev/null +++ b/ShipEngineSDK/Model/GetPickupByIdResponseBody.cs @@ -0,0 +1,194 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id")] + [JsonRequired] + public string PickupId { 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")] + [JsonRequired] + public List LabelIds { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at")] + public DateTime CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [JsonRequired] + public string CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number")] + [JsonRequired] + public string ConfirmationNumber { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [JsonRequired] + public string WarehouseId { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + [JsonPropertyName("pickup_address")] + [JsonRequired] + public Address PickupAddress { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details")] + [JsonRequired] + public ContactDetails ContactDetails { 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")] + public string PickupNotes { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window")] + [JsonRequired] + 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. + [JsonPropertyName("pickup_windows")] + public List PickupWindows { 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetPickupByIdResponseBody {\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).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(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).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(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..fee2f236 --- /dev/null +++ b/ShipEngineSDK/Model/GetPickupsResponseBody.cs @@ -0,0 +1,128 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// An array of pickups associated with the user's account. + /// + /// An array of pickups associated with the user's account. + [JsonPropertyName("pickups")] + [JsonRequired] + public List Pickups { get; set; } + + /// + /// The total number of pickups returned + /// + /// The total number of pickups returned + /// + /// 3 + /// + [JsonPropertyName("total")] + [JsonRequired] + public long Total { get; set; } + + /// + /// Current page of the list pickups results + /// + /// Current page of the list pickups results + /// + /// 3 + /// + [JsonPropertyName("page")] + [JsonRequired] + public int Page { get; set; } + + /// + /// Total number of pages for list pickups results + /// + /// Total number of pages for list pickups results + /// + /// 4 + /// + [JsonPropertyName("pages")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Helpful links to other pages of results + /// + /// Helpful links to other pages of results + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetPickupsResponseBody {\n"); + sb.Append(" Pickups: ").Append(Pickups).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..ed24acea --- /dev/null +++ b/ShipEngineSDK/Model/GetRateByIdResponseBody.cs @@ -0,0 +1,299 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets RateType CLOVUS + /// + [JsonPropertyName("rate_type")] + [JsonRequired] + public RateType RateType { get; set; } = new(); + + + /// + /// Gets or Sets ValidationStatus CLOVUS + /// + [JsonPropertyName("validation_status")] + [JsonRequired] + public ValidationStatus ValidationStatus { get; set; } = new(); + + + /// + /// A string that uniquely identifies the rate + /// + /// A string that uniquely identifies the rate + /// + /// se-28529731 + /// + [JsonPropertyName("rate_id")] + [JsonRequired] + public string RateId { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [JsonRequired] + public string CarrierId { 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. + [JsonPropertyName("shipping_amount")] + [JsonRequired] + public MonetaryValue ShippingAmount { 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. + [JsonPropertyName("insurance_amount")] + [JsonRequired] + public MonetaryValue InsuranceAmount { 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. + [JsonPropertyName("confirmation_amount")] + [JsonRequired] + public MonetaryValue ConfirmationAmount { 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. + [JsonPropertyName("other_amount")] + [JsonRequired] + public MonetaryValue OtherAmount { 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")] + public MonetaryValue RequestedComparisonAmount { get; set; } + + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// Tariff and additional taxes associated with an international shipment. + [JsonPropertyName("tax_amount")] + 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 + /// + /// 6 + /// + [JsonPropertyName("zone")] + [JsonRequired] + public int? Zone { get; set; } + + /// + /// package type that this rate was estimated for + /// + /// package type that this rate was estimated for + /// + /// package + /// + [JsonPropertyName("package_type")] + [JsonRequired] + public string PackageType { 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 + /// + /// 5 + /// + [JsonPropertyName("delivery_days")] + public int DeliveryDays { get; set; } + + /// + /// Indicates if the rate is guaranteed. + /// + /// Indicates if the rate is guaranteed. + [JsonPropertyName("guaranteed_service")] + [JsonRequired] + public bool GuaranteedService { 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("estimated_delivery_date")] + public DateTime EstimatedDeliveryDate { get; set; } + + /// + /// The carrier delivery days + /// + /// The carrier delivery days + [JsonPropertyName("carrier_delivery_days")] + public string CarrierDeliveryDays { get; set; } + + /// + /// ship date + /// + /// ship date + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + /// + /// Indicates if the rates been negotiated + /// + /// Indicates if the rates been negotiated + [JsonPropertyName("negotiated_rate")] + [JsonRequired] + public bool NegotiatedRate { get; set; } + + /// + /// service type + /// + /// service type + [JsonPropertyName("service_type")] + [JsonRequired] + public string ServiceType { get; set; } + + /// + /// service code for the rate + /// + /// service code for the rate + [JsonPropertyName("service_code")] + [JsonRequired] + public string ServiceCode { get; set; } + + /// + /// Indicates if rate is trackable + /// + /// Indicates if rate is trackable + [JsonPropertyName("trackable")] + [JsonRequired] + public bool Trackable { get; set; } + + /// + /// carrier code + /// + /// carrier code + [JsonPropertyName("carrier_code")] + [JsonRequired] + public string CarrierCode { get; set; } + + /// + /// carrier nickname + /// + /// carrier nickname + [JsonPropertyName("carrier_nickname")] + [JsonRequired] + public string CarrierNickname { get; set; } + + /// + /// carrier friendly name + /// + /// carrier friendly name + [JsonPropertyName("carrier_friendly_name")] + [JsonRequired] + public string CarrierFriendlyName { get; set; } + + /// + /// The warning messages + /// + /// The warning messages + [JsonPropertyName("warning_messages")] + [JsonRequired] + public List WarningMessages { get; set; } + + /// + /// The error messages + /// + /// The error messages + [JsonPropertyName("error_messages")] + [JsonRequired] + public List ErrorMessages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetRateByIdResponseBody {\n"); + sb.Append(" RateId: ").Append(RateId).Append("\n"); + sb.Append(" RateType: ").Append(RateType).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ShippingAmount: ").Append(ShippingAmount).Append("\n"); + sb.Append(" InsuranceAmount: ").Append(InsuranceAmount).Append("\n"); + sb.Append(" ConfirmationAmount: ").Append(ConfirmationAmount).Append("\n"); + sb.Append(" OtherAmount: ").Append(OtherAmount).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TaxAmount: ").Append(TaxAmount).Append("\n"); + sb.Append(" Zone: ").Append(Zone).Append("\n"); + sb.Append(" PackageType: ").Append(PackageType).Append("\n"); + sb.Append(" DeliveryDays: ").Append(DeliveryDays).Append("\n"); + sb.Append(" GuaranteedService: ").Append(GuaranteedService).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" CarrierDeliveryDays: ").Append(CarrierDeliveryDays).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" NegotiatedRate: ").Append(NegotiatedRate).Append("\n"); + sb.Append(" ServiceType: ").Append(ServiceType).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierNickname: ").Append(CarrierNickname).Append("\n"); + sb.Append(" CarrierFriendlyName: ").Append(CarrierFriendlyName).Append("\n"); + sb.Append(" ValidationStatus: ").Append(ValidationStatus).Append("\n"); + sb.Append(" WarningMessages: ").Append(WarningMessages).Append("\n"); + sb.Append(" ErrorMessages: ").Append(ErrorMessages).Append("\n"); + 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..ac1547d4 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointByIdResponseBody.cs @@ -0,0 +1,60 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public GetServicePointByIdResponseBodyServicePoint ServicePoint { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetServicePointByIdResponseBody {\n"); + sb.Append(" ServicePoint: ").Append(ServicePoint).Append("\n"); + 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..a30bf9c1 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointByIdResponseBodyServicePoint.cs @@ -0,0 +1,312 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _value; + + internal FeaturesEnum() + { + _value = "drop_off_point"; + } + + public FeaturesEnum(string 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"); + + + 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 string _value; + + internal TypeEnum() + { + _value = "pudo"; + } + + public TypeEnum(string 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"); + + + 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); + } + + + /// + /// Service point type CLOVUS + /// + /// Service point type + [JsonPropertyName("type")] + public TypeEnum? Type { 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets ServiceCodes + /// + [JsonPropertyName("service_codes")] + 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")] + public string ServicePointId { 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")] + public string CompanyName { 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. + /// + /// PLACE DU CANADA + /// + [JsonPropertyName("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// TRUN + /// + [JsonPropertyName("city_locality")] + public string CityLocality { 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")] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + public string PostalCode { 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")] + public string CountryCode { get; set; } + + /// + /// Phone number associated + /// + /// Phone number associated + /// + /// 555-555-5555 + /// + [JsonPropertyName("phone_number")] + public string PhoneNumber { 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")] + 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")] + public double Long { get; set; } + + /// + /// Gets or Sets HoursOfOperation + /// + [JsonPropertyName("hours_of_operation")] + public ListServicePointsResponseBodyServicePointsInnerHoursOfOperation HoursOfOperation { get; set; } + + /// + /// Service features + /// + /// Service features + [JsonPropertyName("features")] + public List Features { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetServicePointByIdResponseBodyServicePoint {\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" ServiceCodes: ").Append(ServiceCodes).Append("\n"); + sb.Append(" ServicePointId: ").Append(ServicePointId).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" HoursOfOperation: ").Append(HoursOfOperation).Append("\n"); + sb.Append(" Features: ").Append(Features).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + 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..339e5b89 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequest.cs @@ -0,0 +1,223 @@ +/* + * 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.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 HashSet OneOfTypes = [typeof(GetServicePointsRequestBody)]; + private static HashSet MandatoryFields = ["Providers"]; + private static 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(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("GetServicePointsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into GetServicePointsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + 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..08cc37c3 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBody.cs @@ -0,0 +1,131 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Unstructured text to search for service points by. + /// + /// Unstructured text to search for service points by. + /// + /// 177A Bleecker Street New York + /// + [JsonPropertyName("address_query")] + public string AddressQuery { get; set; } + + /// + /// Gets or Sets Address + /// + [JsonPropertyName("address")] + public GetServicePointsRequestBodyAddress Address { get; set; } + + /// + /// An array of shipping service providers and service codes + /// + /// An array of shipping service providers and service codes + [JsonPropertyName("providers")] + [JsonRequired] + public List Providers { 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")] + 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")] + public double Long { get; set; } + + /// + /// Search radius in kilometers + /// + /// Search radius in kilometers + /// + /// 500 + /// + [JsonPropertyName("radius")] + public int Radius { get; set; } + + /// + /// The maximum number of service points to return + /// + /// The maximum number of service points to return + /// + /// 25 + /// + [JsonPropertyName("max_results")] + public int MaxResults { get; set; } + + /// + /// Gets or Sets Shipment + /// + [JsonPropertyName("shipment")] + public GetServicePointsRequestBodyShipment Shipment { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBody {\n"); + sb.Append(" AddressQuery: ").Append(AddressQuery).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" Providers: ").Append(Providers).Append("\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" Radius: ").Append(Radius).Append("\n"); + sb.Append(" MaxResults: ").Append(MaxResults).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + 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..dab65357 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBodyAddress.cs @@ -0,0 +1,117 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + public string AddressLine1 { get; set; } + + /// + /// Gets or Sets AddressLine2 + /// + [JsonPropertyName("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// Gets or Sets AddressLine3 + /// + [JsonPropertyName("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + [JsonPropertyName("city_locality")] + public string CityLocality { 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")] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + public string PostalCode { 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")] + [JsonRequired] + public string CountryCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBodyAddress {\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(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + 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..2ba26e2c --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBodyProvidersInner.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string CarrierId { get; set; } + + /// + /// Gets or Sets ServiceCode + /// + [JsonPropertyName("service_code")] + public List ServiceCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBodyProvidersInner {\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + 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..b042e698 --- /dev/null +++ b/ShipEngineSDK/Model/GetServicePointsRequestBodyShipment.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Shipment total weight + /// + /// Shipment total weight + [JsonPropertyName("total_weight")] + public Weight TotalWeight { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetServicePointsRequestBodyShipment {\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + 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..6bd3aa1e --- /dev/null +++ b/ShipEngineSDK/Model/GetShipmentByExternalIdResponseBody.cs @@ -0,0 +1,314 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + [JsonRequired] + public ShipmentStatus ShipmentStatus { get; set; } = new(); + + + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + [JsonRequired] + public DeliveryConfirmation Confirmation { get; set; } = new(); + + + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + [JsonRequired] + public InsuranceProvider InsuranceProvider { get; set; } = new(); + + + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + [JsonRequired] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + [JsonRequired] + public ShippingAddressTo ShipTo { 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")] + [JsonRequired] + public ShippingAddress ShipFrom { 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")] + [JsonRequired] + public string WarehouseId { 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")] + [JsonRequired] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + [JsonRequired] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + [JsonRequired] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + [JsonRequired] + public List Tags { 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")] + [JsonRequired] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + [JsonRequired] + 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")] + public string ComparisonRateType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetShipmentByExternalIdResponseBody {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + 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..d3f45911 --- /dev/null +++ b/ShipEngineSDK/Model/GetShipmentByIdResponseBody.cs @@ -0,0 +1,314 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + [JsonRequired] + public ShipmentStatus ShipmentStatus { get; set; } = new(); + + + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + [JsonRequired] + public DeliveryConfirmation Confirmation { get; set; } = new(); + + + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + [JsonRequired] + public InsuranceProvider InsuranceProvider { get; set; } = new(); + + + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + [JsonRequired] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + [JsonRequired] + public ShippingAddressTo ShipTo { 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")] + [JsonRequired] + public ShippingAddress ShipFrom { 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")] + [JsonRequired] + public string WarehouseId { 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")] + [JsonRequired] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + [JsonRequired] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + [JsonRequired] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + [JsonRequired] + public List Tags { 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")] + [JsonRequired] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + [JsonRequired] + 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")] + public string ComparisonRateType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetShipmentByIdResponseBody {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + 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..54c6875c --- /dev/null +++ b/ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs @@ -0,0 +1,203 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets StatusCode CLOVUS + /// + [JsonPropertyName("status_code")] + [JsonRequired] + public StatusCode StatusCode { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + public string TrackingNumber { get; set; } + + /// + /// Carrier Tracking Url, if available + /// + /// Carrier Tracking Url, if available + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url")] + public string TrackingUrl { 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")] + public string CarrierCode { get; set; } + + /// + /// 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_id")] + public string CarrierId { get; set; } + + /// + /// Status description + /// + /// Status description + /// + /// Delivered + /// + [JsonPropertyName("status_description")] + public string StatusDescription { get; set; } + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code")] + [JsonRequired] + public string CarrierStatusCode { get; set; } + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code")] + public string CarrierDetailCode { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description")] + 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("ship_date")] + public DateTime ShipDate { 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")] + [JsonRequired] + public DateTime EstimatedDeliveryDate { 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")] + public DateTime ActualDeliveryDate { get; set; } + + /// + /// Exception description + /// + /// Exception description + [JsonPropertyName("exception_description")] + public string ExceptionDescription { 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. + [JsonPropertyName("events")] + [JsonRequired] + public List Events { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetTrackingLogFromLabelResponseBody {\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" ActualDeliveryDate: ").Append(ActualDeliveryDate).Append("\n"); + sb.Append(" ExceptionDescription: ").Append(ExceptionDescription).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + 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..333d854e --- /dev/null +++ b/ShipEngineSDK/Model/GetTrackingLogResponseBody.cs @@ -0,0 +1,207 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets StatusCode CLOVUS + /// + [JsonPropertyName("status_code")] + [JsonRequired] + public StatusCode StatusCode { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + public string TrackingNumber { get; set; } + + /// + /// Carrier Tracking Url, if available + /// + /// Carrier Tracking Url, if available + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url")] + [JsonRequired] + public string TrackingUrl { 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")] + [JsonRequired] + public string CarrierCode { get; set; } + + /// + /// 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_id")] + [JsonRequired] + public string CarrierId { get; set; } + + /// + /// Status description + /// + /// Status description + /// + /// Delivered + /// + [JsonPropertyName("status_description")] + public string StatusDescription { get; set; } + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code")] + [JsonRequired] + public string CarrierStatusCode { get; set; } + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code")] + [JsonRequired] + public string CarrierDetailCode { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description")] + 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("ship_date")] + public DateTime ShipDate { 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")] + [JsonRequired] + public DateTime EstimatedDeliveryDate { 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")] + public DateTime ActualDeliveryDate { get; set; } + + /// + /// Exception description + /// + /// Exception description + [JsonPropertyName("exception_description")] + public string ExceptionDescription { 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. + [JsonPropertyName("events")] + [JsonRequired] + public List Events { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetTrackingLogResponseBody {\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" ActualDeliveryDate: ").Append(ActualDeliveryDate).Append("\n"); + sb.Append(" ExceptionDescription: ").Append(ExceptionDescription).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + 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..670c6bd9 --- /dev/null +++ b/ShipEngineSDK/Model/GetWarehouseByIdResponseBody.cs @@ -0,0 +1,115 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [JsonRequired] + 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")] + public bool? IsDefault { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address")] + [JsonRequired] + public Address OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address")] + [JsonRequired] + public Address ReturnAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetWarehouseByIdResponseBody {\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + 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..0f81be67 --- /dev/null +++ b/ShipEngineSDK/Model/GetWebhookByIdResponseBody.cs @@ -0,0 +1,94 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("event")] + [JsonRequired] + public WebhookEvent Event { get; set; } = new(); + + + /// + /// A string that uniquely identifies the webhook + /// + /// A string that uniquely identifies the webhook + /// + /// se-28529731 + /// + [JsonPropertyName("webhook_id")] + [JsonRequired] + public string WebhookId { 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")] + [JsonRequired] + public string Url { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers")] + public List Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetWebhookByIdResponseBody {\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + 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..a2d28f19 --- /dev/null +++ b/ShipEngineSDK/Model/IdentifierType.cs @@ -0,0 +1,137 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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. +/// +/// 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. +[JsonConverter(typeof(IdentifierTypeJsonConverter))] +public class IdentifierType +{ + private string _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"); + + + public override string ToString() => _value; +} + +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..59826ed8 --- /dev/null +++ b/ShipEngineSDK/Model/ImporterOfRecords.cs @@ -0,0 +1,179 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + [JsonRequired] + 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")] + public string Phone { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email")] + public string Email { 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")] + public string CompanyName { 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")] + [JsonRequired] + 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")] + 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")] + public string AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality")] + [JsonRequired] + public string CityLocality { 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")] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { 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")] + [JsonRequired] + public string CountryCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ImporterOfRecords {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).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(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + 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..bc84496a --- /dev/null +++ b/ShipEngineSDK/Model/InsuranceProvider.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..b5693447 --- /dev/null +++ b/ShipEngineSDK/Model/InternationalShipmentOptions.cs @@ -0,0 +1,119 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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. CLOVUS + /// + /// The type of contents in this shipment. This may impact import duties or customs treatment. + [JsonPropertyName("contents")] + [JsonRequired] + public PackageContents Contents { get; set; } = new(); + + + /// + /// Indicates what to do if a package is unable to be delivered. CLOVUS + /// + /// Indicates what to do if a package is unable to be delivered. + [JsonPropertyName("non_delivery")] + [JsonRequired] + public NonDelivery NonDelivery { get; set; } = new(); + + + /// + /// Specifies the supported terms of trade code (incoterms) CLOVUS + /// + /// Specifies the supported terms of trade code (incoterms) + [JsonPropertyName("terms_of_trade_code")] + public AllowedIncoterms? TermsOfTradeCode { 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")] + public string ContentsExplanation { get; set; } + + /// + /// Declaration statement to be placed on the commercial invoice + /// + /// Declaration statement to be placed on the commercial invoice + [JsonPropertyName("declaration")] + public string Declaration { get; set; } + + /// + /// Gets or Sets InvoiceAdditionalDetails + /// + [JsonPropertyName("invoice_additional_details")] + public InvoiceAdditionalDetails InvoiceAdditionalDetails { get; set; } + + /// + /// Gets or Sets ImporterOfRecord + /// + [JsonPropertyName("importer_of_record")] + public ImporterOfRecords ImporterOfRecord { 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")] + [Obsolete] + public List CustomsItems { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InternationalShipmentOptions {\n"); + sb.Append(" Contents: ").Append(Contents).Append("\n"); + sb.Append(" ContentsExplanation: ").Append(ContentsExplanation).Append("\n"); + sb.Append(" NonDelivery: ").Append(NonDelivery).Append("\n"); + sb.Append(" TermsOfTradeCode: ").Append(TermsOfTradeCode).Append("\n"); + sb.Append(" Declaration: ").Append(Declaration).Append("\n"); + sb.Append(" InvoiceAdditionalDetails: ").Append(InvoiceAdditionalDetails).Append("\n"); + sb.Append(" ImporterOfRecord: ").Append(ImporterOfRecord).Append("\n"); + sb.Append(" CustomsItems: ").Append(CustomsItems).Append("\n"); + 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..8a28d057 --- /dev/null +++ b/ShipEngineSDK/Model/InvoiceAdditionalDetails.cs @@ -0,0 +1,93 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Freight Charge for shipment. + /// + /// Freight Charge for shipment. + [JsonPropertyName("freight_charge")] + public MonetaryValue FreightCharge { get; set; } + + /// + /// Insurance Charge for shipment. + /// + /// Insurance Charge for shipment. + [JsonPropertyName("insurance_charge")] + public MonetaryValue InsuranceCharge { get; set; } + + /// + /// Discount for shipment. + /// + /// Discount for shipment. + [JsonPropertyName("discount")] + public MonetaryValue Discount { get; set; } + + /// + /// Other charge for shipment. + /// + /// Other charge for shipment. + [JsonPropertyName("other_charge")] + public MonetaryValue OtherCharge { get; set; } + + /// + /// Description for the other charge (if provided). + /// + /// Description for the other charge (if provided). + [JsonPropertyName("other_charge_description")] + public string OtherChargeDescription { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InvoiceAdditionalDetails {\n"); + sb.Append(" FreightCharge: ").Append(FreightCharge).Append("\n"); + sb.Append(" InsuranceCharge: ").Append(InsuranceCharge).Append("\n"); + sb.Append(" Discount: ").Append(Discount).Append("\n"); + sb.Append(" OtherCharge: ").Append(OtherCharge).Append("\n"); + sb.Append(" OtherChargeDescription: ").Append(OtherChargeDescription).Append("\n"); + 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..94bf7ba4 --- /dev/null +++ b/ShipEngineSDK/Model/Label.cs @@ -0,0 +1,388 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public LabelStatus? Status { get; set; } + /// + /// The label charge event. CLOVUS + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + public LabelChargeEvent? ChargeEvent { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + 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. CLOVUS + /// + /// 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")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + 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. CLOVUS + /// + /// 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")] + public LabelLayout? LabelLayout { get; set; } + /// + /// The current status of the package, such as `in_transit` or `delivered` CLOVUS + /// + /// The current status of the package, such as `in_transit` or `delivered` + [JsonPropertyName("tracking_status")] + public TrackingStatus? TrackingStatus { 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. + /// + /// se-28529731 + /// + [JsonPropertyName("label_id")] + public string LabelId { 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { 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")] + 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")] + 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")] + [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")] + public string PackageCode { 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")] + 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")] + public DateTime VoidedAt { 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")] + 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")] + 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string TrackingUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Label {\n"); + sb.Append(" LabelId: ").Append(LabelId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipmentCost: ").Append(ShipmentCost).Append("\n"); + sb.Append(" InsuranceCost: ").Append(InsuranceCost).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" IsReturnLabel: ").Append(IsReturnLabel).Append("\n"); + sb.Append(" RmaNumber: ").Append(RmaNumber).Append("\n"); + sb.Append(" IsInternational: ").Append(IsInternational).Append("\n"); + sb.Append(" BatchId: ").Append(BatchId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ChargeEvent: ").Append(ChargeEvent).Append("\n"); + sb.Append(" OutboundLabelId: ").Append(OutboundLabelId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" TestLabel: ").Append(TestLabel).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" Voided: ").Append(Voided).Append("\n"); + sb.Append(" VoidedAt: ").Append(VoidedAt).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" TrackingStatus: ").Append(TrackingStatus).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" InsuranceClaim: ").Append(InsuranceClaim).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + 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..91f12aff --- /dev/null +++ b/ShipEngineSDK/Model/LabelChargeEvent.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..e98853c8 --- /dev/null +++ b/ShipEngineSDK/Model/LabelDownload.cs @@ -0,0 +1,97 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + 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")] + 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")] + 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")] + public string Zpl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class LabelDownload {\n"); + 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"); + 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..17108609 --- /dev/null +++ b/ShipEngineSDK/Model/LabelDownloadType.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..80868af5 --- /dev/null +++ b/ShipEngineSDK/Model/LabelFormat.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..d1c51518 --- /dev/null +++ b/ShipEngineSDK/Model/LabelLayout.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..fb3dbc19 --- /dev/null +++ b/ShipEngineSDK/Model/LabelMessages.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public string Reference3 { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class LabelMessages {\n"); + sb.Append(" Reference1: ").Append(Reference1).Append("\n"); + sb.Append(" Reference2: ").Append(Reference2).Append("\n"); + sb.Append(" Reference3: ").Append(Reference3).Append("\n"); + 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..af933312 --- /dev/null +++ b/ShipEngineSDK/Model/LabelPackagesInner.cs @@ -0,0 +1,185 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + public string PackageId { 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")] + public string PackageCode { 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")] + public string ContentDescription { get; set; } + + /// + /// The package weight + /// + /// The package weight + [JsonPropertyName("weight")] + [JsonRequired] + public Weight Weight { get; set; } + + /// + /// The package dimensions + /// + /// The package dimensions + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { 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")] + public MonetaryValue InsuredValue { 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. + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number")] + public string TrackingNumber { get; set; } + + /// + /// Gets or Sets LabelMessages + /// + [JsonPropertyName("label_messages")] + public LabelMessages LabelMessages { get; set; } + + /// + /// An external package id. + /// + /// An external package id. + [JsonPropertyName("external_package_id")] + public string ExternalPackageId { get; set; } + + /// + /// The label download for the package + /// + /// The label download for the package + [JsonPropertyName("label_download")] + public LabelDownload LabelDownload { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + [JsonPropertyName("form_download")] + public OptionalLink 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")] + public PaperlessDownload PaperlessDownload { get; set; } + + /// + /// Package sequence + /// + /// Package sequence + [JsonPropertyName("sequence")] + public int Sequence { 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")] + public List Products { get; set; } + + /// + /// Alternative identifiers associated with this package. + /// + /// Alternative identifiers associated with this package. + [JsonPropertyName("alternative_identifiers")] + public List AlternativeIdentifiers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class LabelPackagesInner {\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ContentDescription: ").Append(ContentDescription).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" InsuredValue: ").Append(InsuredValue).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" LabelMessages: ").Append(LabelMessages).Append("\n"); + sb.Append(" ExternalPackageId: ").Append(ExternalPackageId).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" Sequence: ").Append(Sequence).Append("\n"); + sb.Append(" Products: ").Append(Products).Append("\n"); + sb.Append(" AlternativeIdentifiers: ").Append(AlternativeIdentifiers).Append("\n"); + 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..e999ab27 --- /dev/null +++ b/ShipEngineSDK/Model/LabelStatus.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..b5ed45b9 --- /dev/null +++ b/ShipEngineSDK/Model/Link.cs @@ -0,0 +1,73 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + 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")] + public string Type { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Link {\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + 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..78f0c13a --- /dev/null +++ b/ShipEngineSDK/Model/ListAccountImagesResponseBody.cs @@ -0,0 +1,176 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + 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")] + public string LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name")] + 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")] + public bool IsDefault { get; set; } + + /// + /// The file type of the image. + /// + /// The file type of the image. + [JsonPropertyName("image_content_type")] + 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")] + 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")] + public DateTime 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")] + public DateTime ModifiedAt { get; set; } + + } + /// + /// Image List + /// + /// Image List + [JsonPropertyName("images")] + [JsonRequired] + public List Images { 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")] + [JsonRequired] + public int Total { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListAccountImagesResponseBody {\n"); + sb.Append(" Images: ").Append(Images).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..51db7928 --- /dev/null +++ b/ShipEngineSDK/Model/ListAccountSettingsBody.cs @@ -0,0 +1,59 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("default_label_layout")] + public DefaultLabelLayout? DefaultLabelLayout { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListAccountSettingsBody {\n"); + sb.Append(" DefaultLabelLayout: ").Append(DefaultLabelLayout).Append("\n"); + 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..6a774a55 --- /dev/null +++ b/ShipEngineSDK/Model/ListAccountSettingsImagesResponseBody.cs @@ -0,0 +1,176 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + 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")] + public string LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name")] + 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")] + public bool IsDefault { get; set; } + + /// + /// The file type of the image. + /// + /// The file type of the image. + [JsonPropertyName("image_content_type")] + 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")] + 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")] + public DateTime 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")] + public DateTime ModifiedAt { get; set; } + + } + /// + /// Image List + /// + /// Image List + [JsonPropertyName("images")] + [JsonRequired] + public List Images { 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")] + [JsonRequired] + public int Total { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListAccountSettingsImagesResponseBody {\n"); + sb.Append(" Images: ").Append(Images).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..6648bc9a --- /dev/null +++ b/ShipEngineSDK/Model/ListBatchErrorsResponseBody.cs @@ -0,0 +1,70 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListBatchErrorsResponseBody {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..c0933199 --- /dev/null +++ b/ShipEngineSDK/Model/ListBatchesResponseBody.cs @@ -0,0 +1,106 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("batches")] + [JsonRequired] + public List Batches { get; set; } + + /// + /// The total number of batches the API call returned + /// + /// The total number of batches the API call returned + /// + /// 10 + /// + [JsonPropertyName("total")] + [JsonRequired] + public long Total { get; set; } + + /// + /// The page that is currently being read + /// + /// The page that is currently being read + /// + /// 1 + /// + [JsonPropertyName("page")] + [JsonRequired] + 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 + /// + /// 10 + /// + [JsonPropertyName("pages")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListBatchesResponseBody {\n"); + sb.Append(" Batches: ").Append(Batches).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..72fa7160 --- /dev/null +++ b/ShipEngineSDK/Model/ListCarrierPackageTypesResponseBody.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("packages")] + public List Packages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListCarrierPackageTypesResponseBody {\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + 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..09c8620d --- /dev/null +++ b/ShipEngineSDK/Model/ListCarrierServicesResponseBody.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("services")] + public List Services { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListCarrierServicesResponseBody {\n"); + sb.Append(" Services: ").Append(Services).Append("\n"); + 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..0cc2ebba --- /dev/null +++ b/ShipEngineSDK/Model/ListCarriersResponseBody.cs @@ -0,0 +1,62 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("carriers")] + [JsonRequired] + public List Carriers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListCarriersResponseBody {\n"); + sb.Append(" Carriers: ").Append(Carriers).Append("\n"); + 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..b108bd76 --- /dev/null +++ b/ShipEngineSDK/Model/ListLabelsResponseBody.cs @@ -0,0 +1,414 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + 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")] + public string LabelId { get; set; } + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("status")] + 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")] + public string ShipmentId { get; set; } + + /// + /// The shipment information used to generate the label + /// + /// The shipment information used to generate the label + [JsonPropertyName("shipment")] + public Shipment Shipment { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime 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")] + public DateTime 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")] + 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")] + 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")] + public MonetaryValue RequestedComparisonAmount { 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public string CarrierId { get; set; } + + /// + /// The label charge event. + /// + /// The label charge event. + [JsonPropertyName("charge_event")] + 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")] + 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")] + 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")] + [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")] + public string PackageCode { get; set; } + + /// + /// Gets or Sets ValidateAddress + /// + [JsonPropertyName("validate_address")] + 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")] + 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")] + public DateTime? VoidedAt { get; set; } + + /// + /// Gets or Sets LabelDownloadType + /// + [JsonPropertyName("label_download_type")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + public TrackingStatus TrackingStatus { get; set; } + + /// + /// Gets or Sets LabelDownload + /// + [JsonPropertyName("label_download")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + 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")] + [JsonRequired] + public List Labels { 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")] + [JsonRequired] + public int Total { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListLabelsResponseBody {\n"); + sb.Append(" Labels: ").Append(Labels).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..3f7b16b4 --- /dev/null +++ b/ShipEngineSDK/Model/ListManifestsResponseBody.cs @@ -0,0 +1,107 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The list of available manifests + /// + /// The list of available manifests + [JsonPropertyName("manifests")] + [JsonRequired] + public List Manifests { get; set; } + + /// + /// The total number of manifests returned + /// + /// The total number of manifests returned + /// + /// 3 + /// + [JsonPropertyName("total")] + [JsonRequired] + public long Total { get; set; } + + /// + /// Current page of the list manifests results + /// + /// Current page of the list manifests results + /// + /// 3 + /// + [JsonPropertyName("page")] + [JsonRequired] + public int Page { get; set; } + + /// + /// Total number of pages for list manifests results + /// + /// Total number of pages for list manifests results + /// + /// 4 + /// + [JsonPropertyName("pages")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Helpful links to other pages of results + /// + /// Helpful links to other pages of results + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListManifestsResponseBody {\n"); + sb.Append(" Manifests: ").Append(Manifests).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..1b4b368d --- /dev/null +++ b/ShipEngineSDK/Model/ListPackageTypesResponseBody.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("packages")] + public List Packages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListPackageTypesResponseBody {\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + 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..8a13dd93 --- /dev/null +++ b/ShipEngineSDK/Model/ListPickupResponseBody.cs @@ -0,0 +1,107 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// An array of pickups associated with the user's account. + /// + /// An array of pickups associated with the user's account. + [JsonPropertyName("pickups")] + [JsonRequired] + public List Pickups { get; set; } + + /// + /// The total number of pickups returned + /// + /// The total number of pickups returned + /// + /// 3 + /// + [JsonPropertyName("total")] + [JsonRequired] + public long Total { get; set; } + + /// + /// Current page of the list pickups results + /// + /// Current page of the list pickups results + /// + /// 3 + /// + [JsonPropertyName("page")] + [JsonRequired] + public int Page { get; set; } + + /// + /// Total number of pages for list pickups results + /// + /// Total number of pages for list pickups results + /// + /// 4 + /// + [JsonPropertyName("pages")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Helpful links to other pages of results + /// + /// Helpful links to other pages of results + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListPickupResponseBody {\n"); + sb.Append(" Pickups: ").Append(Pickups).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..d48caaca --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBody.cs @@ -0,0 +1,90 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + 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")] + public double Long { get; set; } + + /// + /// Gets or Sets ServicePoints + /// + [JsonPropertyName("service_points")] + public List ServicePoints { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBody {\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" ServicePoints: ").Append(ServicePoints).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..f822ea2c --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInner.cs @@ -0,0 +1,323 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _value; + + internal FeaturesEnum() + { + _value = "drop_off_point"; + } + + public FeaturesEnum(string 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"); + + + 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 string _value; + + internal TypeEnum() + { + _value = "pudo"; + } + + public TypeEnum(string 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"); + + + 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); + } + + + /// + /// Service point type CLOVUS + /// + /// Service point type + [JsonPropertyName("type")] + public TypeEnum? Type { 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")] + public string CarrierCode { get; set; } + + /// + /// Gets or Sets ServiceCodes + /// + [JsonPropertyName("service_codes")] + 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")] + public string ServicePointId { 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")] + public string CompanyName { 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. + /// + /// PLACE DU CANADA + /// + [JsonPropertyName("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// TRUN + /// + [JsonPropertyName("city_locality")] + public string CityLocality { 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")] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + public string PostalCode { 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")] + public string CountryCode { get; set; } + + /// + /// Phone number associated + /// + /// Phone number associated + /// + /// 555-555-5555 + /// + [JsonPropertyName("phone_number")] + public string PhoneNumber { 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")] + 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")] + public double Long { get; set; } + + /// + /// Distance in meters + /// + /// Distance in meters + /// + /// 728.9959308847579 + /// + [JsonPropertyName("distance_in_meters")] + public double DistanceInMeters { get; set; } + + /// + /// Gets or Sets HoursOfOperation + /// + [JsonPropertyName("hours_of_operation")] + public ListServicePointsResponseBodyServicePointsInnerHoursOfOperation HoursOfOperation { get; set; } + + /// + /// Service features + /// + /// Service features + [JsonPropertyName("features")] + public List Features { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBodyServicePointsInner {\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" ServiceCodes: ").Append(ServiceCodes).Append("\n"); + sb.Append(" ServicePointId: ").Append(ServicePointId).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" Lat: ").Append(Lat).Append("\n"); + sb.Append(" Long: ").Append(Long).Append("\n"); + sb.Append(" DistanceInMeters: ").Append(DistanceInMeters).Append("\n"); + sb.Append(" HoursOfOperation: ").Append(HoursOfOperation).Append("\n"); + sb.Append(" Features: ").Append(Features).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + 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..cd51f865 --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.cs @@ -0,0 +1,102 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 Monday + /// + [JsonPropertyName("monday")] + public List Monday { get; set; } + + /// + /// Gets or Sets Tuesday + /// + [JsonPropertyName("tuesday")] + public List Tuesday { get; set; } + + /// + /// Gets or Sets Wednesday + /// + [JsonPropertyName("wednesday")] + public List Wednesday { get; set; } + + /// + /// Gets or Sets Thursday + /// + [JsonPropertyName("thursday")] + public List Thursday { get; set; } + + /// + /// Gets or Sets Friday + /// + [JsonPropertyName("friday")] + public List Friday { get; set; } + + /// + /// Gets or Sets Saturday + /// + [JsonPropertyName("saturday")] + public List Saturday { get; set; } + + /// + /// Gets or Sets Sunday + /// + [JsonPropertyName("sunday")] + public List Sunday { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBodyServicePointsInnerHoursOfOperation {\n"); + sb.Append(" Monday: ").Append(Monday).Append("\n"); + sb.Append(" Tuesday: ").Append(Tuesday).Append("\n"); + sb.Append(" Wednesday: ").Append(Wednesday).Append("\n"); + sb.Append(" Thursday: ").Append(Thursday).Append("\n"); + sb.Append(" Friday: ").Append(Friday).Append("\n"); + sb.Append(" Saturday: ").Append(Saturday).Append("\n"); + sb.Append(" Sunday: ").Append(Sunday).Append("\n"); + 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..b8113386 --- /dev/null +++ b/ShipEngineSDK/Model/ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.cs @@ -0,0 +1,75 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Opening time + /// + /// Opening time + /// + /// 09:15 + /// + [JsonPropertyName("open")] + public string Open { get; set; } + + /// + /// Closing time + /// + /// Closing time + /// + /// 12:00 + /// + [JsonPropertyName("close")] + public string Close { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner {\n"); + sb.Append(" Open: ").Append(Open).Append("\n"); + sb.Append(" Close: ").Append(Close).Append("\n"); + 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..53fe1288 --- /dev/null +++ b/ShipEngineSDK/Model/ListShipmentRatesResponseBody.cs @@ -0,0 +1,124 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + [JsonRequired] + public RateResponseStatus Status { get; set; } = new(); + + + /// + /// An array of shipment rates + /// + /// An array of shipment rates + [JsonPropertyName("rates")] + [JsonRequired] + public List Rates { get; set; } + + /// + /// An array of invalid shipment rates + /// + /// An array of invalid shipment rates + [JsonPropertyName("invalid_rates")] + [JsonRequired] + public List InvalidRates { get; set; } + + /// + /// A string that uniquely identifies the rate request + /// + /// A string that uniquely identifies the rate request + /// + /// se-28529731 + /// + [JsonPropertyName("rate_request_id")] + [JsonRequired] + public string RateRequestId { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { get; set; } + + /// + /// When the rate was created + /// + /// When the rate was created + /// + /// se-28529731 + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public string CreatedAt { get; set; } + + /// + /// Gets or Sets Errors + /// + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListShipmentRatesResponseBody {\n"); + sb.Append(" Rates: ").Append(Rates).Append("\n"); + sb.Append(" InvalidRates: ").Append(InvalidRates).Append("\n"); + sb.Append(" RateRequestId: ").Append(RateRequestId).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..0a296426 --- /dev/null +++ b/ShipEngineSDK/Model/ListShipmentsResponseBody.cs @@ -0,0 +1,98 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The list of shipments returned by the api call + /// + /// The list of shipments returned by the api call + [JsonPropertyName("shipments")] + [JsonRequired] + public List Shipments { get; set; } + + /// + /// Total number of shipments returned by the api call + /// + /// Total number of shipments returned by the api call + /// + /// 1990 + /// + [JsonPropertyName("total")] + [JsonRequired] + public long Total { get; set; } + + /// + /// Gets or Sets Page + /// + [JsonPropertyName("page")] + [JsonRequired] + public int Page { get; set; } + + /// + /// Gets or Sets Pages + /// + [JsonPropertyName("pages")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListShipmentsResponseBody {\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + 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..e8f3834c --- /dev/null +++ b/ShipEngineSDK/Model/ListTagsResponseBody.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public List Tags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListTagsResponseBody {\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + 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..1a154415 --- /dev/null +++ b/ShipEngineSDK/Model/ListWarehousesResponseBody.cs @@ -0,0 +1,62 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 + [JsonPropertyName("warehouses")] + [JsonRequired] + public List Warehouses { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListWarehousesResponseBody {\n"); + sb.Append(" Warehouses: ").Append(Warehouses).Append("\n"); + 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..3740c107 --- /dev/null +++ b/ShipEngineSDK/Model/Manifest.cs @@ -0,0 +1,156 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 manifest + /// + /// A string that uniquely identifies the manifest + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_id")] + public string ManifestId { get; set; } + + /// + /// A string that uniquely identifies the form + /// + /// A string that uniquely identifies the form + /// + /// se-28529731 + /// + [JsonPropertyName("form_id")] + public string FormId { 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")] + public DateTime CreatedAt { 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")] + public DateTime ShipDate { get; set; } + + /// + /// The number of shipments that are included in this manifest + /// + /// The number of shipments that are included in this manifest + /// + /// 100 + /// + [JsonPropertyName("shipments")] + public int Shipments { get; set; } + + /// + /// An array of the label ids used in this manifest. + /// + /// An array of the label ids used in this manifest. + [JsonPropertyName("label_ids")] + public List LabelIds { get; set; } + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } + + /// + /// A string that uniquely identifies the submission + /// + /// A string that uniquely identifies the submission + /// + /// 9475711899564878915476 + /// + [JsonPropertyName("submission_id")] + public string SubmissionId { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + public string CarrierId { get; set; } + + /// + /// Gets or Sets ManifestDownload + /// + [JsonPropertyName("manifest_download")] + public ManifestDownload ManifestDownload { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Manifest {\n"); + sb.Append(" ManifestId: ").Append(ManifestId).Append("\n"); + sb.Append(" FormId: ").Append(FormId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" SubmissionId: ").Append(SubmissionId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ManifestDownload: ").Append(ManifestDownload).Append("\n"); + 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..683cc50c --- /dev/null +++ b/ShipEngineSDK/Model/ManifestDownload.cs @@ -0,0 +1,64 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string Href { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ManifestDownload {\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + 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..97af3109 --- /dev/null +++ b/ShipEngineSDK/Model/ManifestRequest.cs @@ -0,0 +1,70 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public ManifestRequestStatus? Status { get; set; } + /// + /// A string that uniquely identifies a manifest request + /// + /// A string that uniquely identifies a manifest request + /// + /// se-28529731 + /// + [JsonPropertyName("manifest_request_id")] + public string ManifestRequestId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ManifestRequest {\n"); + sb.Append(" ManifestRequestId: ").Append(ManifestRequestId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + 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..880b11f2 --- /dev/null +++ b/ShipEngineSDK/Model/ManifestRequestStatus.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..5a9b985a --- /dev/null +++ b/ShipEngineSDK/Model/Manifests.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public List VarManifests { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Manifests {\n"); + sb.Append(" VarManifests: ").Append(VarManifests).Append("\n"); + 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..010c079a --- /dev/null +++ b/ShipEngineSDK/Model/ManifestsRequests.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public List ManifestRequests { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ManifestsRequests {\n"); + sb.Append(" ManifestRequests: ").Append(ManifestRequests).Append("\n"); + 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..d9e5d58e --- /dev/null +++ b/ShipEngineSDK/Model/ModifyBatch.cs @@ -0,0 +1,69 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The Shipment Ids to be modified on the batch + /// + /// The Shipment Ids to be modified on the batch + [JsonPropertyName("shipment_ids")] + public List ShipmentIds { get; set; } + + /// + /// Array of Rate IDs to be modifed on the batch + /// + /// Array of Rate IDs to be modifed on the batch + [JsonPropertyName("rate_ids")] + public List RateIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ModifyBatch {\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + 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..7d4fe13e --- /dev/null +++ b/ShipEngineSDK/Model/MonetaryValue.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + [JsonRequired] + public string Currency { get; set; } + + /// + /// The monetary amount, in the specified currency. + /// + /// The monetary amount, in the specified currency. + [JsonPropertyName("amount")] + [JsonRequired] + public double Amount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MonetaryValue {\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + 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..e80aa108 --- /dev/null +++ b/ShipEngineSDK/Model/NonDelivery.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..103c4cc8 --- /dev/null +++ b/ShipEngineSDK/Model/OptionalLink.cs @@ -0,0 +1,72 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + 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")] + public string Type { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OptionalLink {\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + 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..825dd9aa --- /dev/null +++ b/ShipEngineSDK/Model/OrderSourceName.cs @@ -0,0 +1,185 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..254f2bc2 --- /dev/null +++ b/ShipEngineSDK/Model/OriginType.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..20f05cfb --- /dev/null +++ b/ShipEngineSDK/Model/Package.cs @@ -0,0 +1,177 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 [shipping label](https://www.shipengine.com/docs/labels/create-a-label/) +/// +public partial class Package +{ + + /// + /// 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")] + public string PackageId { 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")] + public string PackageCode { 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")] + public string ContentDescription { get; set; } + + /// + /// The package weight + /// + /// The package weight + [JsonPropertyName("weight")] + [JsonRequired] + public Weight Weight { get; set; } + + /// + /// The package dimensions + /// + /// The package dimensions + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { 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")] + public MonetaryValue InsuredValue { 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. + /// + /// 1Z932R800392060079 + /// + [JsonPropertyName("tracking_number")] + public string TrackingNumber { get; set; } + + /// + /// Gets or Sets LabelMessages + /// + [JsonPropertyName("label_messages")] + public LabelMessages LabelMessages { get; set; } + + /// + /// An external package id. + /// + /// An external package id. + [JsonPropertyName("external_package_id")] + public string ExternalPackageId { get; set; } + + /// + /// The label download for the package + /// + /// The label download for the package + [JsonPropertyName("label_download")] + public LabelDownload LabelDownload { get; set; } + + /// + /// The form download for any customs that are needed + /// + /// The form download for any customs that are needed + [JsonPropertyName("form_download")] + public OptionalLink 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")] + public PaperlessDownload PaperlessDownload { get; set; } + + /// + /// Package sequence + /// + /// Package sequence + [JsonPropertyName("sequence")] + public int Sequence { 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")] + public List Products { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Package {\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" ContentDescription: ").Append(ContentDescription).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" InsuredValue: ").Append(InsuredValue).Append("\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" LabelMessages: ").Append(LabelMessages).Append("\n"); + sb.Append(" ExternalPackageId: ").Append(ExternalPackageId).Append("\n"); + sb.Append(" LabelDownload: ").Append(LabelDownload).Append("\n"); + sb.Append(" FormDownload: ").Append(FormDownload).Append("\n"); + sb.Append(" PaperlessDownload: ").Append(PaperlessDownload).Append("\n"); + sb.Append(" Sequence: ").Append(Sequence).Append("\n"); + sb.Append(" Products: ").Append(Products).Append("\n"); + 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..eb1e730f --- /dev/null +++ b/ShipEngineSDK/Model/PackageContents.cs @@ -0,0 +1,101 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..b367c42f --- /dev/null +++ b/ShipEngineSDK/Model/PackageType.cs @@ -0,0 +1,106 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id")] + public string PackageId { 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")] + [JsonRequired] + public string PackageCode { get; set; } + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description")] + public string Description { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PackageType {\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + 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..4d00bd1a --- /dev/null +++ b/ShipEngineSDK/Model/PackagingGroup.cs @@ -0,0 +1,82 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..1ac333e7 --- /dev/null +++ b/ShipEngineSDK/Model/PackagingInstructionSection.cs @@ -0,0 +1,88 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..c07f8202 --- /dev/null +++ b/ShipEngineSDK/Model/PagedListResponseBody.cs @@ -0,0 +1,104 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The total number of items across all pages of results + /// + /// The total number of items across all pages of results + /// + /// 2750 + /// + [JsonPropertyName("total")] + [JsonRequired] + public int Total { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public int Pages { get; set; } + + /// + /// Gets or Sets Links + /// + [JsonPropertyName("links")] + [JsonRequired] + public PaginationLink Links { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PagedListResponseBody {\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append(" Pages: ").Append(Pages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + 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..43f6b31f --- /dev/null +++ b/ShipEngineSDK/Model/PaginationLink.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public Link Last { 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")] + [JsonRequired] + public OptionalLink Prev { 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")] + [JsonRequired] + public OptionalLink Next { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PaginationLink {\n"); + sb.Append(" First: ").Append(First).Append("\n"); + sb.Append(" Last: ").Append(Last).Append("\n"); + sb.Append(" Prev: ").Append(Prev).Append("\n"); + sb.Append(" Next: ").Append(Next).Append("\n"); + 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..862cde79 --- /dev/null +++ b/ShipEngineSDK/Model/PaperlessDownload.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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")] + public string Href { get; set; } + + /// + /// The instructions for the paperless download. + /// + /// The instructions for the paperless download. + [JsonPropertyName("instructions")] + public string Instructions { get; set; } + + /// + /// The handoff code for the paperless download. + /// + /// The handoff code for the paperless download. + [JsonPropertyName("handoff_code")] + public string HandoffCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PaperlessDownload {\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + sb.Append(" HandoffCode: ").Append(HandoffCode).Append("\n"); + 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..ab4e3df5 --- /dev/null +++ b/ShipEngineSDK/Model/ParseAddressRequestBody.cs @@ -0,0 +1,73 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public 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")] + public PartialAddress Address { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ParseAddressRequestBody {\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + 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..f8a9a5bc --- /dev/null +++ b/ShipEngineSDK/Model/ParseAddressResponseBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + [JsonRequired] + public double Score { get; set; } + + /// + /// 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public List Entities { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ParseAddressResponseBody {\n"); + sb.Append(" Score: ").Append(Score).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" Entities: ").Append(Entities).Append("\n"); + 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..fe4a9ed6 --- /dev/null +++ b/ShipEngineSDK/Model/ParseShipmentRequestBody.cs @@ -0,0 +1,74 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public 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")] + public PartialShipment Shipment { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ParseShipmentRequestBody {\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + 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..8bca04c7 --- /dev/null +++ b/ShipEngineSDK/Model/ParseShipmentResponseBody.cs @@ -0,0 +1,80 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public PartialShipment Shipment { 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, 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")] + [JsonRequired] + public List Entities { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ParseShipmentResponseBody {\n"); + sb.Append(" Score: ").Append(Score).Append("\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + sb.Append(" Entities: ").Append(Entities).Append("\n"); + 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..6dbf19d2 --- /dev/null +++ b/ShipEngineSDK/Model/PartialAddress.cs @@ -0,0 +1,181 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Indicates whether this is a residential address. CLOVUS + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator")] + public AddressResidentialIndicator? AddressResidentialIndicator { 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")] + 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")] + public string Phone { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email")] + public string Email { 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")] + public string CompanyName { 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")] + 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")] + 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")] + public string AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality")] + public string CityLocality { 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")] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + public string PostalCode { 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")] + public string CountryCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PartialAddress {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).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(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + 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..f619006c --- /dev/null +++ b/ShipEngineSDK/Model/PartialShipment.cs @@ -0,0 +1,290 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + public ShipmentStatus? ShipmentStatus { get; set; } + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + public DeliveryConfirmation? Confirmation { get; set; } + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + public InsuranceProvider? InsuranceProvider { get; set; } + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + public string ShipmentId { 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")] + public 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")] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + public ShippingAddressTo ShipTo { 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")] + public ShippingAddress ShipFrom { 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")] + public string WarehouseId { 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")] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + public List Tags { 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")] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + 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")] + public string ComparisonRateType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PartialShipment {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + 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..9affc1f9 --- /dev/null +++ b/ShipEngineSDK/Model/PartialShippingAddress.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string Instructions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PartialShippingAddress {\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + 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..a076cce4 --- /dev/null +++ b/ShipEngineSDK/Model/PartialShippingAddressTo.cs @@ -0,0 +1,68 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Additional text about how to handle the shipment at this address. + /// + /// Additional text about how to handle the shipment at this address. + [JsonPropertyName("instructions")] + public string Instructions { get; set; } + + /// + /// Gets or Sets Geolocation + /// + [JsonPropertyName("geolocation")] + public List Geolocation { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PartialShippingAddressTo {\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + sb.Append(" Geolocation: ").Append(Geolocation).Append("\n"); + 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..647c5a1a --- /dev/null +++ b/ShipEngineSDK/Model/PartialShippingAddressToGeolocationInner.cs @@ -0,0 +1,114 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _value; + + internal TypeEnum() + { + _value = "what3words"; + } + + public TypeEnum(string value) + { + + } + + /// + /// Enum What3words for value: what3words + /// + public static TypeEnum What3words { get; } = new("what3words"); + + + 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. CLOVUS + /// + /// 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")] + public TypeEnum? Type { get; set; } + /// + /// value of the geolocation item + /// + /// value of the geolocation item + /// + /// cats.with.thumbs + /// + [JsonPropertyName("value")] + public string Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PartialShippingAddressToGeolocationInner {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + 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..fbfb3f41 --- /dev/null +++ b/ShipEngineSDK/Model/PaymentAmount.cs @@ -0,0 +1,68 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + public string Currency { get; set; } + + /// + /// Gets or Sets Amount + /// + [JsonPropertyName("amount")] + public double Amount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PaymentAmount {\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + 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..f8c34e51 --- /dev/null +++ b/ShipEngineSDK/Model/Pickup.cs @@ -0,0 +1,164 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id")] + public string PickupId { 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")] + public List LabelIds { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at")] + public DateTime CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + public string CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number")] + public string ConfirmationNumber { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + [JsonPropertyName("pickup_address")] + public Address PickupAddress { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details")] + public ContactDetails ContactDetails { 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")] + public string PickupNotes { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window")] + 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. + [JsonPropertyName("pickup_windows")] + public List PickupWindows { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Pickup {\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).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(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).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("}\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..37874e2f --- /dev/null +++ b/ShipEngineSDK/Model/PickupResponseBody.cs @@ -0,0 +1,173 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id")] + [JsonRequired] + public string PickupId { 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")] + [JsonRequired] + public List LabelIds { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at")] + public DateTime CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [JsonRequired] + public string CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number")] + [JsonRequired] + public string ConfirmationNumber { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + [JsonRequired] + public string WarehouseId { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + [JsonPropertyName("pickup_address")] + [JsonRequired] + public Address PickupAddress { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details")] + [JsonRequired] + public ContactDetails ContactDetails { 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")] + public string PickupNotes { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window")] + [JsonRequired] + 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. + [JsonPropertyName("pickup_windows")] + public List PickupWindows { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PickupResponseBody {\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).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(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).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("}\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..748d89df --- /dev/null +++ b/ShipEngineSDK/Model/PickupWindow.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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("start_at")] + [JsonRequired] + public DateTime StartAt { 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("end_at")] + [JsonRequired] + public DateTime EndAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PickupWindow {\n"); + sb.Append(" StartAt: ").Append(StartAt).Append("\n"); + sb.Append(" EndAt: ").Append(EndAt).Append("\n"); + 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..52ebe8c2 --- /dev/null +++ b/ShipEngineSDK/Model/PickupWindows.cs @@ -0,0 +1,75 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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("start_at")] + public DateTime StartAt { 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("end_at")] + public DateTime EndAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PickupWindows {\n"); + sb.Append(" StartAt: ").Append(StartAt).Append("\n"); + sb.Append(" EndAt: ").Append(EndAt).Append("\n"); + 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..b622f258 --- /dev/null +++ b/ShipEngineSDK/Model/ProcessBatchRequestBody.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets LabelLayout CLOVUS + /// + [JsonPropertyName("label_layout")] + public LabelLayout? LabelLayout { get; set; } + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + public LabelFormat? LabelFormat { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + public DisplayScheme? DisplayScheme { 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")] + public DateTime ShipDate { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ProcessBatchRequestBody {\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + 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..8673ead5 --- /dev/null +++ b/ShipEngineSDK/Model/Products.cs @@ -0,0 +1,165 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A description of the item + /// + /// A description of the item + [JsonPropertyName("description")] + public string Description { get; set; } + + /// + /// The quantity of this item in the shipment. + /// + /// The quantity of this item in the shipment. + [JsonPropertyName("quantity")] + public int Quantity { get; set; } + + /// + /// The declared value of each item + /// + /// The declared value of each item + [JsonPropertyName("value")] + public MonetaryValue Value { get; set; } + + /// + /// The item weight + /// + /// The item weight + [JsonPropertyName("weight")] + public Weight Weight { 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")] + public string HarmonizedTariffCode { 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")] + public string CountryOfOrigin { get; set; } + + /// + /// Gets or Sets UnitOfMeasure + /// + [JsonPropertyName("unit_of_measure")] + public string UnitOfMeasure { get; set; } + + /// + /// The SKU (Stock Keeping Unit) of the item + /// + /// The SKU (Stock Keeping Unit) of the item + [JsonPropertyName("sku")] + public string Sku { get; set; } + + /// + /// Description of the Custom Item's SKU + /// + /// Description of the Custom Item's SKU + [JsonPropertyName("sku_description")] + public string SkuDescription { get; set; } + + /// + /// Manufacturers Identification code + /// + /// Manufacturers Identification code + [JsonPropertyName("mid_code")] + public string MidCode { get; set; } + + /// + /// link to the item on the seller website + /// + /// link to the item on the seller website + [JsonPropertyName("product_url")] + public string ProductUrl { get; set; } + + /// + /// VAT rate applicable to the item + /// + /// VAT rate applicable to the item + /// + /// 0.2 + /// + [JsonPropertyName("vat_rate")] + public double? VatRate { get; set; } + + /// + /// Details about dangerous goods inside products + /// + /// Details about dangerous goods inside products + [JsonPropertyName("dangerous_goods")] + public List DangerousGoods { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Products {\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" HarmonizedTariffCode: ").Append(HarmonizedTariffCode).Append("\n"); + sb.Append(" CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n"); + sb.Append(" UnitOfMeasure: ").Append(UnitOfMeasure).Append("\n"); + sb.Append(" Sku: ").Append(Sku).Append("\n"); + sb.Append(" SkuDescription: ").Append(SkuDescription).Append("\n"); + sb.Append(" MidCode: ").Append(MidCode).Append("\n"); + sb.Append(" ProductUrl: ").Append(ProductUrl).Append("\n"); + sb.Append(" VatRate: ").Append(VatRate).Append("\n"); + sb.Append(" DangerousGoods: ").Append(DangerousGoods).Append("\n"); + 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..8315424f --- /dev/null +++ b/ShipEngineSDK/Model/PurchaseLabelWithoutShipment.cs @@ -0,0 +1,84 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// Gets or Sets LabelLayout CLOVUS + /// + [JsonPropertyName("label_layout")] + public LabelLayout? LabelLayout { get; set; } + /// + /// Gets or Sets LabelFormat CLOVUS + /// + [JsonPropertyName("label_format")] + public LabelFormat? LabelFormat { get; set; } + /// + /// Gets or Sets LabelDownloadType CLOVUS + /// + [JsonPropertyName("label_download_type")] + public LabelDownloadType? LabelDownloadType { get; set; } + /// + /// The display format that the label should be shown in. CLOVUS + /// + /// The display format that the label should be shown in. + [JsonPropertyName("display_scheme")] + public DisplayScheme? DisplayScheme { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PurchaseLabelWithoutShipment {\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + sb.Append(" LabelLayout: ").Append(LabelLayout).Append("\n"); + sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n"); + sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n"); + sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n"); + 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..b2724562 --- /dev/null +++ b/ShipEngineSDK/Model/Rate.cs @@ -0,0 +1,299 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets RateType CLOVUS + /// + [JsonPropertyName("rate_type")] + [JsonRequired] + public RateType RateType { get; set; } = new(); + + + /// + /// Gets or Sets ValidationStatus CLOVUS + /// + [JsonPropertyName("validation_status")] + [JsonRequired] + public ValidationStatus ValidationStatus { get; set; } = new(); + + + /// + /// A string that uniquely identifies the rate + /// + /// A string that uniquely identifies the rate + /// + /// se-28529731 + /// + [JsonPropertyName("rate_id")] + [JsonRequired] + public string RateId { get; set; } + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [JsonRequired] + public string CarrierId { 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. + [JsonPropertyName("shipping_amount")] + [JsonRequired] + public MonetaryValue ShippingAmount { 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. + [JsonPropertyName("insurance_amount")] + [JsonRequired] + public MonetaryValue InsuranceAmount { 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. + [JsonPropertyName("confirmation_amount")] + [JsonRequired] + public MonetaryValue ConfirmationAmount { 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. + [JsonPropertyName("other_amount")] + [JsonRequired] + public MonetaryValue OtherAmount { 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")] + public MonetaryValue RequestedComparisonAmount { get; set; } + + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// Tariff and additional taxes associated with an international shipment. + [JsonPropertyName("tax_amount")] + 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 + /// + /// 6 + /// + [JsonPropertyName("zone")] + [JsonRequired] + public int? Zone { get; set; } + + /// + /// package type that this rate was estimated for + /// + /// package type that this rate was estimated for + /// + /// package + /// + [JsonPropertyName("package_type")] + [JsonRequired] + public string PackageType { 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 + /// + /// 5 + /// + [JsonPropertyName("delivery_days")] + public int DeliveryDays { get; set; } + + /// + /// Indicates if the rate is guaranteed. + /// + /// Indicates if the rate is guaranteed. + [JsonPropertyName("guaranteed_service")] + [JsonRequired] + public bool GuaranteedService { 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("estimated_delivery_date")] + public DateTime EstimatedDeliveryDate { get; set; } + + /// + /// The carrier delivery days + /// + /// The carrier delivery days + [JsonPropertyName("carrier_delivery_days")] + public string CarrierDeliveryDays { get; set; } + + /// + /// ship date + /// + /// ship date + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + /// + /// Indicates if the rates been negotiated + /// + /// Indicates if the rates been negotiated + [JsonPropertyName("negotiated_rate")] + [JsonRequired] + public bool NegotiatedRate { get; set; } + + /// + /// service type + /// + /// service type + [JsonPropertyName("service_type")] + [JsonRequired] + public string ServiceType { get; set; } + + /// + /// service code for the rate + /// + /// service code for the rate + [JsonPropertyName("service_code")] + [JsonRequired] + public string ServiceCode { get; set; } + + /// + /// Indicates if rate is trackable + /// + /// Indicates if rate is trackable + [JsonPropertyName("trackable")] + [JsonRequired] + public bool Trackable { get; set; } + + /// + /// carrier code + /// + /// carrier code + [JsonPropertyName("carrier_code")] + [JsonRequired] + public string CarrierCode { get; set; } + + /// + /// carrier nickname + /// + /// carrier nickname + [JsonPropertyName("carrier_nickname")] + [JsonRequired] + public string CarrierNickname { get; set; } + + /// + /// carrier friendly name + /// + /// carrier friendly name + [JsonPropertyName("carrier_friendly_name")] + [JsonRequired] + public string CarrierFriendlyName { get; set; } + + /// + /// The warning messages + /// + /// The warning messages + [JsonPropertyName("warning_messages")] + [JsonRequired] + public List WarningMessages { get; set; } + + /// + /// The error messages + /// + /// The error messages + [JsonPropertyName("error_messages")] + [JsonRequired] + public List ErrorMessages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Rate {\n"); + sb.Append(" RateId: ").Append(RateId).Append("\n"); + sb.Append(" RateType: ").Append(RateType).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ShippingAmount: ").Append(ShippingAmount).Append("\n"); + sb.Append(" InsuranceAmount: ").Append(InsuranceAmount).Append("\n"); + sb.Append(" ConfirmationAmount: ").Append(ConfirmationAmount).Append("\n"); + sb.Append(" OtherAmount: ").Append(OtherAmount).Append("\n"); + sb.Append(" RequestedComparisonAmount: ").Append(RequestedComparisonAmount).Append("\n"); + sb.Append(" TaxAmount: ").Append(TaxAmount).Append("\n"); + sb.Append(" Zone: ").Append(Zone).Append("\n"); + sb.Append(" PackageType: ").Append(PackageType).Append("\n"); + sb.Append(" DeliveryDays: ").Append(DeliveryDays).Append("\n"); + sb.Append(" GuaranteedService: ").Append(GuaranteedService).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" CarrierDeliveryDays: ").Append(CarrierDeliveryDays).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" NegotiatedRate: ").Append(NegotiatedRate).Append("\n"); + sb.Append(" ServiceType: ").Append(ServiceType).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierNickname: ").Append(CarrierNickname).Append("\n"); + sb.Append(" CarrierFriendlyName: ").Append(CarrierFriendlyName).Append("\n"); + sb.Append(" ValidationStatus: ").Append(ValidationStatus).Append("\n"); + sb.Append(" WarningMessages: ").Append(WarningMessages).Append("\n"); + sb.Append(" ErrorMessages: ").Append(ErrorMessages).Append("\n"); + 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/RateEstimate.cs b/ShipEngineSDK/Model/RateEstimate.cs new file mode 100644 index 00000000..4d66cf04 --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimate.cs @@ -0,0 +1,279 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets RateType CLOVUS + /// + [JsonPropertyName("rate_type")] + [JsonRequired] + public RateType RateType { get; set; } = new(); + + + /// + /// Gets or Sets ValidationStatus CLOVUS + /// + [JsonPropertyName("validation_status")] + [JsonRequired] + public ValidationStatus ValidationStatus { get; set; } = new(); + + + /// + /// A string that uniquely identifies the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + [JsonRequired] + public string CarrierId { get; set; } + + /// + /// The shipping amount + /// + /// The shipping amount + [JsonPropertyName("shipping_amount")] + [JsonRequired] + public MonetaryValue ShippingAmount { get; set; } + + /// + /// The insurance amount + /// + /// The insurance amount + [JsonPropertyName("insurance_amount")] + [JsonRequired] + public MonetaryValue InsuranceAmount { get; set; } + + /// + /// The confirmation amount + /// + /// The confirmation amount + [JsonPropertyName("confirmation_amount")] + [JsonRequired] + public MonetaryValue ConfirmationAmount { get; set; } + + /// + /// Any other charges associated with this rate + /// + /// Any other charges associated with this rate + [JsonPropertyName("other_amount")] + [JsonRequired] + public MonetaryValue OtherAmount { get; set; } + + /// + /// Tariff and additional taxes associated with an international shipment. + /// + /// Tariff and additional taxes associated with an international shipment. + [JsonPropertyName("tax_amount")] + 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 + /// + /// 6 + /// + [JsonPropertyName("zone")] + [JsonRequired] + public int? Zone { get; set; } + + /// + /// package type that this rate was estimated for + /// + /// package type that this rate was estimated for + /// + /// package + /// + [JsonPropertyName("package_type")] + [JsonRequired] + public string PackageType { 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 + /// + /// 5 + /// + [JsonPropertyName("delivery_days")] + public int DeliveryDays { get; set; } + + /// + /// Indicates if the rate is guaranteed. + /// + /// Indicates if the rate is guaranteed. + [JsonPropertyName("guaranteed_service")] + [JsonRequired] + public bool GuaranteedService { 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("estimated_delivery_date")] + public DateTime EstimatedDeliveryDate { get; set; } + + /// + /// The carrier delivery days + /// + /// The carrier delivery days + [JsonPropertyName("carrier_delivery_days")] + public string CarrierDeliveryDays { get; set; } + + /// + /// ship date + /// + /// ship date + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + /// + /// Indicates if the rates been negotiated + /// + /// Indicates if the rates been negotiated + [JsonPropertyName("negotiated_rate")] + [JsonRequired] + public bool NegotiatedRate { get; set; } + + /// + /// service type + /// + /// service type + [JsonPropertyName("service_type")] + [JsonRequired] + public string ServiceType { get; set; } + + /// + /// service code for the rate + /// + /// service code for the rate + [JsonPropertyName("service_code")] + [JsonRequired] + public string ServiceCode { get; set; } + + /// + /// Indicates if rate is trackable + /// + /// Indicates if rate is trackable + [JsonPropertyName("trackable")] + [JsonRequired] + public bool Trackable { 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. + [JsonPropertyName("carrier_code")] + [JsonRequired] + public string CarrierCode { get; set; } + + /// + /// carrier nickname + /// + /// carrier nickname + [JsonPropertyName("carrier_nickname")] + [JsonRequired] + public string CarrierNickname { get; set; } + + /// + /// carrier friendly name + /// + /// carrier friendly name + [JsonPropertyName("carrier_friendly_name")] + [JsonRequired] + public string CarrierFriendlyName { get; set; } + + /// + /// The warning messages + /// + /// The warning messages + [JsonPropertyName("warning_messages")] + [JsonRequired] + public List WarningMessages { get; set; } + + /// + /// The error messages + /// + /// The error messages + [JsonPropertyName("error_messages")] + [JsonRequired] + public List ErrorMessages { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateEstimate {\n"); + sb.Append(" RateType: ").Append(RateType).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ShippingAmount: ").Append(ShippingAmount).Append("\n"); + sb.Append(" InsuranceAmount: ").Append(InsuranceAmount).Append("\n"); + sb.Append(" ConfirmationAmount: ").Append(ConfirmationAmount).Append("\n"); + sb.Append(" OtherAmount: ").Append(OtherAmount).Append("\n"); + sb.Append(" TaxAmount: ").Append(TaxAmount).Append("\n"); + sb.Append(" Zone: ").Append(Zone).Append("\n"); + sb.Append(" PackageType: ").Append(PackageType).Append("\n"); + sb.Append(" DeliveryDays: ").Append(DeliveryDays).Append("\n"); + sb.Append(" GuaranteedService: ").Append(GuaranteedService).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" CarrierDeliveryDays: ").Append(CarrierDeliveryDays).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" NegotiatedRate: ").Append(NegotiatedRate).Append("\n"); + sb.Append(" ServiceType: ").Append(ServiceType).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" Trackable: ").Append(Trackable).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierNickname: ").Append(CarrierNickname).Append("\n"); + sb.Append(" CarrierFriendlyName: ").Append(CarrierFriendlyName).Append("\n"); + sb.Append(" ValidationStatus: ").Append(ValidationStatus).Append("\n"); + sb.Append(" WarningMessages: ").Append(WarningMessages).Append("\n"); + sb.Append(" ErrorMessages: ").Append(ErrorMessages).Append("\n"); + 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..7527c79d --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimateByCarrierId.cs @@ -0,0 +1,65 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [Obsolete] + public string CarrierId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateEstimateByCarrierId {\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + 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..243fa078 --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimateByCarrierIds.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public List CarrierIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateEstimateByCarrierIds {\n"); + sb.Append(" CarrierIds: ").Append(CarrierIds).Append("\n"); + 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..1ec93264 --- /dev/null +++ b/ShipEngineSDK/Model/RateEstimateOptions.cs @@ -0,0 +1,180 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 Confirmation CLOVUS + /// + [JsonPropertyName("confirmation")] + public DeliveryConfirmation? Confirmation { get; set; } + /// + /// Gets or Sets AddressResidentialIndicator CLOVUS + /// + [JsonPropertyName("address_residential_indicator")] + public AddressResidentialIndicator? AddressResidentialIndicator { 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")] + public string FromCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("from_postal_code")] + public string FromPostalCode { get; set; } + + /// + /// from postal code + /// + /// from postal code + /// + /// Austin + /// + [JsonPropertyName("from_city_locality")] + public string FromCityLocality { get; set; } + + /// + /// From state province + /// + /// From state province + /// + /// Austin + /// + [JsonPropertyName("from_state_province")] + public string FromStateProvince { 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")] + public string ToCountryCode { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("to_postal_code")] + public string ToPostalCode { 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")] + public string ToCityLocality { get; set; } + + /// + /// To state province + /// + /// To state province + /// + /// Houston + /// + [JsonPropertyName("to_state_province")] + public string ToStateProvince { get; set; } + + /// + /// The weight of the package + /// + /// The weight of the package + [JsonPropertyName("weight")] + public Weight Weight { get; set; } + + /// + /// The dimensions of the package + /// + /// The dimensions of the package + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { get; set; } + + /// + /// ship date + /// + /// ship date + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateEstimateOptions {\n"); + sb.Append(" FromCountryCode: ").Append(FromCountryCode).Append("\n"); + sb.Append(" FromPostalCode: ").Append(FromPostalCode).Append("\n"); + sb.Append(" FromCityLocality: ").Append(FromCityLocality).Append("\n"); + sb.Append(" FromStateProvince: ").Append(FromStateProvince).Append("\n"); + sb.Append(" ToCountryCode: ").Append(ToCountryCode).Append("\n"); + sb.Append(" ToPostalCode: ").Append(ToPostalCode).Append("\n"); + sb.Append(" ToCityLocality: ").Append(ToCityLocality).Append("\n"); + sb.Append(" ToStateProvince: ").Append(ToStateProvince).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + 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..2a4f1d03 --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestBody.cs @@ -0,0 +1,100 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public List CarrierIds { get; set; } + + /// + /// Gets or Sets PackageTypes + /// + [JsonPropertyName("package_types")] + public List PackageTypes { get; set; } + + /// + /// Gets or Sets ServiceCodes + /// + [JsonPropertyName("service_codes")] + public List ServiceCodes { get; set; } + + /// + /// Calculate the duties and tariffs for cross border shipments. + /// + /// Calculate the duties and tariffs for cross border shipments. + [JsonPropertyName("calculate_tax_amount")] + public bool CalculateTaxAmount { 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")] + public string PreferredCurrency { get; set; } + + /// + /// Indicate if it's a return shipment + /// + /// Indicate if it's a return shipment + [JsonPropertyName("is_return")] + public bool IsReturn { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateRequestBody {\n"); + sb.Append(" CarrierIds: ").Append(CarrierIds).Append("\n"); + sb.Append(" PackageTypes: ").Append(PackageTypes).Append("\n"); + sb.Append(" ServiceCodes: ").Append(ServiceCodes).Append("\n"); + sb.Append(" CalculateTaxAmount: ").Append(CalculateTaxAmount).Append("\n"); + sb.Append(" PreferredCurrency: ").Append(PreferredCurrency).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + 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..495563cb --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestByShipmentIds.cs @@ -0,0 +1,62 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public List ShipmentIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateRequestByShipmentIds {\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); + 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..82b7c639 --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestByShipments.cs @@ -0,0 +1,62 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public List Shipments { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateRequestByShipments {\n"); + sb.Append(" Shipments: ").Append(Shipments).Append("\n"); + 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..fd531ed9 --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestOptions.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public RateRequestBody RateOptions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateRequestOptions {\n"); + sb.Append(" RateOptions: ").Append(RateOptions).Append("\n"); + 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..3056bafe --- /dev/null +++ b/ShipEngineSDK/Model/RateRequestRateOptions.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public RateRequestBody RateOptions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateRequestRateOptions {\n"); + sb.Append(" RateOptions: ").Append(RateOptions).Append("\n"); + 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..f622fd55 --- /dev/null +++ b/ShipEngineSDK/Model/RateResponse.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public RatesInformation VarRateResponse { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RateResponse {\n"); + sb.Append(" VarRateResponse: ").Append(VarRateResponse).Append("\n"); + 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..60d2efa9 --- /dev/null +++ b/ShipEngineSDK/Model/RateResponseStatus.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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/RateType.cs b/ShipEngineSDK/Model/RateType.cs new file mode 100644 index 00000000..3ed284f8 --- /dev/null +++ b/ShipEngineSDK/Model/RateType.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..c0f8bf03 --- /dev/null +++ b/ShipEngineSDK/Model/RatesInformation.cs @@ -0,0 +1,115 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets Status CLOVUS + /// + [JsonPropertyName("status")] + public RateResponseStatus? Status { get; set; } + /// + /// An array of shipment rates + /// + /// An array of shipment rates + [JsonPropertyName("rates")] + public List Rates { get; set; } + + /// + /// An array of invalid shipment rates + /// + /// An array of invalid shipment rates + [JsonPropertyName("invalid_rates")] + public List InvalidRates { get; set; } + + /// + /// A string that uniquely identifies the rate request + /// + /// A string that uniquely identifies the rate request + /// + /// se-28529731 + /// + [JsonPropertyName("rate_request_id")] + public string RateRequestId { get; set; } + + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + public string ShipmentId { get; set; } + + /// + /// When the rate was created + /// + /// When the rate was created + /// + /// se-28529731 + /// + [JsonPropertyName("created_at")] + public string CreatedAt { get; set; } + + /// + /// Gets or Sets Errors + /// + [JsonPropertyName("errors")] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RatesInformation {\n"); + sb.Append(" Rates: ").Append(Rates).Append("\n"); + sb.Append(" InvalidRates: ").Append(InvalidRates).Append("\n"); + sb.Append(" RateRequestId: ").Append(RateRequestId).Append("\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..460a1c21 --- /dev/null +++ b/ShipEngineSDK/Model/ReasonCode.cs @@ -0,0 +1,107 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..647066c5 --- /dev/null +++ b/ShipEngineSDK/Model/RecognizedEntity.cs @@ -0,0 +1,106 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 Entity type (e.g. \"weight\", \"person\", \"address_line1\", etc.) + /// + /// The Entity type (e.g. \"weight\", \"person\", \"address_line1\", etc.) + [JsonPropertyName("type")] + [JsonRequired] + public string Type { 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")] + [JsonRequired] + public double Score { 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")] + [JsonRequired] + public string Text { 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")] + [JsonRequired] + public int StartIndex { get; set; } + + /// + /// 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")] + [JsonRequired] + public int EndIndex { 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")] + public Dictionary Result { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RecognizedEntity {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Score: ").Append(Score).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" StartIndex: ").Append(StartIndex).Append("\n"); + sb.Append(" EndIndex: ").Append(EndIndex).Append("\n"); + sb.Append(" Result: ").Append(Result).Append("\n"); + 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..71b2144d --- /dev/null +++ b/ShipEngineSDK/Model/Redirect.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..151411a2 --- /dev/null +++ b/ShipEngineSDK/Model/RegulationLevel.cs @@ -0,0 +1,88 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..5f5e2d17 --- /dev/null +++ b/ShipEngineSDK/Model/RemoveFromBatchRequestBody.cs @@ -0,0 +1,69 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The Shipment Ids to be modified on the batch + /// + /// The Shipment Ids to be modified on the batch + [JsonPropertyName("shipment_ids")] + public List ShipmentIds { get; set; } + + /// + /// Array of Rate IDs to be modifed on the batch + /// + /// Array of Rate IDs to be modifed on the batch + [JsonPropertyName("rate_ids")] + public List RateIds { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RemoveFromBatchRequestBody {\n"); + sb.Append(" ShipmentIds: ").Append(ShipmentIds).Append("\n"); + sb.Append(" RateIds: ").Append(RateIds).Append("\n"); + 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..43e6525a --- /dev/null +++ b/ShipEngineSDK/Model/ResponseMessage.cs @@ -0,0 +1,92 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("code")] + [JsonRequired] + public AddressValidationCode Code { get; set; } = new(); + + + /// + /// Gets or Sets Type CLOVUS + /// + [JsonPropertyName("type")] + [JsonRequired] + public AddressValidationMessageType Type { get; set; } = new(); + + + /// + /// Gets or Sets DetailCode CLOVUS + /// + [JsonPropertyName("detail_code")] + [JsonRequired] + public AddressValidationDetailCode DetailCode { get; set; } = new(); + + + /// + /// Message explaining the address validation error + /// + /// Message explaining the address validation error + /// + /// Invalid Postal Code + /// + [JsonPropertyName("message")] + [JsonRequired] + public string Message { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ResponseMessage {\n"); + 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"); + 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..8a6fee65 --- /dev/null +++ b/ShipEngineSDK/Model/SchedulePickupRequestBody.cs @@ -0,0 +1,167 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id")] + public string PickupId { 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")] + [JsonRequired] + public List LabelIds { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at")] + public DateTime CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + public string CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number")] + public string ConfirmationNumber { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + [JsonPropertyName("pickup_address")] + public Address PickupAddress { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details")] + [JsonRequired] + public ContactDetails ContactDetails { 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")] + public string PickupNotes { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window")] + [JsonRequired] + 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. + [JsonPropertyName("pickup_windows")] + public List PickupWindows { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SchedulePickupRequestBody {\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).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(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).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("}\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..867969ff --- /dev/null +++ b/ShipEngineSDK/Model/SchedulePickupResponseBody.cs @@ -0,0 +1,185 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Pickup Resource ID + /// + /// Pickup Resource ID + /// + /// pik_3YcKU5zdtJuCqoeNwyqqbW + /// + [JsonPropertyName("pickup_id")] + public string PickupId { 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")] + public List LabelIds { get; set; } + + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// The date and time that the pickup was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// The date and time that the pickup was cancelled in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("cancelled_at")] + public DateTime CancelledAt { get; set; } + + /// + /// The carrier_id associated with the pickup + /// + /// The carrier_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + public string CarrierId { get; set; } + + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// The carrier confirmation number for the scheduled pickup. + /// + /// 292513CL4A3 + /// + [JsonPropertyName("confirmation_number")] + public string ConfirmationNumber { get; set; } + + /// + /// The warehouse_id associated with the pickup + /// + /// The warehouse_id associated with the pickup + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + public string WarehouseId { get; set; } + + /// + /// Gets or Sets PickupAddress + /// + [JsonPropertyName("pickup_address")] + public Address PickupAddress { get; set; } + + /// + /// Gets or Sets ContactDetails + /// + [JsonPropertyName("contact_details")] + public ContactDetails ContactDetails { 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")] + public string PickupNotes { get; set; } + + /// + /// Gets or Sets PickupWindow + /// + [JsonPropertyName("pickup_window")] + 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. + [JsonPropertyName("pickup_windows")] + public List PickupWindows { 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")] + [JsonRequired] + public Guid RequestId { get; set; } + + /// + /// The errors associated with the failed API call + /// + /// The errors associated with the failed API call + [JsonPropertyName("errors")] + [JsonRequired] + public List Errors { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SchedulePickupResponseBody {\n"); + sb.Append(" PickupId: ").Append(PickupId).Append("\n"); + sb.Append(" LabelIds: ").Append(LabelIds).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).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(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" PickupAddress: ").Append(PickupAddress).Append("\n"); + sb.Append(" ContactDetails: ").Append(ContactDetails).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(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + 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..4a6a81d8 --- /dev/null +++ b/ShipEngineSDK/Model/Service.cs @@ -0,0 +1,121 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 the carrier + /// + /// A string that uniquely identifies the carrier + /// + /// se-28529731 + /// + [JsonPropertyName("carrier_id")] + public string CarrierId { get; set; } + + /// + /// 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")] + public string CarrierCode { get; set; } + + /// + /// service code + /// + /// service code + /// + /// usps_media_mail + /// + [JsonPropertyName("service_code")] + public string ServiceCode { get; set; } + + /// + /// User friendly service name + /// + /// User friendly service name + /// + /// USPS First Class Mail + /// + [JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// Supports domestic shipping + /// + /// Supports domestic shipping + [JsonPropertyName("domestic")] + public bool Domestic { get; set; } + + /// + /// Supports international shipping. + /// + /// Supports international shipping. + [JsonPropertyName("international")] + public bool International { get; set; } + + /// + /// Carrier supports multiple packages per shipment + /// + /// Carrier supports multiple packages per shipment + [JsonPropertyName("is_multi_package_supported")] + public bool IsMultiPackageSupported { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Service {\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" Name: ").Append(Name).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("}\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..732f622e --- /dev/null +++ b/ShipEngineSDK/Model/Shipment.cs @@ -0,0 +1,314 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// The current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + [JsonRequired] + public ShipmentStatus ShipmentStatus { get; set; } = new(); + + + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + [JsonRequired] + public DeliveryConfirmation Confirmation { get; set; } = new(); + + + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + [JsonRequired] + public InsuranceProvider InsuranceProvider { get; set; } = new(); + + + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + [JsonRequired] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + [JsonRequired] + public ShippingAddressTo ShipTo { 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")] + [JsonRequired] + public ShippingAddress ShipFrom { 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")] + [JsonRequired] + public string WarehouseId { 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")] + [JsonRequired] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + [JsonRequired] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + [JsonRequired] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + [JsonRequired] + public List Tags { 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")] + [JsonRequired] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + [JsonRequired] + 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")] + public string ComparisonRateType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Shipment {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + 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..7fc69d69 --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentIdRequest.cs @@ -0,0 +1,64 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string ShipmentId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ShipmentIdRequest {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + 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..d1ab2ff4 --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentItem.cs @@ -0,0 +1,126 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// item name + /// + /// item name + [JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// sales order id + /// + /// sales order id + [JsonPropertyName("sales_order_id")] + public string SalesOrderId { get; set; } + + /// + /// sales order item id + /// + /// sales order item id + [JsonPropertyName("sales_order_item_id")] + public string SalesOrderItemId { get; set; } + + /// + /// The quantity of this item included in the shipment + /// + /// The quantity of this item included in the shipment + [JsonPropertyName("quantity")] + public int Quantity { get; set; } + + /// + /// Item Stock Keeping Unit + /// + /// Item Stock Keeping Unit + [JsonPropertyName("sku")] + public string Sku { get; set; } + + /// + /// external order id + /// + /// external order id + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { get; set; } + + /// + /// external order item id + /// + /// external order item id + [JsonPropertyName("external_order_item_id")] + public string ExternalOrderItemId { get; set; } + + /// + /// Amazon Standard Identification Number + /// + /// Amazon Standard Identification Number + /// + /// B00005N5PF + /// + [JsonPropertyName("asin")] + public string Asin { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ShipmentItem {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" SalesOrderId: ").Append(SalesOrderId).Append("\n"); + sb.Append(" SalesOrderItemId: ").Append(SalesOrderItemId).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" Sku: ").Append(Sku).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" ExternalOrderItemId: ").Append(ExternalOrderItemId).Append("\n"); + sb.Append(" Asin: ").Append(Asin).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + 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..6ba0cf60 --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentRequest.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; +using System.Text.RegularExpressions; + +namespace ShipEngineSDK.Model; + +/// +/// ShipmentRequest +/// +public partial class ShipmentRequest +{ + + /// + /// The shipment object + /// + /// The shipment object + [JsonPropertyName("shipment")] + public AddressValidatingShipment Shipment { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ShipmentRequest {\n"); + sb.Append(" Shipment: ").Append(Shipment).Append("\n"); + 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..67b2da2d --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentStatus.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..2330540f --- /dev/null +++ b/ShipEngineSDK/Model/ShipmentsSortBy.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..cb85434e --- /dev/null +++ b/ShipEngineSDK/Model/ShippingAddress.cs @@ -0,0 +1,199 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Indicates whether this is a residential address. CLOVUS + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator")] + [JsonRequired] + public AddressResidentialIndicator AddressResidentialIndicator { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + 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")] + [JsonRequired] + public string Phone { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email")] + public string Email { 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")] + public string CompanyName { 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")] + [JsonRequired] + 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")] + 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")] + public string AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality")] + [JsonRequired] + public string CityLocality { 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")] + [JsonRequired] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { 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")] + [JsonRequired] + public string CountryCode { 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")] + public string Instructions { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ShippingAddress {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).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(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + 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..f4f10064 --- /dev/null +++ b/ShipEngineSDK/Model/ShippingAddressTo.cs @@ -0,0 +1,206 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Indicates whether this is a residential address. CLOVUS + /// + /// Indicates whether this is a residential address. + [JsonPropertyName("address_residential_indicator")] + [JsonRequired] + public AddressResidentialIndicator AddressResidentialIndicator { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + 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")] + [JsonRequired] + public string Phone { get; set; } + + /// + /// Email for the address owner. + /// + /// Email for the address owner. + /// + /// example@example.com + /// + [JsonPropertyName("email")] + public string Email { 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")] + public string CompanyName { 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")] + [JsonRequired] + 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")] + 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")] + public string AddressLine3 { get; set; } + + /// + /// The name of the city or locality + /// + /// The name of the city or locality + /// + /// Winnipeg + /// + [JsonPropertyName("city_locality")] + [JsonRequired] + public string CityLocality { 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")] + [JsonRequired] + public string StateProvince { get; set; } + + /// + /// postal code + /// + /// postal code + /// + /// 78756-3717 + /// + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { 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")] + [JsonRequired] + public string CountryCode { 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")] + public string Instructions { get; set; } + + /// + /// Gets or Sets Geolocation + /// + [JsonPropertyName("geolocation")] + public List Geolocation { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ShippingAddressTo {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).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(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); + sb.Append(" Instructions: ").Append(Instructions).Append("\n"); + sb.Append(" Geolocation: ").Append(Geolocation).Append("\n"); + 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..23ec9ffd --- /dev/null +++ b/ShipEngineSDK/Model/SmartPostHub.cs @@ -0,0 +1,269 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..abe55972 --- /dev/null +++ b/ShipEngineSDK/Model/SortDir.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..1103c0c4 --- /dev/null +++ b/ShipEngineSDK/Model/StatusCode.cs @@ -0,0 +1,107 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +/// +/// 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 +[JsonConverter(typeof(StatusCodeJsonConverter))] +public class StatusCode +{ + private string _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"); + + + public override string ToString() => _value; +} + +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/Tag.cs b/ShipEngineSDK/Model/Tag.cs new file mode 100644 index 00000000..c5956fb3 --- /dev/null +++ b/ShipEngineSDK/Model/Tag.cs @@ -0,0 +1,65 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Name { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Tag {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + 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..5eaabd98 --- /dev/null +++ b/ShipEngineSDK/Model/TagShipmentResponseBody.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public List Tags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TagShipmentResponseBody {\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + 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..22b20c87 --- /dev/null +++ b/ShipEngineSDK/Model/TaxIdentifier.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 TaxableEntityType CLOVUS + /// + [JsonPropertyName("taxable_entity_type")] + [JsonRequired] + public TaxableEntityType TaxableEntityType { get; set; } = new(); + + + /// + /// Gets or Sets IdentifierType CLOVUS + /// + [JsonPropertyName("identifier_type")] + [JsonRequired] + public IdentifierType IdentifierType { get; set; } = new(); + + + /// + /// 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")] + [JsonRequired] + public string IssuingAuthority { get; set; } + + /// + /// The value of the identifier + /// + /// The value of the identifier + [JsonPropertyName("value")] + [JsonRequired] + public string Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TaxIdentifier {\n"); + sb.Append(" TaxableEntityType: ").Append(TaxableEntityType).Append("\n"); + sb.Append(" IdentifierType: ").Append(IdentifierType).Append("\n"); + sb.Append(" IssuingAuthority: ").Append(IssuingAuthority).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + 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/TaxableEntityType.cs b/ShipEngineSDK/Model/TaxableEntityType.cs new file mode 100644 index 00000000..18334085 --- /dev/null +++ b/ShipEngineSDK/Model/TaxableEntityType.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..d518dade --- /dev/null +++ b/ShipEngineSDK/Model/TokensGetEphemeralTokenResponseBodyYaml.cs @@ -0,0 +1,69 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 requested token that expires in 10 seconds. + /// + /// The requested token that expires in 10 seconds. + [JsonPropertyName("token")] + public string Token { get; set; } + + /// + /// The redirect url formatted with the requested token. + /// + /// The redirect url formatted with the requested token. + [JsonPropertyName("redirect_url")] + public string RedirectUrl { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TokensGetEphemeralTokenResponseBodyYaml {\n"); + sb.Append(" Token: ").Append(Token).Append("\n"); + sb.Append(" RedirectUrl: ").Append(RedirectUrl).Append("\n"); + 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..307147af --- /dev/null +++ b/ShipEngineSDK/Model/TrackEvent.cs @@ -0,0 +1,234 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets StatusCode CLOVUS + /// + [JsonPropertyName("status_code")] + [JsonRequired] + public StatusCode StatusCode { get; set; } = new(); + + + /// + /// Timestamp for carrier event + /// + /// Timestamp for carrier event + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("occurred_at")] + [JsonRequired] + public DateTime OccurredAt { 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")] + public DateTime CarrierOccurredAt { get; set; } + + /// + /// Event description + /// + /// Event description + /// + /// Delivered, In/At Mailbox + /// + [JsonPropertyName("description")] + public string Description { get; set; } + + /// + /// City locality + /// + /// City locality + /// + /// AUSTIN + /// + [JsonPropertyName("city_locality")] + [JsonRequired] + public string CityLocality { get; set; } + + /// + /// State province + /// + /// State province + /// + /// TX + /// + [JsonPropertyName("state_province")] + [JsonRequired] + public string StateProvince { get; set; } + + /// + /// Postal code + /// + /// Postal code + /// + /// 78756 + /// + [JsonPropertyName("postal_code")] + [JsonRequired] + public string PostalCode { 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")] + public string CountryCode { get; set; } + + /// + /// Company Name + /// + /// Company Name + /// + /// Stamps.com + /// + [JsonPropertyName("company_name")] + public string CompanyName { get; set; } + + /// + /// Signer information + /// + /// Signer information + [JsonPropertyName("signer")] + public string Signer { get; set; } + + /// + /// Event Code + /// + /// Event Code + [JsonPropertyName("event_code")] + public string EventCode { get; set; } + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code")] + [JsonRequired] + public string CarrierDetailCode { get; set; } + + /// + /// Event Status Description + /// + /// Event Status Description + /// + /// In Transit + /// + [JsonPropertyName("status_description")] + [JsonRequired] + public string StatusDescription { get; set; } + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code")] + [JsonRequired] + public string CarrierStatusCode { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description")] + [JsonRequired] + public string CarrierStatusDescription { get; set; } + + /// + /// Latitude coordinate of tracking event. + /// + /// Latitude coordinate of tracking event. + [JsonPropertyName("latitude")] + public double Latitude { get; set; } + + /// + /// Longitude coordinate of tracking event. + /// + /// Longitude coordinate of tracking event. + [JsonPropertyName("longitude")] + public double Longitude { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TrackEvent {\n"); + sb.Append(" OccurredAt: ").Append(OccurredAt).Append("\n"); + sb.Append(" CarrierOccurredAt: ").Append(CarrierOccurredAt).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); + sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Signer: ").Append(Signer).Append("\n"); + sb.Append(" EventCode: ").Append(EventCode).Append("\n"); + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" Latitude: ").Append(Latitude).Append("\n"); + sb.Append(" Longitude: ").Append(Longitude).Append("\n"); + 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..aa34bc6c --- /dev/null +++ b/ShipEngineSDK/Model/TrackingInformation.cs @@ -0,0 +1,196 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets StatusCode CLOVUS + /// + [JsonPropertyName("status_code")] + public 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")] + public string TrackingNumber { get; set; } + + /// + /// Carrier Tracking Url, if available + /// + /// Carrier Tracking Url, if available + /// + /// https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234 + /// + [JsonPropertyName("tracking_url")] + public string TrackingUrl { 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")] + public string CarrierCode { get; set; } + + /// + /// 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_id")] + public string CarrierId { get; set; } + + /// + /// Status description + /// + /// Status description + /// + /// Delivered + /// + [JsonPropertyName("status_description")] + public string StatusDescription { get; set; } + + /// + /// Carrier status code + /// + /// Carrier status code + /// + /// 1 + /// + [JsonPropertyName("carrier_status_code")] + public string CarrierStatusCode { get; set; } + + /// + /// Carrier detail code + /// + /// Carrier detail code + /// + /// OT + /// + [JsonPropertyName("carrier_detail_code")] + public string CarrierDetailCode { get; set; } + + /// + /// carrier status description + /// + /// carrier status description + /// + /// Your item was delivered in or at the mailbox at 9:10 am on March + /// + [JsonPropertyName("carrier_status_description")] + 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("ship_date")] + public DateTime ShipDate { 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")] + public DateTime EstimatedDeliveryDate { 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")] + public DateTime ActualDeliveryDate { get; set; } + + /// + /// Exception description + /// + /// Exception description + [JsonPropertyName("exception_description")] + public string ExceptionDescription { 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. + [JsonPropertyName("events")] + public List Events { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TrackingInformation {\n"); + sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); + sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" StatusDescription: ").Append(StatusDescription).Append("\n"); + sb.Append(" CarrierStatusCode: ").Append(CarrierStatusCode).Append("\n"); + sb.Append(" CarrierDetailCode: ").Append(CarrierDetailCode).Append("\n"); + sb.Append(" CarrierStatusDescription: ").Append(CarrierStatusDescription).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" EstimatedDeliveryDate: ").Append(EstimatedDeliveryDate).Append("\n"); + sb.Append(" ActualDeliveryDate: ").Append(ActualDeliveryDate).Append("\n"); + sb.Append(" ExceptionDescription: ").Append(ExceptionDescription).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + 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..61910bdc --- /dev/null +++ b/ShipEngineSDK/Model/TrackingStatus.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..9532cc4b --- /dev/null +++ b/ShipEngineSDK/Model/TransportMean.cs @@ -0,0 +1,88 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..bf14f118 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateAccountSettingsImageRequestBody.cs @@ -0,0 +1,173 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _value; + + internal ImageContentTypeEnum() + { + _value = "image/png"; + } + + public ImageContentTypeEnum(string 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"); + + + 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 CLOVUS + /// + /// The image type + [JsonPropertyName("image_content_type")] + public ImageContentTypeEnum? ImageContentType { 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. + /// + /// img_DtBXupDBxREpHnwEXhTfgK + /// + [JsonPropertyName("label_image_id")] + public string LabelImageId { get; set; } + + /// + /// A human readable name for the image. + /// + /// A human readable name for the image. + /// + /// My logo + /// + [JsonPropertyName("name")] + 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")] + [JsonRequired] + public bool IsDefault { 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")] + 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")] + public DateTime 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")] + public DateTime ModifiedAt { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateAccountSettingsImageRequestBody {\n"); + sb.Append(" LabelImageId: ").Append(LabelImageId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" ImageContentType: ").Append(ImageContentType).Append("\n"); + sb.Append(" ImageData: ").Append(ImageData).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + 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..ca0f0058 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateAmazonBuyShippingRequestBody.cs @@ -0,0 +1,61 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string Email { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateAmazonBuyShippingRequestBody {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + 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..c94981c0 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateCarrierSettingsRequestBody.cs @@ -0,0 +1,379 @@ +/* + * 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.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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) + { + this.IsNullable = false; + this.SchemaType = "oneOf"; + this.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 HashSet OneOfTypes = [typeof(UpdateDhlExpressSettingsRequestBody), typeof(UpdateFedexSettingsRequestBody), typeof(UpdateNewgisticsSettingsRequestBody), typeof(UpdateUpsSettingsRequestBody), typeof(UpdateAmazonBuyShippingRequestBody)]; + private static HashSet MandatoryFields = []; + private static 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(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("UpdateDhlExpressSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into UpdateDhlExpressSettingsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("UpdateFedexSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into UpdateFedexSettingsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("UpdateNewgisticsSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into UpdateNewgisticsSettingsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("UpdateUpsSettingsRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into UpdateUpsSettingsRequestBody: {1}", jsonDoc, exception.ToString())); + } + + try + { + newUpdateCarrierSettingsRequestBody = new UpdateCarrierSettingsRequestBody(JsonSerializer.Deserialize(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("UpdateAmazonBuyShippingRequestBody"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into UpdateAmazonBuyShippingRequestBody: {1}", jsonDoc, exception.ToString())); + } + + 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..81308538 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateDhlExpressSettingsRequestBody.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname")] + 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")] + public bool ShouldHideAccountNumberOnArchiveDoc { get; set; } + + /// + /// Indicates if this is primary account + /// + /// Indicates if this is primary account + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateDhlExpressSettingsRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" ShouldHideAccountNumberOnArchiveDoc: ").Append(ShouldHideAccountNumberOnArchiveDoc).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + 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..0765d4b4 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateFedexSettingsRequestBody.cs @@ -0,0 +1,100 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 PickupType CLOVUS + /// + [JsonPropertyName("pickup_type")] + public FedexPickupType? PickupType { get; set; } + /// + /// Gets or Sets SmartPostHub CLOVUS + /// + [JsonPropertyName("smart_post_hub")] + public SmartPostHub? SmartPostHub { get; set; } + /// + /// Gets or Sets SmartPostEndorsement CLOVUS + /// + [JsonPropertyName("smart_post_endorsement")] + public AncillaryServiceEndorsement? SmartPostEndorsement { get; set; } + /// + /// Account nickname + /// + /// Account nickname + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Gets or Sets IsPrimaryAccount + /// + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + /// + /// Gets or Sets SignatureImage + /// + [JsonPropertyName("signature_image")] + public string SignatureImage { get; set; } + + /// + /// Gets or Sets LetterheadImage + /// + [JsonPropertyName("letterhead_image")] + public string LetterheadImage { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateFedexSettingsRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" SmartPostHub: ").Append(SmartPostHub).Append("\n"); + sb.Append(" SmartPostEndorsement: ").Append(SmartPostEndorsement).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" SignatureImage: ").Append(SignatureImage).Append("\n"); + sb.Append(" LetterheadImage: ").Append(LetterheadImage).Append("\n"); + 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..bfea3343 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateNewgisticsSettingsRequestBody.cs @@ -0,0 +1,67 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public bool IncludeBarcodeWithOrderNumber { get; set; } + + /// + /// Gets or Sets ReceiveEmailOnManifestProcessing + /// + [JsonPropertyName("receive_email_on_manifest_processing")] + public bool ReceiveEmailOnManifestProcessing { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateNewgisticsSettingsRequestBody {\n"); + sb.Append(" IncludeBarcodeWithOrderNumber: ").Append(IncludeBarcodeWithOrderNumber).Append("\n"); + sb.Append(" ReceiveEmailOnManifestProcessing: ").Append(ReceiveEmailOnManifestProcessing).Append("\n"); + 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..c8ab72cf --- /dev/null +++ b/ShipEngineSDK/Model/UpdatePackageTypeRequestBody.cs @@ -0,0 +1,106 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the package. + /// + /// A string that uniquely identifies the package. + /// + /// se-28529731 + /// + [JsonPropertyName("package_id")] + public string PackageId { 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")] + [JsonRequired] + public string PackageCode { get; set; } + + /// + /// Gets or Sets Name + /// + /// + /// laptop_box + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// The custom dimensions for the package. + /// + /// The custom dimensions for the package. + [JsonPropertyName("dimensions")] + public Dimensions Dimensions { get; set; } + + /// + /// Provides a helpful description for the custom package. + /// + /// Provides a helpful description for the custom package. + /// + /// Packaging for laptops + /// + [JsonPropertyName("description")] + public string Description { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdatePackageTypeRequestBody {\n"); + sb.Append(" PackageId: ").Append(PackageId).Append("\n"); + sb.Append(" PackageCode: ").Append(PackageCode).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + 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..72d03bc7 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentFields.cs @@ -0,0 +1,59 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateShipmentFields {\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + 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..639a5ca7 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentRequestBody.cs @@ -0,0 +1,298 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + public ShipmentStatus? ShipmentStatus { get; set; } + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + public DeliveryConfirmation? Confirmation { get; set; } + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + public InsuranceProvider? InsuranceProvider { get; set; } + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// Gets or Sets ValidateAddress CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + public string ShipmentId { 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")] + public 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")] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + [JsonRequired] + public ShippingAddressTo ShipTo { 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")] + [JsonRequired] + public ShippingAddress ShipFrom { 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")] + public string WarehouseId { 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")] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + public List Tags { 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")] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + 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")] + public string ComparisonRateType { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateShipmentRequestBody {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + 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..eacc9753 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentResponseBody.cs @@ -0,0 +1,331 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 current status of the shipment CLOVUS + /// + /// The current status of the shipment + [JsonPropertyName("shipment_status")] + [JsonRequired] + public ShipmentStatus ShipmentStatus { get; set; } = new(); + + + /// + /// The type of delivery confirmation that is required for this shipment. CLOVUS + /// + /// The type of delivery confirmation that is required for this shipment. + [JsonPropertyName("confirmation")] + [JsonRequired] + public DeliveryConfirmation Confirmation { get; set; } = new(); + + + /// + /// The insurance provider to use for any insured packages in the shipment. CLOVUS + /// + /// The insurance provider to use for any insured packages in the shipment. + [JsonPropertyName("insurance_provider")] + [JsonRequired] + public InsuranceProvider InsuranceProvider { get; set; } = new(); + + + /// + /// Gets or Sets OrderSourceCode CLOVUS + /// + [JsonPropertyName("order_source_code")] + public OrderSourceName? OrderSourceCode { get; set; } + /// + /// A string that uniquely identifies the shipment + /// + /// A string that uniquely identifies the shipment + /// + /// se-28529731 + /// + [JsonPropertyName("shipment_id")] + [JsonRequired] + public string ShipmentId { 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")] + [JsonRequired] + public 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")] + [JsonRequired] + public string ServiceCode { 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")] + public string ShippingRuleId { get; set; } + + /// + /// ID that the Order Source assigned + /// + /// ID that the Order Source assigned + [JsonPropertyName("external_order_id")] + public string ExternalOrderId { 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")] + public List Items { get; set; } + + /// + /// Gets or Sets TaxIdentifiers + /// + [JsonPropertyName("tax_identifiers")] + public List TaxIdentifiers { 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")] + public string ExternalShipmentId { 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")] + public string ShipmentNumber { get; set; } + + /// + /// 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. + /// + /// 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. + /// + /// 2018-09-23T00:00Z + /// + [JsonPropertyName("ship_date")] + [JsonRequired] + public DateTime ShipDate { get; set; } + + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// The date and time that the shipment was created in ShipEngine. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("created_at")] + [JsonRequired] + public DateTime CreatedAt { 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. + /// + /// 2018-09-23T15:00Z + /// + [JsonPropertyName("modified_at")] + public DateTime ModifiedAt { get; set; } + + /// + /// The recipient's mailing address + /// + /// The recipient's mailing address + [JsonPropertyName("ship_to")] + [JsonRequired] + public ShippingAddressTo ShipTo { 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")] + [JsonRequired] + public ShippingAddress ShipFrom { 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")] + public string WarehouseId { 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")] + [JsonRequired] + public ShippingAddress ReturnTo { 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")] + public bool? IsReturn { get; set; } + + /// + /// Customs information. This is usually only needed for international shipments. + /// + /// Customs information. This is usually only needed for international shipments. + [JsonPropertyName("customs")] + [JsonRequired] + public InternationalShipmentOptions Customs { get; set; } + + /// + /// Advanced shipment options. These are entirely optional. + /// + /// Advanced shipment options. These are entirely optional. + [JsonPropertyName("advanced_options")] + [JsonRequired] + public AdvancedShipmentOptions AdvancedOptions { 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. + [JsonPropertyName("tags")] + [JsonRequired] + public List Tags { 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")] + [JsonRequired] + public List Packages { get; set; } + + /// + /// The combined weight of all packages in the shipment + /// + /// The combined weight of all packages in the shipment + [JsonPropertyName("total_weight")] + [JsonRequired] + 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")] + public string ComparisonRateType { get; set; } + + /// + /// An array of errors that occurred while creating shipment. + /// + /// An array of errors that occurred while creating shipment. + [JsonPropertyName("errors")] + [JsonRequired] + [Obsolete] + public List Errors { get; set; } + + /// + /// The address validation + /// + /// The address validation + [JsonPropertyName("address_validation")] + [JsonRequired] + public AddressValidationResult AddressValidation { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateShipmentResponseBody {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" CarrierId: ").Append(CarrierId).Append("\n"); + sb.Append(" ServiceCode: ").Append(ServiceCode).Append("\n"); + sb.Append(" ShippingRuleId: ").Append(ShippingRuleId).Append("\n"); + sb.Append(" ExternalOrderId: ").Append(ExternalOrderId).Append("\n"); + sb.Append(" Items: ").Append(Items).Append("\n"); + sb.Append(" TaxIdentifiers: ").Append(TaxIdentifiers).Append("\n"); + sb.Append(" ExternalShipmentId: ").Append(ExternalShipmentId).Append("\n"); + sb.Append(" ShipmentNumber: ").Append(ShipmentNumber).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ShipmentStatus: ").Append(ShipmentStatus).Append("\n"); + sb.Append(" ShipTo: ").Append(ShipTo).Append("\n"); + sb.Append(" ShipFrom: ").Append(ShipFrom).Append("\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" ReturnTo: ").Append(ReturnTo).Append("\n"); + sb.Append(" IsReturn: ").Append(IsReturn).Append("\n"); + sb.Append(" Confirmation: ").Append(Confirmation).Append("\n"); + sb.Append(" Customs: ").Append(Customs).Append("\n"); + sb.Append(" AdvancedOptions: ").Append(AdvancedOptions).Append("\n"); + sb.Append(" InsuranceProvider: ").Append(InsuranceProvider).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" OrderSourceCode: ").Append(OrderSourceCode).Append("\n"); + sb.Append(" Packages: ").Append(Packages).Append("\n"); + sb.Append(" TotalWeight: ").Append(TotalWeight).Append("\n"); + sb.Append(" ComparisonRateType: ").Append(ComparisonRateType).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" AddressValidation: ").Append(AddressValidation).Append("\n"); + 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..e9eb0faf --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentsTags.cs @@ -0,0 +1,60 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public List ShipmentsTags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateShipmentsTags {\n"); + sb.Append(" ShipmentsTags: ").Append(ShipmentsTags).Append("\n"); + 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..24851e44 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentsTagsRequestBody.cs @@ -0,0 +1,60 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public List ShipmentsTags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateShipmentsTagsRequestBody {\n"); + sb.Append(" ShipmentsTags: ").Append(ShipmentsTags).Append("\n"); + 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..08be40b3 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateShipmentsTagsShipmentsTagsInner.cs @@ -0,0 +1,67 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public string ShipmentId { get; set; } + + /// + /// Gets or Sets Tags + /// + [JsonPropertyName("tags")] + public List Tags { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateShipmentsTagsShipmentsTagsInner {\n"); + sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + 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..bd3eaa94 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateUpsSettingsRequestBody.cs @@ -0,0 +1,145 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets PickupType CLOVUS + /// + [JsonPropertyName("pickup_type")] + public UpsPickupType? PickupType { get; set; } + /// + /// Gets or Sets MailInnovationsEndorsement CLOVUS + /// + [JsonPropertyName("mail_innovations_endorsement")] + public AncillaryServiceEndorsement? MailInnovationsEndorsement { get; set; } + /// + /// nickname + /// + /// nickname + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Indicates if this is the primary UPS account + /// + /// Indicates if this is the primary UPS account + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + /// + /// The use carbon neutral shipping program + /// + /// The use carbon neutral shipping program + [JsonPropertyName("use_carbon_neutral_shipping_program")] + public bool UseCarbonNeutralShippingProgram { get; set; } + + /// + /// The use ground freight pricing + /// + /// The use ground freight pricing + [JsonPropertyName("use_ground_freight_pricing")] + public bool UseGroundFreightPricing { get; set; } + + /// + /// The use consolidation services + /// + /// The use consolidation services + [JsonPropertyName("use_consolidation_services")] + public bool UseConsolidationServices { 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")] + public bool UseOrderNumberOnMailInnovationsLabels { get; set; } + + /// + /// mail innovations cost center + /// + /// mail innovations cost center + [JsonPropertyName("mail_innovations_cost_center")] + public string MailInnovationsCostCenter { get; set; } + + /// + /// The use negotiated rates + /// + /// The use negotiated rates + [JsonPropertyName("use_negotiated_rates")] + public bool UseNegotiatedRates { get; set; } + + /// + /// account postal code + /// + /// account postal code + [JsonPropertyName("account_postal_code")] + public string AccountPostalCode { get; set; } + + /// + /// The invoice + /// + /// The invoice + [JsonPropertyName("invoice")] + public UpsInvoice Invoice { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateUpsSettingsRequestBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" UseCarbonNeutralShippingProgram: ").Append(UseCarbonNeutralShippingProgram).Append("\n"); + sb.Append(" UseGroundFreightPricing: ").Append(UseGroundFreightPricing).Append("\n"); + sb.Append(" UseConsolidationServices: ").Append(UseConsolidationServices).Append("\n"); + sb.Append(" UseOrderNumberOnMailInnovationsLabels: ").Append(UseOrderNumberOnMailInnovationsLabels).Append("\n"); + sb.Append(" MailInnovationsEndorsement: ").Append(MailInnovationsEndorsement).Append("\n"); + sb.Append(" MailInnovationsCostCenter: ").Append(MailInnovationsCostCenter).Append("\n"); + sb.Append(" UseNegotiatedRates: ").Append(UseNegotiatedRates).Append("\n"); + sb.Append(" AccountPostalCode: ").Append(AccountPostalCode).Append("\n"); + sb.Append(" Invoice: ").Append(Invoice).Append("\n"); + 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..3ed81bf6 --- /dev/null +++ b/ShipEngineSDK/Model/UpdateWarehouseRequestBody.cs @@ -0,0 +1,112 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + 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")] + public bool? IsDefault { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name")] + [JsonRequired] + public string Name { get; set; } + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address")] + [JsonRequired] + public Address OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address")] + public Address ReturnAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateWarehouseRequestBody {\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + 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..7e26ceaf --- /dev/null +++ b/ShipEngineSDK/Model/UpdateWarehouseSettingsRequestBody.cs @@ -0,0 +1,64 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + public bool? IsDefault { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateWarehouseSettingsRequestBody {\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + 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..d235ab7e --- /dev/null +++ b/ShipEngineSDK/Model/UpdateWebhookRequestBody.cs @@ -0,0 +1,72 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// 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")] + public string Url { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers")] + public List Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpdateWebhookRequestBody {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + 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..61799b90 --- /dev/null +++ b/ShipEngineSDK/Model/UpsAccountSettings.cs @@ -0,0 +1,145 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets PickupType CLOVUS + /// + [JsonPropertyName("pickup_type")] + public UpsPickupType? PickupType { get; set; } + /// + /// Gets or Sets MailInnovationsEndorsement CLOVUS + /// + [JsonPropertyName("mail_innovations_endorsement")] + public AncillaryServiceEndorsement? MailInnovationsEndorsement { get; set; } + /// + /// nickname + /// + /// nickname + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Indicates if this is the primary UPS account + /// + /// Indicates if this is the primary UPS account + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + /// + /// The use carbon neutral shipping program + /// + /// The use carbon neutral shipping program + [JsonPropertyName("use_carbon_neutral_shipping_program")] + public bool UseCarbonNeutralShippingProgram { get; set; } + + /// + /// The use ground freight pricing + /// + /// The use ground freight pricing + [JsonPropertyName("use_ground_freight_pricing")] + public bool UseGroundFreightPricing { get; set; } + + /// + /// The use consolidation services + /// + /// The use consolidation services + [JsonPropertyName("use_consolidation_services")] + public bool UseConsolidationServices { 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")] + public bool UseOrderNumberOnMailInnovationsLabels { get; set; } + + /// + /// mail innovations cost center + /// + /// mail innovations cost center + [JsonPropertyName("mail_innovations_cost_center")] + public string MailInnovationsCostCenter { get; set; } + + /// + /// The use negotiated rates + /// + /// The use negotiated rates + [JsonPropertyName("use_negotiated_rates")] + public bool UseNegotiatedRates { get; set; } + + /// + /// account postal code + /// + /// account postal code + [JsonPropertyName("account_postal_code")] + public string AccountPostalCode { get; set; } + + /// + /// The invoice + /// + /// The invoice + [JsonPropertyName("invoice")] + public UpsInvoice Invoice { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpsAccountSettings {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" UseCarbonNeutralShippingProgram: ").Append(UseCarbonNeutralShippingProgram).Append("\n"); + sb.Append(" UseGroundFreightPricing: ").Append(UseGroundFreightPricing).Append("\n"); + sb.Append(" UseConsolidationServices: ").Append(UseConsolidationServices).Append("\n"); + sb.Append(" UseOrderNumberOnMailInnovationsLabels: ").Append(UseOrderNumberOnMailInnovationsLabels).Append("\n"); + sb.Append(" MailInnovationsEndorsement: ").Append(MailInnovationsEndorsement).Append("\n"); + sb.Append(" MailInnovationsCostCenter: ").Append(MailInnovationsCostCenter).Append("\n"); + sb.Append(" UseNegotiatedRates: ").Append(UseNegotiatedRates).Append("\n"); + sb.Append(" AccountPostalCode: ").Append(AccountPostalCode).Append("\n"); + sb.Append(" Invoice: ").Append(Invoice).Append("\n"); + 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..61a3dd3b --- /dev/null +++ b/ShipEngineSDK/Model/UpsInvoice.cs @@ -0,0 +1,94 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// invoice date + /// + /// invoice date + [JsonPropertyName("invoice_date")] + public DateTime InvoiceDate { get; set; } + + /// + /// invoice number + /// + /// invoice number + [JsonPropertyName("invoice_number")] + public string InvoiceNumber { get; set; } + + /// + /// A string that uniquely identifies the control + /// + /// A string that uniquely identifies the control + /// + /// se-28529731 + /// + [JsonPropertyName("control_id")] + public string ControlId { get; set; } + + /// + /// Gets or Sets InvoiceAmount + /// + [JsonPropertyName("invoice_amount")] + public double InvoiceAmount { get; set; } + + /// + /// Gets or Sets InvoiceCurrencyCode + /// + [JsonPropertyName("invoice_currency_code")] + public string InvoiceCurrencyCode { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpsInvoice {\n"); + sb.Append(" InvoiceDate: ").Append(InvoiceDate).Append("\n"); + sb.Append(" InvoiceNumber: ").Append(InvoiceNumber).Append("\n"); + sb.Append(" ControlId: ").Append(ControlId).Append("\n"); + sb.Append(" InvoiceAmount: ").Append(InvoiceAmount).Append("\n"); + sb.Append(" InvoiceCurrencyCode: ").Append(InvoiceCurrencyCode).Append("\n"); + 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..79e4ca2f --- /dev/null +++ b/ShipEngineSDK/Model/UpsPickupType.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..04d85955 --- /dev/null +++ b/ShipEngineSDK/Model/UpsSettingsResponseBody.cs @@ -0,0 +1,145 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// Gets or Sets PickupType CLOVUS + /// + [JsonPropertyName("pickup_type")] + public UpsPickupType? PickupType { get; set; } + /// + /// Gets or Sets MailInnovationsEndorsement CLOVUS + /// + [JsonPropertyName("mail_innovations_endorsement")] + public AncillaryServiceEndorsement? MailInnovationsEndorsement { get; set; } + /// + /// nickname + /// + /// nickname + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + /// + /// Indicates if this is the primary UPS account + /// + /// Indicates if this is the primary UPS account + [JsonPropertyName("is_primary_account")] + public bool IsPrimaryAccount { get; set; } + + /// + /// The use carbon neutral shipping program + /// + /// The use carbon neutral shipping program + [JsonPropertyName("use_carbon_neutral_shipping_program")] + public bool UseCarbonNeutralShippingProgram { get; set; } + + /// + /// The use ground freight pricing + /// + /// The use ground freight pricing + [JsonPropertyName("use_ground_freight_pricing")] + public bool UseGroundFreightPricing { get; set; } + + /// + /// The use consolidation services + /// + /// The use consolidation services + [JsonPropertyName("use_consolidation_services")] + public bool UseConsolidationServices { 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")] + public bool UseOrderNumberOnMailInnovationsLabels { get; set; } + + /// + /// mail innovations cost center + /// + /// mail innovations cost center + [JsonPropertyName("mail_innovations_cost_center")] + public string MailInnovationsCostCenter { get; set; } + + /// + /// The use negotiated rates + /// + /// The use negotiated rates + [JsonPropertyName("use_negotiated_rates")] + public bool UseNegotiatedRates { get; set; } + + /// + /// account postal code + /// + /// account postal code + [JsonPropertyName("account_postal_code")] + public string AccountPostalCode { get; set; } + + /// + /// The invoice + /// + /// The invoice + [JsonPropertyName("invoice")] + public UpsInvoice Invoice { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class UpsSettingsResponseBody {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" IsPrimaryAccount: ").Append(IsPrimaryAccount).Append("\n"); + sb.Append(" PickupType: ").Append(PickupType).Append("\n"); + sb.Append(" UseCarbonNeutralShippingProgram: ").Append(UseCarbonNeutralShippingProgram).Append("\n"); + sb.Append(" UseGroundFreightPricing: ").Append(UseGroundFreightPricing).Append("\n"); + sb.Append(" UseConsolidationServices: ").Append(UseConsolidationServices).Append("\n"); + sb.Append(" UseOrderNumberOnMailInnovationsLabels: ").Append(UseOrderNumberOnMailInnovationsLabels).Append("\n"); + sb.Append(" MailInnovationsEndorsement: ").Append(MailInnovationsEndorsement).Append("\n"); + sb.Append(" MailInnovationsCostCenter: ").Append(MailInnovationsCostCenter).Append("\n"); + sb.Append(" UseNegotiatedRates: ").Append(UseNegotiatedRates).Append("\n"); + sb.Append(" AccountPostalCode: ").Append(AccountPostalCode).Append("\n"); + sb.Append(" Invoice: ").Append(Invoice).Append("\n"); + 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..73d89a0f --- /dev/null +++ b/ShipEngineSDK/Model/ValidateAddress.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..2a94351f --- /dev/null +++ b/ShipEngineSDK/Model/ValidateShipmentFields.cs @@ -0,0 +1,59 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("validate_address")] + public ValidateAddress? ValidateAddress { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ValidateShipmentFields {\n"); + sb.Append(" ValidateAddress: ").Append(ValidateAddress).Append("\n"); + 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..7e81f094 --- /dev/null +++ b/ShipEngineSDK/Model/ValidationStatus.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..19cd0c68 --- /dev/null +++ b/ShipEngineSDK/Model/VoidLabelResponseBody.cs @@ -0,0 +1,83 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 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. CLOVUS + /// + /// 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. + [JsonPropertyName("reason_code")] + public ReasonCode? ReasonCode { get; set; } + /// + /// Indicates whether the attempt to void the label was successful + /// + /// Indicates whether the attempt to void the label was successful + /// + /// false + /// + [JsonPropertyName("approved")] + [JsonRequired] + public bool Approved { get; set; } + + /// + /// Gets or Sets Message + /// + /// + /// Unable to delete FedEx shipment. Unable to retrieve record from database. + /// + [JsonPropertyName("message")] + [JsonRequired] + public string Message { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class VoidLabelResponseBody {\n"); + sb.Append(" Approved: ").Append(Approved).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" ReasonCode: ").Append(ReasonCode).Append("\n"); + 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..49fef122 --- /dev/null +++ b/ShipEngineSDK/Model/Warehouse.cs @@ -0,0 +1,110 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 +{ + + /// + /// A string that uniquely identifies the warehouse + /// + /// A string that uniquely identifies the warehouse + /// + /// se-28529731 + /// + [JsonPropertyName("warehouse_id")] + 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")] + public bool? IsDefault { get; set; } + + /// + /// Name of the warehouse + /// + /// Name of the warehouse + /// + /// Zero Cool HQ + /// + [JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// Timestamp that indicates when the warehouse was created + /// + /// Timestamp that indicates when the warehouse was created + /// + /// 2019-06-25T18:12:35.583Z + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + + /// + /// The origin address of the warehouse + /// + /// The origin address of the warehouse + [JsonPropertyName("origin_address")] + public Address OriginAddress { get; set; } + + /// + /// The return address associated with the warehouse + /// + /// The return address associated with the warehouse + [JsonPropertyName("return_address")] + public Address ReturnAddress { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Warehouse {\n"); + sb.Append(" WarehouseId: ").Append(WarehouseId).Append("\n"); + sb.Append(" IsDefault: ").Append(IsDefault).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" OriginAddress: ").Append(OriginAddress).Append("\n"); + sb.Append(" ReturnAddress: ").Append(ReturnAddress).Append("\n"); + 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..332caec7 --- /dev/null +++ b/ShipEngineSDK/Model/Webhook.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("event")] + public WebhookEvent? Event { get; set; } + /// + /// A string that uniquely identifies the webhook + /// + /// A string that uniquely identifies the webhook + /// + /// se-28529731 + /// + [JsonPropertyName("webhook_id")] + public string WebhookId { 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")] + public string Url { get; set; } + + /// + /// Array of custom webhook headers + /// + /// Array of custom webhook headers + [JsonPropertyName("headers")] + public List Headers { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Webhook {\n"); + sb.Append(" WebhookId: ").Append(WebhookId).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + 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..421becb0 --- /dev/null +++ b/ShipEngineSDK/Model/WebhookEvent.cs @@ -0,0 +1,107 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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..ba941082 --- /dev/null +++ b/ShipEngineSDK/Model/WebhookHeader.cs @@ -0,0 +1,77 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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")] + [JsonRequired] + public string Key { get; set; } + + /// + /// Value of a header + /// + /// Value of a header + /// + /// custom-value + /// + [JsonPropertyName("value")] + [JsonRequired] + public string Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class WebhookHeader {\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + 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..fe137a24 --- /dev/null +++ b/ShipEngineSDK/Model/Weight.cs @@ -0,0 +1,71 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 CLOVUS + /// + [JsonPropertyName("unit")] + [JsonRequired] + public WeightUnit Unit { get; set; } = new(); + + + /// + /// The weight, in the specified unit + /// + /// The weight, in the specified unit + [JsonPropertyName("value")] + [JsonRequired] + public double Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Weight {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Unit: ").Append(Unit).Append("\n"); + 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..2cc739c9 --- /dev/null +++ b/ShipEngineSDK/Model/WeightUnit.cs @@ -0,0 +1,89 @@ +/* + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using 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 string _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"); + + + public override string ToString() => _value; +} + +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/ShipEngine/Models/Dto/Common/Address.cs b/ShipEngineSDK/Models/Dto/Common/Address.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Address.cs rename to ShipEngineSDK/Models/Dto/Common/Address.cs diff --git a/ShipEngine/Models/Dto/Common/AdvancedShipmentOptions.cs b/ShipEngineSDK/Models/Dto/Common/AdvancedShipmentOptions.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/AdvancedShipmentOptions.cs rename to ShipEngineSDK/Models/Dto/Common/AdvancedShipmentOptions.cs diff --git a/ShipEngine/Models/Dto/Common/CollectOnDelivery.cs b/ShipEngineSDK/Models/Dto/Common/CollectOnDelivery.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/CollectOnDelivery.cs rename to ShipEngineSDK/Models/Dto/Common/CollectOnDelivery.cs diff --git a/ShipEngine/Models/Dto/Common/Customs.cs b/ShipEngineSDK/Models/Dto/Common/Customs.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Customs.cs rename to ShipEngineSDK/Models/Dto/Common/Customs.cs diff --git a/ShipEngine/Models/Dto/Common/Dimensions.cs b/ShipEngineSDK/Models/Dto/Common/Dimensions.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Dimensions.cs rename to ShipEngineSDK/Models/Dto/Common/Dimensions.cs diff --git a/ShipEngine/Models/Dto/Common/Download.cs b/ShipEngineSDK/Models/Dto/Common/Download.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Download.cs rename to ShipEngineSDK/Models/Dto/Common/Download.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/AddressResidentialIndicator.cs b/ShipEngineSDK/Models/Dto/Common/Enums/AddressResidentialIndicator.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/AddressResidentialIndicator.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/AddressResidentialIndicator.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/BillToParty.cs b/ShipEngineSDK/Models/Dto/Common/Enums/BillToParty.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/BillToParty.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/BillToParty.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/Country.cs b/ShipEngineSDK/Models/Dto/Common/Enums/Country.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/Country.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/Country.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/Currency.cs b/ShipEngineSDK/Models/Dto/Common/Enums/Currency.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/Currency.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/Currency.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/DeliveryConfirmation.cs b/ShipEngineSDK/Models/Dto/Common/Enums/DeliveryConfirmation.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/DeliveryConfirmation.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/DeliveryConfirmation.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/DimensionUnit.cs b/ShipEngineSDK/Models/Dto/Common/Enums/DimensionUnit.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/DimensionUnit.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/DimensionUnit.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/DisplayScheme.cs b/ShipEngineSDK/Models/Dto/Common/Enums/DisplayScheme.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/DisplayScheme.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/DisplayScheme.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/IdentifierType.cs b/ShipEngineSDK/Models/Dto/Common/Enums/IdentifierType.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/IdentifierType.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/IdentifierType.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/InsuranceProvider.cs b/ShipEngineSDK/Models/Dto/Common/Enums/InsuranceProvider.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/InsuranceProvider.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/InsuranceProvider.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/LabelFormat.cs b/ShipEngineSDK/Models/Dto/Common/Enums/LabelFormat.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/LabelFormat.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/LabelFormat.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/LabelLayout.cs b/ShipEngineSDK/Models/Dto/Common/Enums/LabelLayout.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/LabelLayout.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/LabelLayout.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/NonDelivery.cs b/ShipEngineSDK/Models/Dto/Common/Enums/NonDelivery.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/NonDelivery.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/NonDelivery.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/OrderSourceCode.cs b/ShipEngineSDK/Models/Dto/Common/Enums/OrderSourceCode.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/OrderSourceCode.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/OrderSourceCode.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/OriginType.cs b/ShipEngineSDK/Models/Dto/Common/Enums/OriginType.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/OriginType.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/OriginType.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/PackageContents.cs b/ShipEngineSDK/Models/Dto/Common/Enums/PackageContents.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/PackageContents.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/PackageContents.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/PaymentType.cs b/ShipEngineSDK/Models/Dto/Common/Enums/PaymentType.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/PaymentType.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/PaymentType.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/TaxableEntityType.cs b/ShipEngineSDK/Models/Dto/Common/Enums/TaxableEntityType.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/TaxableEntityType.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/TaxableEntityType.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/TrackingStatusCode.cs b/ShipEngineSDK/Models/Dto/Common/Enums/TrackingStatusCode.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/TrackingStatusCode.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/TrackingStatusCode.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/TrackingStatusDescription.cs b/ShipEngineSDK/Models/Dto/Common/Enums/TrackingStatusDescription.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/TrackingStatusDescription.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/TrackingStatusDescription.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/ValidateAddress.cs b/ShipEngineSDK/Models/Dto/Common/Enums/ValidateAddress.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/ValidateAddress.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/ValidateAddress.cs diff --git a/ShipEngine/Models/Dto/Common/Enums/WeightUnit.cs b/ShipEngineSDK/Models/Dto/Common/Enums/WeightUnit.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Enums/WeightUnit.cs rename to ShipEngineSDK/Models/Dto/Common/Enums/WeightUnit.cs diff --git a/ShipEngine/Models/Dto/Common/LabelMessages.cs b/ShipEngineSDK/Models/Dto/Common/LabelMessages.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/LabelMessages.cs rename to ShipEngineSDK/Models/Dto/Common/LabelMessages.cs diff --git a/ShipEngine/Models/Dto/Common/MonetaryValue.cs b/ShipEngineSDK/Models/Dto/Common/MonetaryValue.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/MonetaryValue.cs rename to ShipEngineSDK/Models/Dto/Common/MonetaryValue.cs diff --git a/ShipEngine/Models/Dto/Common/ShipEngineAPIError.cs b/ShipEngineSDK/Models/Dto/Common/ShipEngineAPIError.cs similarity index 98% rename from ShipEngine/Models/Dto/Common/ShipEngineAPIError.cs rename to ShipEngineSDK/Models/Dto/Common/ShipEngineAPIError.cs index 486d5209..5e6ed351 100644 --- a/ShipEngine/Models/Dto/Common/ShipEngineAPIError.cs +++ b/ShipEngineSDK/Models/Dto/Common/ShipEngineAPIError.cs @@ -1,5 +1,6 @@ #nullable disable +using ShipEngineSDK.Enums; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/ShipEngine/Models/Dto/Common/ShipmentItem.cs b/ShipEngineSDK/Models/Dto/Common/ShipmentItem.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/ShipmentItem.cs rename to ShipEngineSDK/Models/Dto/Common/ShipmentItem.cs diff --git a/ShipEngine/Models/Dto/Common/ShipmentPackage.cs b/ShipEngineSDK/Models/Dto/Common/ShipmentPackage.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/ShipmentPackage.cs rename to ShipEngineSDK/Models/Dto/Common/ShipmentPackage.cs diff --git a/ShipEngine/Models/Dto/Common/TaxIdentifier.cs b/ShipEngineSDK/Models/Dto/Common/TaxIdentifier.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/TaxIdentifier.cs rename to ShipEngineSDK/Models/Dto/Common/TaxIdentifier.cs diff --git a/ShipEngine/Models/Dto/Common/Weight.cs b/ShipEngineSDK/Models/Dto/Common/Weight.cs similarity index 100% rename from ShipEngine/Models/Dto/Common/Weight.cs rename to ShipEngineSDK/Models/Dto/Common/Weight.cs diff --git a/ShipEngine/Models/Dto/CreateLabelFromRate/Enums.cs b/ShipEngineSDK/Models/Dto/CreateLabelFromRate/Enums.cs similarity index 100% rename from ShipEngine/Models/Dto/CreateLabelFromRate/Enums.cs rename to ShipEngineSDK/Models/Dto/CreateLabelFromRate/Enums.cs diff --git a/ShipEngine/Models/Dto/CreateLabelFromRate/Params.cs b/ShipEngineSDK/Models/Dto/CreateLabelFromRate/Params.cs similarity index 100% rename from ShipEngine/Models/Dto/CreateLabelFromRate/Params.cs rename to ShipEngineSDK/Models/Dto/CreateLabelFromRate/Params.cs diff --git a/ShipEngine/Models/Dto/CreateLabelFromRate/Result.cs b/ShipEngineSDK/Models/Dto/CreateLabelFromRate/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/CreateLabelFromRate/Result.cs rename to ShipEngineSDK/Models/Dto/CreateLabelFromRate/Result.cs diff --git a/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Enums.cs b/ShipEngineSDK/Models/Dto/CreateLabelFromShipmentDetails/Enums.cs similarity index 100% rename from ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Enums.cs rename to ShipEngineSDK/Models/Dto/CreateLabelFromShipmentDetails/Enums.cs diff --git a/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs b/ShipEngineSDK/Models/Dto/CreateLabelFromShipmentDetails/Params.cs similarity index 100% rename from ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs rename to ShipEngineSDK/Models/Dto/CreateLabelFromShipmentDetails/Params.cs diff --git a/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Result.cs b/ShipEngineSDK/Models/Dto/CreateLabelFromShipmentDetails/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Result.cs rename to ShipEngineSDK/Models/Dto/CreateLabelFromShipmentDetails/Result.cs diff --git a/ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Enums.cs b/ShipEngineSDK/Models/Dto/GetRatesFromShipmentDetails/Enums.cs similarity index 100% rename from ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Enums.cs rename to ShipEngineSDK/Models/Dto/GetRatesFromShipmentDetails/Enums.cs diff --git a/ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Params.cs b/ShipEngineSDK/Models/Dto/GetRatesFromShipmentDetails/Params.cs similarity index 100% rename from ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Params.cs rename to ShipEngineSDK/Models/Dto/GetRatesFromShipmentDetails/Params.cs diff --git a/ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Result.cs b/ShipEngineSDK/Models/Dto/GetRatesFromShipmentDetails/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Result.cs rename to ShipEngineSDK/Models/Dto/GetRatesFromShipmentDetails/Result.cs diff --git a/ShipEngine/Models/Dto/ListCarriers/Result.cs b/ShipEngineSDK/Models/Dto/ListCarriers/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/ListCarriers/Result.cs rename to ShipEngineSDK/Models/Dto/ListCarriers/Result.cs diff --git a/ShipEngine/Models/Dto/Manifests/Params.cs b/ShipEngineSDK/Models/Dto/Manifests/Params.cs similarity index 100% rename from ShipEngine/Models/Dto/Manifests/Params.cs rename to ShipEngineSDK/Models/Dto/Manifests/Params.cs diff --git a/ShipEngine/Models/Dto/Manifests/Result.cs b/ShipEngineSDK/Models/Dto/Manifests/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/Manifests/Result.cs rename to ShipEngineSDK/Models/Dto/Manifests/Result.cs diff --git a/ShipEngine/Models/Dto/TrackUsingCarrierCodeAndTrackingNumber/Result.cs b/ShipEngineSDK/Models/Dto/TrackUsingCarrierCodeAndTrackingNumber/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/TrackUsingCarrierCodeAndTrackingNumber/Result.cs rename to ShipEngineSDK/Models/Dto/TrackUsingCarrierCodeAndTrackingNumber/Result.cs diff --git a/ShipEngine/Models/Dto/TrackUsingLabelId/Result.cs b/ShipEngineSDK/Models/Dto/TrackUsingLabelId/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/TrackUsingLabelId/Result.cs rename to ShipEngineSDK/Models/Dto/TrackUsingLabelId/Result.cs diff --git a/ShipEngine/Models/Dto/ValidateAddresses/Enums.cs b/ShipEngineSDK/Models/Dto/ValidateAddresses/Enums.cs similarity index 100% rename from ShipEngine/Models/Dto/ValidateAddresses/Enums.cs rename to ShipEngineSDK/Models/Dto/ValidateAddresses/Enums.cs diff --git a/ShipEngine/Models/Dto/ValidateAddresses/Result.cs b/ShipEngineSDK/Models/Dto/ValidateAddresses/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/ValidateAddresses/Result.cs rename to ShipEngineSDK/Models/Dto/ValidateAddresses/Result.cs diff --git a/ShipEngine/Models/Dto/VoidLabelWithLabelId/Result.cs b/ShipEngineSDK/Models/Dto/VoidLabelWithLabelId/Result.cs similarity index 100% rename from ShipEngine/Models/Dto/VoidLabelWithLabelId/Result.cs rename to ShipEngineSDK/Models/Dto/VoidLabelWithLabelId/Result.cs diff --git a/ShipEngine/Models/ShipEngineException.cs b/ShipEngineSDK/Models/ShipEngineException.cs similarity index 98% rename from ShipEngine/Models/ShipEngineException.cs rename to ShipEngineSDK/Models/ShipEngineException.cs index 5010393b..add250ee 100644 --- a/ShipEngine/Models/ShipEngineException.cs +++ b/ShipEngineSDK/Models/ShipEngineException.cs @@ -1,5 +1,6 @@ #pragma warning disable 1591 +using ShipEngineSDK.Enums; using System; using System.Net.Http; diff --git a/ShipEngineSDK/Multimap.cs b/ShipEngineSDK/Multimap.cs new file mode 100644 index 00000000..4500b438 --- /dev/null +++ b/ShipEngineSDK/Multimap.cs @@ -0,0 +1,293 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace ShipEngineSDK; + +/// +/// A dictionary in which one key has many associated values. +/// +/// The type of the key +/// The type of the value associated with the key. +internal class Multimap : IDictionary> +{ + #region Private Fields + + private readonly Dictionary> _dictionary; + + #endregion Private Fields + + #region Constructors + + /// + /// Empty Constructor. + /// + public Multimap() + { + _dictionary = new Dictionary>(); + } + + /// + /// Constructor with comparer. + /// + /// + public Multimap(IEqualityComparer comparer) + { + _dictionary = new Dictionary>(comparer); + } + + #endregion Constructors + + #region Enumerators + + /// + /// To get the enumerator. + /// + /// Enumerator + public IEnumerator>> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + /// + /// To get the enumerator. + /// + /// Enumerator + IEnumerator IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + #endregion Enumerators + + #region Public Members + /// + /// Add values to Multimap + /// + /// Key value pair + public void Add(KeyValuePair> item) + { + Add(item.Key, item.Value); + } + + /// + /// Add Multimap to Multimap + /// + /// Multimap + public void Add(Multimap multimap) + { + foreach (var item in multimap) + { + Add(item.Key, item.Value); + } + } + + /// + /// Clear Multimap + /// + public void Clear() + { + _dictionary.Clear(); + } + + /// + /// Determines whether Multimap contains the specified item. + /// + /// Key value pair + /// Method needs to be implemented + /// true if the Multimap contains the item; otherwise, false. + public bool Contains(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Copy items of the Multimap to an array, + /// starting at a particular array index. + /// + /// The array that is the destination of the items copied + /// from Multimap. The array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + /// Method needs to be implemented + public void CopyTo(KeyValuePair>[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + /// + /// Removes the specified item from the Multimap. + /// + /// Key value pair + /// true if the item is successfully removed; otherwise, false. + /// Method needs to be implemented + public bool Remove(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Gets the number of items contained in the Multimap. + /// + public int Count => _dictionary.Count; + + /// + /// Gets a value indicating whether the Multimap is read-only. + /// + public bool IsReadOnly => false; + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// 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 the value to Multimap. + public void Add(TKey key, IList? value) + { + if (value is not { Count: > 0 }) + { + return; + } + + if (_dictionary.TryGetValue(key, out var list)) + { + foreach (var k in value) + { + list.Add(k); + } + } + else + { + list = new List(value); + if (!TryAdd(key, list)) + { + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + } + + /// + /// Determines whether the Multimap contains an item with the specified key. + /// + /// The key to locate in the Multimap. + /// true if the Multimap contains an item with + /// the key; otherwise, false. + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + /// + /// Removes item with the specified key from the Multimap. + /// + /// The key to locate in the Multimap. + /// true if the item is successfully removed; otherwise, false. + public bool Remove(TKey key) + { + return TryRemove(key, out var _); + } + + /// + /// Gets the value associated with the specified key. + /// + /// The key whose value to get. + /// When this method returns, the value associated with the specified key, if the + /// key is found; otherwise, the default value for the type of the value parameter. + /// This parameter is passed uninitialized. + /// true if the object that implements Multimap contains + /// an item with the specified key; otherwise, false. + public bool TryGetValue(TKey key, out IList value) + { + return _dictionary.TryGetValue(key, out value); + } + + /// + /// Gets or sets the item with the specified key. + /// + /// The key of the item to get or set. + /// The value of the specified key. + public IList this[TKey key] + { + get => _dictionary[key]; + set => _dictionary[key] = value; + } + + /// + /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. + /// + public ICollection Keys => _dictionary.Keys; + + /// + /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. + /// + public ICollection> Values => _dictionary.Values; + + /// + /// Copy the items of the Multimap to an System.Array, + /// starting at a particular System.Array index. + /// + /// The one-dimensional System.Array that is the destination of the items copied + /// from Multimap. The System.Array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + public void CopyTo(Array array, int index) + { + ((ICollection)_dictionary).CopyTo(array, index); + } + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// 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) + { + if (value == null) + { + return; + } + + if (_dictionary.TryGetValue(key, out var list)) + { + list.Add(value); + } + else + { + list = new List { value }; + if (!TryAdd(key, list)) + { + throw new InvalidOperationException("Could not add value to Multimap."); + } + } + } + + #endregion Public Members + + #region Private Members + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryRemove(TKey key, out IList value) + { + _dictionary.TryGetValue(key, out value); + return _dictionary.Remove(key); + } + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryAdd(TKey key, IList value) + { + try + { + _dictionary.Add(key, value); + } + catch (ArgumentException) + { + return false; + } + + return true; + } + #endregion Private Members +} \ No newline at end of file diff --git a/ShipEngine/PublicAPI.Shipped.txt b/ShipEngineSDK/PublicAPI.Shipped.txt similarity index 100% rename from ShipEngine/PublicAPI.Shipped.txt rename to ShipEngineSDK/PublicAPI.Shipped.txt diff --git a/ShipEngineSDK/PublicAPI.Unshipped.txt b/ShipEngineSDK/PublicAPI.Unshipped.txt new file mode 100644 index 00000000..c5d7f171 --- /dev/null +++ b/ShipEngineSDK/PublicAPI.Unshipped.txt @@ -0,0 +1,6160 @@ +abstract ShipEngineSDK.Model.AbstractOpenAPISchema.ActualInstance.get -> object! +abstract ShipEngineSDK.Model.AbstractOpenAPISchema.ActualInstance.set -> void +abstract ShipEngineSDK.Model.AbstractOpenAPISchema.ToJson() -> string! +const ShipEngineSDK.Client.ClientUtils.DateTimeFormat = "o" -> 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.Model.AccountSettings.ToString() -> string! +override ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum.ToString() -> string! +override ShipEngineSDK.Model.AccountSettingsImages.ToString() -> string! +override ShipEngineSDK.Model.AddFundsToCarrierRequestBody.ToString() -> string! +override ShipEngineSDK.Model.AddFundsToCarrierResponseBody.ToString() -> string! +override ShipEngineSDK.Model.AddFundsToInsuranceRequestBody.ToString() -> string! +override ShipEngineSDK.Model.AddFundsToInsuranceResponseBody.ToString() -> string! +override ShipEngineSDK.Model.Address.ToString() -> string! +override ShipEngineSDK.Model.AddressResidentialIndicator.ToString() -> string! +override ShipEngineSDK.Model.AddressToValidate.ToString() -> string! +override ShipEngineSDK.Model.AddressValidatingShipment.ToString() -> string! +override ShipEngineSDK.Model.AddressValidationCode.ToString() -> string! +override ShipEngineSDK.Model.AddressValidationDetailCode.ToString() -> string! +override ShipEngineSDK.Model.AddressValidationMessageType.ToString() -> string! +override ShipEngineSDK.Model.AddressValidationResult.ToString() -> string! +override ShipEngineSDK.Model.AddressValidationStatus.ToString() -> string! +override ShipEngineSDK.Model.AddToBatchRequestBody.ToString() -> string! +override ShipEngineSDK.Model.AdvancedShipmentOptions.ToString() -> string! +override ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact.ToString() -> string! +override ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight.ToString() -> string! +override ShipEngineSDK.Model.AllowedIncoterms.ToString() -> string! +override ShipEngineSDK.Model.AlternativeIdentifier.ToString() -> string! +override ShipEngineSDK.Model.AlternativeIdentifiers.ToString() -> string! +override ShipEngineSDK.Model.AncillaryServiceEndorsement.ToString() -> string! +override ShipEngineSDK.Model.Batch.ToString() -> string! +override ShipEngineSDK.Model.BatchesSortBy.ToString() -> string! +override ShipEngineSDK.Model.BatchResponseError.ToString() -> string! +override ShipEngineSDK.Model.BatchStatus.ToString() -> string! +override ShipEngineSDK.Model.BillToParty.ToString() -> string! +override ShipEngineSDK.Model.BulkRate.ToString() -> string! +override ShipEngineSDK.Model.CalculateRatesRequestBody.ActualInstance.get -> object! +override ShipEngineSDK.Model.CalculateRatesRequestBody.ActualInstance.set -> void +override ShipEngineSDK.Model.CalculateRatesRequestBody.ToJson() -> string! +override ShipEngineSDK.Model.CalculateRatesRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CalculateRatesRequestBodyJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.CalculateRatesRequestBodyJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.CalculateRatesRequestBody! +override ShipEngineSDK.Model.CalculateRatesRequestBodyJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.CalculateRatesRequestBody! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.CalculateRatesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.Carrier.ToString() -> string! +override ShipEngineSDK.Model.CarrierAdvancedOption.ToString() -> string! +override ShipEngineSDK.Model.CarrierName.ToString() -> string! +override ShipEngineSDK.Model.CarrierNameWithSettings.ToString() -> string! +override ShipEngineSDK.Model.CollectOnDelivery.ToString() -> string! +override ShipEngineSDK.Model.CollectOnDeliveryPaymentType.ToString() -> string! +override ShipEngineSDK.Model.CompareBulkRatesRequestBody.ActualInstance.get -> object! +override ShipEngineSDK.Model.CompareBulkRatesRequestBody.ActualInstance.set -> void +override ShipEngineSDK.Model.CompareBulkRatesRequestBody.ToJson() -> string! +override ShipEngineSDK.Model.CompareBulkRatesRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CompareBulkRatesRequestBodyJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.CompareBulkRatesRequestBodyJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.CompareBulkRatesRequestBody! +override ShipEngineSDK.Model.CompareBulkRatesRequestBodyJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.CompareBulkRatesRequestBody! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectAmazonShippingUk.ToString() -> string! +override ShipEngineSDK.Model.ConnectApcRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectAsendiaRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectCarrierRequestBody.ActualInstance.get -> object! +override ShipEngineSDK.Model.ConnectCarrierRequestBody.ActualInstance.set -> void +override ShipEngineSDK.Model.ConnectCarrierRequestBody.ToJson() -> string! +override ShipEngineSDK.Model.ConnectCarrierRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectCarrierRequestBodyJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.ConnectCarrierRequestBodyJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.ConnectCarrierRequestBody! +override ShipEngineSDK.Model.ConnectCarrierRequestBodyJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.ConnectCarrierRequestBody! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.ConnectCarrierResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectDhlExpressRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectDpdRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectEndiciaRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectFedexRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectFedexUkRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectFirstmileRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectImexRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectInsurerRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectLasershipRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectNewgisticsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectOntracRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectPurolatorRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectRoyalMailRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectSekoRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectSendleRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectStampsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ConnectUpsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ContactDetails.ToString() -> string! +override ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum.ToString() -> string! +override ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.ToString() -> string! +override ShipEngineSDK.Model.CreateAndValidateShipment.ToString() -> string! +override ShipEngineSDK.Model.CreateBatchRequest.ActualInstance.get -> object! +override ShipEngineSDK.Model.CreateBatchRequest.ActualInstance.set -> void +override ShipEngineSDK.Model.CreateBatchRequest.ToJson() -> string! +override ShipEngineSDK.Model.CreateBatchRequest.ToString() -> string! +override ShipEngineSDK.Model.CreateBatchRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateBatchRequestJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.CreateBatchRequestJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.CreateBatchRequest! +override ShipEngineSDK.Model.CreateBatchRequestJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.CreateBatchRequest! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.CreateBatchResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateLabelFromRateRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateLabelRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateLabelResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateManifestByObjectRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateManifestRequestBody.ActualInstance.get -> object! +override ShipEngineSDK.Model.CreateManifestRequestBody.ActualInstance.set -> void +override ShipEngineSDK.Model.CreateManifestRequestBody.ToJson() -> string! +override ShipEngineSDK.Model.CreateManifestRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateManifestRequestBodyJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.CreateManifestRequestBodyJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.CreateManifestRequestBody! +override ShipEngineSDK.Model.CreateManifestRequestBodyJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.CreateManifestRequestBody! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.CreateManifestResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreatePackageTypeRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreatePackageTypeResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateReturnLabelRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateReturnLabelResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateShipmentResponseBodyFields.ToString() -> string! +override ShipEngineSDK.Model.CreateShipmentsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateShipmentsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateTagResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateWarehouseRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateWarehouseResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CreateWebhookRequestBody.ToString() -> string! +override ShipEngineSDK.Model.CreateWebhookResponseBody.ToString() -> string! +override ShipEngineSDK.Model.CustomsItem.ToString() -> string! +override ShipEngineSDK.Model.DangerousAmount.ToString() -> string! +override ShipEngineSDK.Model.DangerousGoods.ToString() -> string! +override ShipEngineSDK.Model.DefaultLabelLayout.ToString() -> string! +override ShipEngineSDK.Model.DeletePickupByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.DeleteScheduledPickupResponseBody.ToString() -> string! +override ShipEngineSDK.Model.DeliveryConfirmation.ToString() -> string! +override ShipEngineSDK.Model.DeprecatedManifest.ToString() -> string! +override ShipEngineSDK.Model.DhlExpressAccountSettings.ToString() -> string! +override ShipEngineSDK.Model.DhlExpressSettingsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.Dimensions.ToString() -> string! +override ShipEngineSDK.Model.DimensionUnit.ToString() -> string! +override ShipEngineSDK.Model.DisplayScheme.ToString() -> string! +override ShipEngineSDK.Model.Error.ToString() -> string! +override ShipEngineSDK.Model.ErrorCode.ToString() -> string! +override ShipEngineSDK.Model.ErrorResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ErrorSource.ToString() -> string! +override ShipEngineSDK.Model.ErrorType.ToString() -> string! +override ShipEngineSDK.Model.ErrorWithLabelIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.EstimateRatesRequestBody.ActualInstance.get -> object! +override ShipEngineSDK.Model.EstimateRatesRequestBody.ActualInstance.set -> void +override ShipEngineSDK.Model.EstimateRatesRequestBody.ToJson() -> string! +override ShipEngineSDK.Model.EstimateRatesRequestBody.ToString() -> string! +override ShipEngineSDK.Model.EstimateRatesRequestBodyJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.EstimateRatesRequestBodyJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.EstimateRatesRequestBody! +override ShipEngineSDK.Model.EstimateRatesRequestBodyJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.EstimateRatesRequestBody! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.FedexAccountSettings.ToString() -> string! +override ShipEngineSDK.Model.FedexAccountSettingsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.FedexPickupType.ToString() -> string! +override ShipEngineSDK.Model.FedexSettingsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum.ToString() -> string! +override ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetAccountSettingsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetBatchByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetCarrierByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetCarrierOptionsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetCarrierSettingsResponseBody.ActualInstance.get -> object! +override ShipEngineSDK.Model.GetCarrierSettingsResponseBody.ActualInstance.set -> void +override ShipEngineSDK.Model.GetCarrierSettingsResponseBody.ToJson() -> string! +override ShipEngineSDK.Model.GetCarrierSettingsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetCarrierSettingsResponseBodyJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.GetCarrierSettingsResponseBodyJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.GetCarrierSettingsResponseBody! +override ShipEngineSDK.Model.GetCarrierSettingsResponseBodyJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.GetCarrierSettingsResponseBody! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.GetCarriersResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetInsuranceBalanceResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetLabelByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetManifestByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetPickupByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetPickupsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetRateByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointsRequest.ActualInstance.get -> object! +override ShipEngineSDK.Model.GetServicePointsRequest.ActualInstance.set -> void +override ShipEngineSDK.Model.GetServicePointsRequest.ToJson() -> string! +override ShipEngineSDK.Model.GetServicePointsRequest.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointsRequestBodyShipment.ToString() -> string! +override ShipEngineSDK.Model.GetServicePointsRequestJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.GetServicePointsRequestJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.GetServicePointsRequest! +override ShipEngineSDK.Model.GetServicePointsRequestJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.GetServicePointsRequest! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetShipmentByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetTrackingLogResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetWarehouseByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.GetWebhookByIdResponseBody.ToString() -> string! +override ShipEngineSDK.Model.IdentifierType.ToString() -> string! +override ShipEngineSDK.Model.ImporterOfRecords.ToString() -> string! +override ShipEngineSDK.Model.InsuranceProvider.ToString() -> string! +override ShipEngineSDK.Model.InternationalShipmentOptions.ToString() -> string! +override ShipEngineSDK.Model.InvoiceAdditionalDetails.ToString() -> string! +override ShipEngineSDK.Model.Label.ToString() -> string! +override ShipEngineSDK.Model.LabelChargeEvent.ToString() -> string! +override ShipEngineSDK.Model.LabelDownload.ToString() -> string! +override ShipEngineSDK.Model.LabelDownloadType.ToString() -> string! +override ShipEngineSDK.Model.LabelFormat.ToString() -> string! +override ShipEngineSDK.Model.LabelLayout.ToString() -> string! +override ShipEngineSDK.Model.LabelMessages.ToString() -> string! +override ShipEngineSDK.Model.LabelPackagesInner.ToString() -> string! +override ShipEngineSDK.Model.LabelStatus.ToString() -> string! +override ShipEngineSDK.Model.Link.ToString() -> string! +override ShipEngineSDK.Model.ListAccountImagesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListAccountSettingsBody.ToString() -> string! +override ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListBatchErrorsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListBatchesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListCarrierPackageTypesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListCarrierServicesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListCarriersResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListLabelsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListManifestsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListPackageTypesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListPickupResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListServicePointsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum.ToString() -> string! +override ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.ToString() -> string! +override ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum.ToString() -> string! +override ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.ToString() -> string! +override ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.ToString() -> string! +override ShipEngineSDK.Model.ListShipmentRatesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListShipmentsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListTagsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ListWarehousesResponseBody.ToString() -> string! +override ShipEngineSDK.Model.Manifest.ToString() -> string! +override ShipEngineSDK.Model.ManifestDownload.ToString() -> string! +override ShipEngineSDK.Model.ManifestRequest.ToString() -> string! +override ShipEngineSDK.Model.ManifestRequestStatus.ToString() -> string! +override ShipEngineSDK.Model.Manifests.ToString() -> string! +override ShipEngineSDK.Model.ManifestsRequests.ToString() -> string! +override ShipEngineSDK.Model.ModifyBatch.ToString() -> string! +override ShipEngineSDK.Model.MonetaryValue.ToString() -> string! +override ShipEngineSDK.Model.NonDelivery.ToString() -> string! +override ShipEngineSDK.Model.OptionalLink.ToString() -> string! +override ShipEngineSDK.Model.OrderSourceName.ToString() -> string! +override ShipEngineSDK.Model.OriginType.ToString() -> string! +override ShipEngineSDK.Model.Package.ToString() -> string! +override ShipEngineSDK.Model.PackageContents.ToString() -> string! +override ShipEngineSDK.Model.PackageType.ToString() -> string! +override ShipEngineSDK.Model.PackagingGroup.ToString() -> string! +override ShipEngineSDK.Model.PackagingInstructionSection.ToString() -> string! +override ShipEngineSDK.Model.PagedListResponseBody.ToString() -> string! +override ShipEngineSDK.Model.PaginationLink.ToString() -> string! +override ShipEngineSDK.Model.PaperlessDownload.ToString() -> string! +override ShipEngineSDK.Model.ParseAddressRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ParseAddressResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ParseShipmentRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ParseShipmentResponseBody.ToString() -> string! +override ShipEngineSDK.Model.PartialAddress.ToString() -> string! +override ShipEngineSDK.Model.PartialShipment.ToString() -> string! +override ShipEngineSDK.Model.PartialShippingAddress.ToString() -> string! +override ShipEngineSDK.Model.PartialShippingAddressTo.ToString() -> string! +override ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.ToString() -> string! +override ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.TypeEnum.ToString() -> string! +override ShipEngineSDK.Model.PaymentAmount.ToString() -> string! +override ShipEngineSDK.Model.Pickup.ToString() -> string! +override ShipEngineSDK.Model.PickupResponseBody.ToString() -> string! +override ShipEngineSDK.Model.PickupWindow.ToString() -> string! +override ShipEngineSDK.Model.PickupWindows.ToString() -> string! +override ShipEngineSDK.Model.ProcessBatchRequestBody.ToString() -> string! +override ShipEngineSDK.Model.Products.ToString() -> string! +override ShipEngineSDK.Model.PurchaseLabelWithoutShipment.ToString() -> string! +override ShipEngineSDK.Model.Rate.ToString() -> string! +override ShipEngineSDK.Model.RateEstimate.ToString() -> string! +override ShipEngineSDK.Model.RateEstimateByCarrierId.ToString() -> string! +override ShipEngineSDK.Model.RateEstimateByCarrierIds.ToString() -> string! +override ShipEngineSDK.Model.RateEstimateOptions.ToString() -> string! +override ShipEngineSDK.Model.RateRequestBody.ToString() -> string! +override ShipEngineSDK.Model.RateRequestByShipmentIds.ToString() -> string! +override ShipEngineSDK.Model.RateRequestByShipments.ToString() -> string! +override ShipEngineSDK.Model.RateRequestOptions.ToString() -> string! +override ShipEngineSDK.Model.RateRequestRateOptions.ToString() -> string! +override ShipEngineSDK.Model.RateResponse.ToString() -> string! +override ShipEngineSDK.Model.RateResponseStatus.ToString() -> string! +override ShipEngineSDK.Model.RatesInformation.ToString() -> string! +override ShipEngineSDK.Model.RateType.ToString() -> string! +override ShipEngineSDK.Model.ReasonCode.ToString() -> string! +override ShipEngineSDK.Model.RecognizedEntity.ToString() -> string! +override ShipEngineSDK.Model.Redirect.ToString() -> string! +override ShipEngineSDK.Model.RegulationLevel.ToString() -> string! +override ShipEngineSDK.Model.RemoveFromBatchRequestBody.ToString() -> string! +override ShipEngineSDK.Model.ResponseMessage.ToString() -> string! +override ShipEngineSDK.Model.SchedulePickupRequestBody.ToString() -> string! +override ShipEngineSDK.Model.SchedulePickupResponseBody.ToString() -> string! +override ShipEngineSDK.Model.Service.ToString() -> string! +override ShipEngineSDK.Model.Shipment.ToString() -> string! +override ShipEngineSDK.Model.ShipmentIdRequest.ToString() -> string! +override ShipEngineSDK.Model.ShipmentItem.ToString() -> string! +override ShipEngineSDK.Model.ShipmentRequest.ToString() -> string! +override ShipEngineSDK.Model.ShipmentsSortBy.ToString() -> string! +override ShipEngineSDK.Model.ShipmentStatus.ToString() -> string! +override ShipEngineSDK.Model.ShippingAddress.ToString() -> string! +override ShipEngineSDK.Model.ShippingAddressTo.ToString() -> string! +override ShipEngineSDK.Model.SmartPostHub.ToString() -> string! +override ShipEngineSDK.Model.SortDir.ToString() -> string! +override ShipEngineSDK.Model.StatusCode.ToString() -> string! +override ShipEngineSDK.Model.Tag.ToString() -> string! +override ShipEngineSDK.Model.TagShipmentResponseBody.ToString() -> string! +override ShipEngineSDK.Model.TaxableEntityType.ToString() -> string! +override ShipEngineSDK.Model.TaxIdentifier.ToString() -> string! +override ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml.ToString() -> string! +override ShipEngineSDK.Model.TrackEvent.ToString() -> string! +override ShipEngineSDK.Model.TrackingInformation.ToString() -> string! +override ShipEngineSDK.Model.TrackingStatus.ToString() -> string! +override ShipEngineSDK.Model.TransportMean.ToString() -> string! +override ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum.ToString() -> string! +override ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.ActualInstance.get -> object! +override ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.ActualInstance.set -> void +override ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.ToJson() -> string! +override ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateCarrierSettingsRequestBodyJsonConverter.CanConvert(System.Type! objectType) -> bool +override ShipEngineSDK.Model.UpdateCarrierSettingsRequestBodyJsonConverter.Read(ref System.Text.Json.Utf8JsonReader reader, System.Type! typeToConvert, System.Text.Json.JsonSerializerOptions! options) -> ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! +override ShipEngineSDK.Model.UpdateCarrierSettingsRequestBodyJsonConverter.Write(System.Text.Json.Utf8JsonWriter! writer, ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody! value, System.Text.Json.JsonSerializerOptions! options) -> void +override ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdatePackageTypeRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateShipmentFields.ToString() -> string! +override ShipEngineSDK.Model.UpdateShipmentRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateShipmentResponseBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateShipmentsTags.ToString() -> string! +override ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner.ToString() -> string! +override ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateWarehouseRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpdateWebhookRequestBody.ToString() -> string! +override ShipEngineSDK.Model.UpsAccountSettings.ToString() -> string! +override ShipEngineSDK.Model.UpsInvoice.ToString() -> string! +override ShipEngineSDK.Model.UpsPickupType.ToString() -> string! +override ShipEngineSDK.Model.UpsSettingsResponseBody.ToString() -> string! +override ShipEngineSDK.Model.ValidateAddress.ToString() -> string! +override ShipEngineSDK.Model.ValidateShipmentFields.ToString() -> string! +override ShipEngineSDK.Model.ValidationStatus.ToString() -> string! +override ShipEngineSDK.Model.VoidLabelResponseBody.ToString() -> string! +override ShipEngineSDK.Model.Warehouse.ToString() -> string! +override ShipEngineSDK.Model.Webhook.ToString() -> string! +override ShipEngineSDK.Model.WebhookEvent.ToString() -> string! +override ShipEngineSDK.Model.WebhookHeader.ToString() -> string! +override ShipEngineSDK.Model.Weight.ToString() -> string! +override ShipEngineSDK.Model.WeightUnit.ToString() -> string! +ShipEngineSDK.Client.ClientUtils +ShipEngineSDK.Client.Multimap +ShipEngineSDK.Client.Multimap.Add(ShipEngineSDK.Client.Multimap! multimap) -> void +ShipEngineSDK.Client.Multimap.Add(System.Collections.Generic.KeyValuePair!> item) -> void +ShipEngineSDK.Client.Multimap.Add(TKey key, System.Collections.Generic.IList! value) -> void +ShipEngineSDK.Client.Multimap.Add(TKey key, TValue value) -> void +ShipEngineSDK.Client.Multimap.Clear() -> void +ShipEngineSDK.Client.Multimap.Contains(System.Collections.Generic.KeyValuePair!> item) -> bool +ShipEngineSDK.Client.Multimap.ContainsKey(TKey key) -> bool +ShipEngineSDK.Client.Multimap.CopyTo(System.Array! array, int index) -> void +ShipEngineSDK.Client.Multimap.CopyTo(System.Collections.Generic.KeyValuePair!>[]! array, int arrayIndex) -> void +ShipEngineSDK.Client.Multimap.Count.get -> int +ShipEngineSDK.Client.Multimap.GetEnumerator() -> System.Collections.Generic.IEnumerator!>>! +ShipEngineSDK.Client.Multimap.IsReadOnly.get -> bool +ShipEngineSDK.Client.Multimap.Keys.get -> System.Collections.Generic.ICollection! +ShipEngineSDK.Client.Multimap.Multimap() -> void +ShipEngineSDK.Client.Multimap.Multimap(System.Collections.Generic.IEqualityComparer! comparer) -> void +ShipEngineSDK.Client.Multimap.Remove(System.Collections.Generic.KeyValuePair!> item) -> bool +ShipEngineSDK.Client.Multimap.Remove(TKey key) -> bool +ShipEngineSDK.Client.Multimap.this[TKey key].get -> System.Collections.Generic.IList! +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.Error.ErrorCode.get -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Common.Error.ErrorSource.get -> ShipEngineSDK.Enums.ErrorSource +ShipEngineSDK.Common.Error.ErrorType.get -> ShipEngineSDK.Enums.ErrorType +ShipEngineSDK.DateJsonConverter +ShipEngineSDK.DateJsonConverter.DateJsonConverter() -> void +ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.AutoFundNotSupported = 0 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.BatchCannotBeModified = 1 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.CarrierConflict = 2 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.CarrierInsuranceNotSupported = 3 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.CarrierNotConnected = 4 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.CarrierNotSupported = 5 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.ConfirmationNotSupported = 6 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.CustomsItemsRequired = 7 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.FieldConflict = 8 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.FieldValueRequired = 9 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.Forbidden = 10 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.IdentifierConflict = 11 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.IdentifiersMustMatch = 12 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.IncompatiblePairedLabels = 13 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidAddress = 14 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidBillingPlan = 15 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidChargeEvent = 16 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidDate = 17 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidFieldValue = 18 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidIdentifier = 19 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidStatus = 20 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.InvalidStringLength = 21 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.LabelImagesNotSupported = 22 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.MeterFailure = 23 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.NoRatesReturned = 25 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.NotFound = 24 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.RateLimitExceeded = 26 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.RequestBodyRequired = 27 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.ReturnLabelNotSupported = 28 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.SubscriptionInactive = 29 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.TermsNotAccepted = 30 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.Timeout = 31 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.TrackingNotSupported = 32 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.TrialExpired = 33 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.Unauthorized = 34 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.Unspecified = 35 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.VerificationFailure = 36 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.WarehouseConflict = 37 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorCode.WebhookEventTypeConflict = 38 -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.Enums.ErrorSource +ShipEngineSDK.Enums.ErrorSource.Carrier = 1 -> ShipEngineSDK.Enums.ErrorSource +ShipEngineSDK.Enums.ErrorSource.OrderSource = 2 -> ShipEngineSDK.Enums.ErrorSource +ShipEngineSDK.Enums.ErrorSource.Shipengine = 0 -> ShipEngineSDK.Enums.ErrorSource +ShipEngineSDK.Enums.ErrorType +ShipEngineSDK.Enums.ErrorType.AccountStatus = 0 -> ShipEngineSDK.Enums.ErrorType +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.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.IsNullable.get -> bool +ShipEngineSDK.Model.AbstractOpenAPISchema.IsNullable.set -> void +ShipEngineSDK.Model.AbstractOpenAPISchema.SchemaType.get -> string! +ShipEngineSDK.Model.AbstractOpenAPISchema.SchemaType.set -> void +ShipEngineSDK.Model.AccountSettings +ShipEngineSDK.Model.AccountSettings.AccountSettings() -> void +ShipEngineSDK.Model.AccountSettings.DefaultLabelLayout.get -> ShipEngineSDK.Model.DefaultLabelLayout? +ShipEngineSDK.Model.AccountSettings.DefaultLabelLayout.set -> void +ShipEngineSDK.Model.AccountSettingsImages +ShipEngineSDK.Model.AccountSettingsImages.AccountSettingsImages() -> void +ShipEngineSDK.Model.AccountSettingsImages.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.AccountSettingsImages.CreatedAt.set -> void +ShipEngineSDK.Model.AccountSettingsImages.ImageContentType.get -> ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum? +ShipEngineSDK.Model.AccountSettingsImages.ImageContentType.set -> void +ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum +ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum.ImageContentTypeEnum(string! value) -> void +ShipEngineSDK.Model.AccountSettingsImages.ImageData.get -> string! +ShipEngineSDK.Model.AccountSettingsImages.ImageData.set -> void +ShipEngineSDK.Model.AccountSettingsImages.IsDefault.get -> bool +ShipEngineSDK.Model.AccountSettingsImages.IsDefault.set -> void +ShipEngineSDK.Model.AccountSettingsImages.LabelImageId.get -> string! +ShipEngineSDK.Model.AccountSettingsImages.LabelImageId.set -> void +ShipEngineSDK.Model.AccountSettingsImages.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.AccountSettingsImages.ModifiedAt.set -> void +ShipEngineSDK.Model.AccountSettingsImages.Name.get -> string! +ShipEngineSDK.Model.AccountSettingsImages.Name.set -> void +ShipEngineSDK.Model.AddFundsToCarrierRequestBody +ShipEngineSDK.Model.AddFundsToCarrierRequestBody.AddFundsToCarrierRequestBody() -> void +ShipEngineSDK.Model.AddFundsToCarrierRequestBody.Amount.get -> double +ShipEngineSDK.Model.AddFundsToCarrierRequestBody.Amount.set -> void +ShipEngineSDK.Model.AddFundsToCarrierRequestBody.Currency.get -> string! +ShipEngineSDK.Model.AddFundsToCarrierRequestBody.Currency.set -> void +ShipEngineSDK.Model.AddFundsToCarrierResponseBody +ShipEngineSDK.Model.AddFundsToCarrierResponseBody.AddFundsToCarrierResponseBody() -> void +ShipEngineSDK.Model.AddFundsToCarrierResponseBody.Balance.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.AddFundsToCarrierResponseBody.Balance.set -> void +ShipEngineSDK.Model.AddFundsToInsuranceRequestBody +ShipEngineSDK.Model.AddFundsToInsuranceRequestBody.AddFundsToInsuranceRequestBody() -> void +ShipEngineSDK.Model.AddFundsToInsuranceRequestBody.Amount.get -> double +ShipEngineSDK.Model.AddFundsToInsuranceRequestBody.Amount.set -> void +ShipEngineSDK.Model.AddFundsToInsuranceRequestBody.Currency.get -> string! +ShipEngineSDK.Model.AddFundsToInsuranceRequestBody.Currency.set -> void +ShipEngineSDK.Model.AddFundsToInsuranceResponseBody +ShipEngineSDK.Model.AddFundsToInsuranceResponseBody.AddFundsToInsuranceResponseBody() -> void +ShipEngineSDK.Model.AddFundsToInsuranceResponseBody.Amount.get -> double +ShipEngineSDK.Model.AddFundsToInsuranceResponseBody.Amount.set -> void +ShipEngineSDK.Model.AddFundsToInsuranceResponseBody.Currency.get -> string! +ShipEngineSDK.Model.AddFundsToInsuranceResponseBody.Currency.set -> void +ShipEngineSDK.Model.Address +ShipEngineSDK.Model.Address.Address() -> void +ShipEngineSDK.Model.Address.AddressLine1.get -> string! +ShipEngineSDK.Model.Address.AddressLine1.set -> void +ShipEngineSDK.Model.Address.AddressLine2.get -> string! +ShipEngineSDK.Model.Address.AddressLine2.set -> void +ShipEngineSDK.Model.Address.AddressLine3.get -> string! +ShipEngineSDK.Model.Address.AddressLine3.set -> void +ShipEngineSDK.Model.Address.AddressResidentialIndicator.get -> ShipEngineSDK.Model.AddressResidentialIndicator! +ShipEngineSDK.Model.Address.AddressResidentialIndicator.set -> void +ShipEngineSDK.Model.Address.CityLocality.get -> string! +ShipEngineSDK.Model.Address.CityLocality.set -> void +ShipEngineSDK.Model.Address.CompanyName.get -> string! +ShipEngineSDK.Model.Address.CompanyName.set -> void +ShipEngineSDK.Model.Address.CountryCode.get -> string! +ShipEngineSDK.Model.Address.CountryCode.set -> void +ShipEngineSDK.Model.Address.Email.get -> string! +ShipEngineSDK.Model.Address.Email.set -> void +ShipEngineSDK.Model.Address.Name.get -> string! +ShipEngineSDK.Model.Address.Name.set -> void +ShipEngineSDK.Model.Address.Phone.get -> string! +ShipEngineSDK.Model.Address.Phone.set -> void +ShipEngineSDK.Model.Address.PostalCode.get -> string! +ShipEngineSDK.Model.Address.PostalCode.set -> void +ShipEngineSDK.Model.Address.StateProvince.get -> string! +ShipEngineSDK.Model.Address.StateProvince.set -> void +ShipEngineSDK.Model.AddressResidentialIndicator +ShipEngineSDK.Model.AddressResidentialIndicator.AddressResidentialIndicator(string! value) -> void +ShipEngineSDK.Model.AddressToValidate +ShipEngineSDK.Model.AddressToValidate.AddressLine1.get -> string! +ShipEngineSDK.Model.AddressToValidate.AddressLine1.set -> void +ShipEngineSDK.Model.AddressToValidate.AddressLine2.get -> string! +ShipEngineSDK.Model.AddressToValidate.AddressLine2.set -> void +ShipEngineSDK.Model.AddressToValidate.AddressLine3.get -> string! +ShipEngineSDK.Model.AddressToValidate.AddressLine3.set -> void +ShipEngineSDK.Model.AddressToValidate.AddressResidentialIndicator.get -> ShipEngineSDK.Model.AddressResidentialIndicator? +ShipEngineSDK.Model.AddressToValidate.AddressResidentialIndicator.set -> void +ShipEngineSDK.Model.AddressToValidate.AddressToValidate() -> void +ShipEngineSDK.Model.AddressToValidate.CityLocality.get -> string! +ShipEngineSDK.Model.AddressToValidate.CityLocality.set -> void +ShipEngineSDK.Model.AddressToValidate.CompanyName.get -> string! +ShipEngineSDK.Model.AddressToValidate.CompanyName.set -> void +ShipEngineSDK.Model.AddressToValidate.CountryCode.get -> string! +ShipEngineSDK.Model.AddressToValidate.CountryCode.set -> void +ShipEngineSDK.Model.AddressToValidate.Email.get -> string! +ShipEngineSDK.Model.AddressToValidate.Email.set -> void +ShipEngineSDK.Model.AddressToValidate.Name.get -> string! +ShipEngineSDK.Model.AddressToValidate.Name.set -> void +ShipEngineSDK.Model.AddressToValidate.Phone.get -> string! +ShipEngineSDK.Model.AddressToValidate.Phone.set -> void +ShipEngineSDK.Model.AddressToValidate.PostalCode.get -> string! +ShipEngineSDK.Model.AddressToValidate.PostalCode.set -> void +ShipEngineSDK.Model.AddressToValidate.StateProvince.get -> string! +ShipEngineSDK.Model.AddressToValidate.StateProvince.set -> void +ShipEngineSDK.Model.AddressValidatingShipment +ShipEngineSDK.Model.AddressValidatingShipment.AddressValidatingShipment() -> void +ShipEngineSDK.Model.AddressValidatingShipment.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.AddressValidatingShipment.AdvancedOptions.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.CarrierId.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.CarrierId.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ComparisonRateType.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.ComparisonRateType.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation? +ShipEngineSDK.Model.AddressValidatingShipment.Confirmation.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.AddressValidatingShipment.CreatedAt.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.AddressValidatingShipment.Customs.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ExternalOrderId.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.ExternalOrderId.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.ExternalShipmentId.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider? +ShipEngineSDK.Model.AddressValidatingShipment.InsuranceProvider.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.IsReturn.get -> bool? +ShipEngineSDK.Model.AddressValidatingShipment.IsReturn.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AddressValidatingShipment.Items.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.AddressValidatingShipment.ModifiedAt.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.AddressValidatingShipment.OrderSourceCode.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AddressValidatingShipment.Packages.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.AddressValidatingShipment.ReturnTo.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ServiceCode.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.ServiceCode.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.AddressValidatingShipment.ShipDate.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.AddressValidatingShipment.ShipFrom.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ShipmentId.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.ShipmentId.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ShipmentNumber.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.ShipmentNumber.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus? +ShipEngineSDK.Model.AddressValidatingShipment.ShipmentStatus.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ShippingRuleId.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.ShippingRuleId.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.AddressValidatingShipment.ShipTo.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AddressValidatingShipment.Tags.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AddressValidatingShipment.TaxIdentifiers.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.AddressValidatingShipment.TotalWeight.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.AddressValidatingShipment.ValidateAddress.set -> void +ShipEngineSDK.Model.AddressValidatingShipment.WarehouseId.get -> string! +ShipEngineSDK.Model.AddressValidatingShipment.WarehouseId.set -> void +ShipEngineSDK.Model.AddressValidationCode +ShipEngineSDK.Model.AddressValidationCode.AddressValidationCode(string! value) -> void +ShipEngineSDK.Model.AddressValidationDetailCode +ShipEngineSDK.Model.AddressValidationDetailCode.AddressValidationDetailCode(string! value) -> void +ShipEngineSDK.Model.AddressValidationMessageType +ShipEngineSDK.Model.AddressValidationMessageType.AddressValidationMessageType(string! value) -> void +ShipEngineSDK.Model.AddressValidationResult +ShipEngineSDK.Model.AddressValidationResult.AddressValidationResult() -> void +ShipEngineSDK.Model.AddressValidationResult.MatchedAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.AddressValidationResult.MatchedAddress.set -> void +ShipEngineSDK.Model.AddressValidationResult.Messages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AddressValidationResult.Messages.set -> void +ShipEngineSDK.Model.AddressValidationResult.OriginalAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.AddressValidationResult.OriginalAddress.set -> void +ShipEngineSDK.Model.AddressValidationResult.Status.get -> ShipEngineSDK.Model.AddressValidationStatus! +ShipEngineSDK.Model.AddressValidationResult.Status.set -> void +ShipEngineSDK.Model.AddressValidationStatus +ShipEngineSDK.Model.AddressValidationStatus.AddressValidationStatus(string! value) -> void +ShipEngineSDK.Model.AddToBatchRequestBody +ShipEngineSDK.Model.AddToBatchRequestBody.AddToBatchRequestBody() -> void +ShipEngineSDK.Model.AddToBatchRequestBody.RateIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AddToBatchRequestBody.RateIds.set -> void +ShipEngineSDK.Model.AddToBatchRequestBody.ShipmentIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AddToBatchRequestBody.ShipmentIds.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions +ShipEngineSDK.Model.AdvancedShipmentOptions.AdditionalHandling.get -> bool? +ShipEngineSDK.Model.AdvancedShipmentOptions.AdditionalHandling.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.AdvancedShipmentOptions() -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToAccount.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToAccount.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToCountryCode.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToCountryCode.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToParty.get -> ShipEngineSDK.Model.BillToParty? +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToParty.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToPostalCode.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptions.BillToPostalCode.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.CollectOnDelivery.get -> ShipEngineSDK.Model.CollectOnDelivery! +ShipEngineSDK.Model.AdvancedShipmentOptions.CollectOnDelivery.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.ContainsAlcohol.get -> bool +ShipEngineSDK.Model.AdvancedShipmentOptions.ContainsAlcohol.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.CustomField1.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptions.CustomField1.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.CustomField2.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptions.CustomField2.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.CustomField3.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptions.CustomField3.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.DangerousGoods.get -> bool +ShipEngineSDK.Model.AdvancedShipmentOptions.DangerousGoods.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.DangerousGoodsContact.get -> ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact! +ShipEngineSDK.Model.AdvancedShipmentOptions.DangerousGoodsContact.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.DeliveredDutyPaid.get -> bool +ShipEngineSDK.Model.AdvancedShipmentOptions.DeliveredDutyPaid.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.DryIce.get -> bool +ShipEngineSDK.Model.AdvancedShipmentOptions.DryIce.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.DryIceWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.AdvancedShipmentOptions.DryIceWeight.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.FedexFreight.get -> ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight! +ShipEngineSDK.Model.AdvancedShipmentOptions.FedexFreight.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.FreightClass.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptions.FreightClass.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.NonMachinable.get -> bool +ShipEngineSDK.Model.AdvancedShipmentOptions.NonMachinable.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.OriginType.get -> ShipEngineSDK.Model.OriginType? +ShipEngineSDK.Model.AdvancedShipmentOptions.OriginType.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.SaturdayDelivery.get -> bool +ShipEngineSDK.Model.AdvancedShipmentOptions.SaturdayDelivery.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.ShipperRelease.get -> bool? +ShipEngineSDK.Model.AdvancedShipmentOptions.ShipperRelease.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.ThirdPartyConsignee.get -> bool +ShipEngineSDK.Model.AdvancedShipmentOptions.ThirdPartyConsignee.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptions.UseUpsGroundFreightPricing.get -> bool? +ShipEngineSDK.Model.AdvancedShipmentOptions.UseUpsGroundFreightPricing.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact +ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact.AdvancedShipmentOptionsDangerousGoodsContact() -> void +ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact.Name.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact.Name.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact.Phone.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact.Phone.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight +ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight.AdvancedShipmentOptionsFedexFreight() -> void +ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight.BookingConfirmation.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight.BookingConfirmation.set -> void +ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight.ShipperLoadAndCount.get -> string! +ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight.ShipperLoadAndCount.set -> void +ShipEngineSDK.Model.AllowedIncoterms +ShipEngineSDK.Model.AllowedIncoterms.AllowedIncoterms(string! value) -> void +ShipEngineSDK.Model.AlternativeIdentifier +ShipEngineSDK.Model.AlternativeIdentifier.AlternativeIdentifier() -> void +ShipEngineSDK.Model.AlternativeIdentifier.Type.get -> string! +ShipEngineSDK.Model.AlternativeIdentifier.Type.set -> void +ShipEngineSDK.Model.AlternativeIdentifier.Value.get -> string! +ShipEngineSDK.Model.AlternativeIdentifier.Value.set -> void +ShipEngineSDK.Model.AlternativeIdentifiers +ShipEngineSDK.Model.AlternativeIdentifiers.AlternativeIdentifiers() -> void +ShipEngineSDK.Model.AlternativeIdentifiers.VarAlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.AlternativeIdentifiers.VarAlternativeIdentifiers.set -> void +ShipEngineSDK.Model.AncillaryServiceEndorsement +ShipEngineSDK.Model.AncillaryServiceEndorsement.AncillaryServiceEndorsement(string! value) -> void +ShipEngineSDK.Model.Batch +ShipEngineSDK.Model.Batch.Batch() -> void +ShipEngineSDK.Model.Batch.BatchErrorsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.Batch.BatchErrorsUrl.set -> void +ShipEngineSDK.Model.Batch.BatchId.get -> string! +ShipEngineSDK.Model.Batch.BatchId.set -> void +ShipEngineSDK.Model.Batch.BatchLabelsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.Batch.BatchLabelsUrl.set -> void +ShipEngineSDK.Model.Batch.BatchNotes.get -> string! +ShipEngineSDK.Model.Batch.BatchNotes.set -> void +ShipEngineSDK.Model.Batch.BatchNumber.get -> string! +ShipEngineSDK.Model.Batch.BatchNumber.set -> void +ShipEngineSDK.Model.Batch.BatchShipmentsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.Batch.BatchShipmentsUrl.set -> void +ShipEngineSDK.Model.Batch.Completed.get -> int +ShipEngineSDK.Model.Batch.Completed.set -> void +ShipEngineSDK.Model.Batch.Count.get -> int +ShipEngineSDK.Model.Batch.Count.set -> void +ShipEngineSDK.Model.Batch.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.Batch.CreatedAt.set -> void +ShipEngineSDK.Model.Batch.Errors.get -> int +ShipEngineSDK.Model.Batch.Errors.set -> void +ShipEngineSDK.Model.Batch.ExternalBatchId.get -> string! +ShipEngineSDK.Model.Batch.ExternalBatchId.set -> void +ShipEngineSDK.Model.Batch.FormDownload.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.Batch.FormDownload.set -> void +ShipEngineSDK.Model.Batch.Forms.get -> int +ShipEngineSDK.Model.Batch.Forms.set -> void +ShipEngineSDK.Model.Batch.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.Batch.LabelDownload.set -> void +ShipEngineSDK.Model.Batch.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat! +ShipEngineSDK.Model.Batch.LabelFormat.set -> void +ShipEngineSDK.Model.Batch.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout! +ShipEngineSDK.Model.Batch.LabelLayout.set -> void +ShipEngineSDK.Model.Batch.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.Batch.PaperlessDownload.set -> void +ShipEngineSDK.Model.Batch.ProcessedAt.get -> System.DateTime +ShipEngineSDK.Model.Batch.ProcessedAt.set -> void +ShipEngineSDK.Model.Batch.ProcessErrors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Batch.ProcessErrors.set -> void +ShipEngineSDK.Model.Batch.Status.get -> ShipEngineSDK.Model.BatchStatus! +ShipEngineSDK.Model.Batch.Status.set -> void +ShipEngineSDK.Model.Batch.Warnings.get -> int +ShipEngineSDK.Model.Batch.Warnings.set -> void +ShipEngineSDK.Model.BatchesSortBy +ShipEngineSDK.Model.BatchesSortBy.BatchesSortBy(string! value) -> void +ShipEngineSDK.Model.BatchResponseError +ShipEngineSDK.Model.BatchResponseError.BatchResponseError() -> void +ShipEngineSDK.Model.BatchResponseError.Error.get -> string! +ShipEngineSDK.Model.BatchResponseError.Error.set -> void +ShipEngineSDK.Model.BatchResponseError.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.BatchResponseError.ExternalShipmentId.set -> void +ShipEngineSDK.Model.BatchResponseError.ShipmentId.get -> string! +ShipEngineSDK.Model.BatchResponseError.ShipmentId.set -> void +ShipEngineSDK.Model.BatchStatus +ShipEngineSDK.Model.BatchStatus.BatchStatus(string! value) -> void +ShipEngineSDK.Model.BillToParty +ShipEngineSDK.Model.BillToParty.BillToParty(string! value) -> void +ShipEngineSDK.Model.BulkRate +ShipEngineSDK.Model.BulkRate.BulkRate() -> void +ShipEngineSDK.Model.BulkRate.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.BulkRate.CreatedAt.set -> void +ShipEngineSDK.Model.BulkRate.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.BulkRate.Errors.set -> void +ShipEngineSDK.Model.BulkRate.RateRequestId.get -> string! +ShipEngineSDK.Model.BulkRate.RateRequestId.set -> void +ShipEngineSDK.Model.BulkRate.ShipmentId.get -> string! +ShipEngineSDK.Model.BulkRate.ShipmentId.set -> void +ShipEngineSDK.Model.BulkRate.Status.get -> ShipEngineSDK.Model.RateResponseStatus! +ShipEngineSDK.Model.BulkRate.Status.set -> void +ShipEngineSDK.Model.CalculateRatesRequestBody +ShipEngineSDK.Model.CalculateRatesRequestBody.CalculateRatesRequestBody(ShipEngineSDK.Model.ShipmentIdRequest! actualInstance) -> void +ShipEngineSDK.Model.CalculateRatesRequestBody.CalculateRatesRequestBody(ShipEngineSDK.Model.ShipmentRequest! actualInstance) -> void +ShipEngineSDK.Model.CalculateRatesRequestBody.GetShipmentIdRequest() -> ShipEngineSDK.Model.ShipmentIdRequest! +ShipEngineSDK.Model.CalculateRatesRequestBody.GetShipmentRequest() -> ShipEngineSDK.Model.ShipmentRequest! +ShipEngineSDK.Model.CalculateRatesRequestBody.RateOptions.get -> ShipEngineSDK.Model.RateRequestBody! +ShipEngineSDK.Model.CalculateRatesRequestBody.RateOptions.set -> void +ShipEngineSDK.Model.CalculateRatesRequestBodyJsonConverter +ShipEngineSDK.Model.CalculateRatesRequestBodyJsonConverter.CalculateRatesRequestBodyJsonConverter() -> void +ShipEngineSDK.Model.CalculateRatesResponseBody +ShipEngineSDK.Model.CalculateRatesResponseBody.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.CalculateRatesResponseBody.AdvancedOptions.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.CalculateRatesResponseBody() -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ComparisonRateType.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.ComparisonRateType.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation! +ShipEngineSDK.Model.CalculateRatesResponseBody.Confirmation.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CalculateRatesResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.CalculateRatesResponseBody.Customs.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ExternalOrderId.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.ExternalOrderId.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.ExternalShipmentId.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider! +ShipEngineSDK.Model.CalculateRatesResponseBody.InsuranceProvider.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.IsReturn.get -> bool? +ShipEngineSDK.Model.CalculateRatesResponseBody.IsReturn.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CalculateRatesResponseBody.Items.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.CalculateRatesResponseBody.ModifiedAt.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.CalculateRatesResponseBody.OrderSourceCode.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CalculateRatesResponseBody.Packages.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.RateResponse.get -> ShipEngineSDK.Model.RatesInformation! +ShipEngineSDK.Model.CalculateRatesResponseBody.RateResponse.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.CalculateRatesResponseBody.ReturnTo.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipFrom.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipmentNumber.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipmentNumber.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus! +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipmentStatus.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ShippingRuleId.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.ShippingRuleId.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.CalculateRatesResponseBody.ShipTo.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CalculateRatesResponseBody.Tags.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CalculateRatesResponseBody.TaxIdentifiers.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.CalculateRatesResponseBody.TotalWeight.set -> void +ShipEngineSDK.Model.CalculateRatesResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.CalculateRatesResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.Carrier +ShipEngineSDK.Model.Carrier.AccountNumber.get -> string! +ShipEngineSDK.Model.Carrier.AccountNumber.set -> void +ShipEngineSDK.Model.Carrier.Balance.get -> double +ShipEngineSDK.Model.Carrier.Balance.set -> void +ShipEngineSDK.Model.Carrier.Carrier() -> void +ShipEngineSDK.Model.Carrier.CarrierCode.get -> string! +ShipEngineSDK.Model.Carrier.CarrierCode.set -> void +ShipEngineSDK.Model.Carrier.CarrierId.get -> string! +ShipEngineSDK.Model.Carrier.CarrierId.set -> void +ShipEngineSDK.Model.Carrier.DisabledByBillingPlan.get -> bool +ShipEngineSDK.Model.Carrier.DisabledByBillingPlan.set -> void +ShipEngineSDK.Model.Carrier.FriendlyName.get -> string! +ShipEngineSDK.Model.Carrier.FriendlyName.set -> void +ShipEngineSDK.Model.Carrier.HasMultiPackageSupportingServices.get -> bool +ShipEngineSDK.Model.Carrier.HasMultiPackageSupportingServices.set -> void +ShipEngineSDK.Model.Carrier.Nickname.get -> string! +ShipEngineSDK.Model.Carrier.Nickname.set -> void +ShipEngineSDK.Model.Carrier.Options.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Carrier.Options.set -> void +ShipEngineSDK.Model.Carrier.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Carrier.Packages.set -> void +ShipEngineSDK.Model.Carrier.Primary.get -> bool +ShipEngineSDK.Model.Carrier.Primary.set -> void +ShipEngineSDK.Model.Carrier.RequiresFundedAmount.get -> bool +ShipEngineSDK.Model.Carrier.RequiresFundedAmount.set -> void +ShipEngineSDK.Model.Carrier.Services.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Carrier.Services.set -> void +ShipEngineSDK.Model.Carrier.SupportsLabelMessages.get -> bool +ShipEngineSDK.Model.Carrier.SupportsLabelMessages.set -> void +ShipEngineSDK.Model.CarrierAdvancedOption +ShipEngineSDK.Model.CarrierAdvancedOption.CarrierAdvancedOption() -> void +ShipEngineSDK.Model.CarrierAdvancedOption.DefaultValue.get -> string! +ShipEngineSDK.Model.CarrierAdvancedOption.DefaultValue.set -> void +ShipEngineSDK.Model.CarrierAdvancedOption.Description.get -> string! +ShipEngineSDK.Model.CarrierAdvancedOption.Description.set -> void +ShipEngineSDK.Model.CarrierAdvancedOption.Name.get -> string! +ShipEngineSDK.Model.CarrierAdvancedOption.Name.set -> void +ShipEngineSDK.Model.CarrierName +ShipEngineSDK.Model.CarrierName.CarrierName(string! value) -> void +ShipEngineSDK.Model.CarrierNameWithSettings +ShipEngineSDK.Model.CarrierNameWithSettings.CarrierNameWithSettings(string! value) -> void +ShipEngineSDK.Model.CollectOnDelivery +ShipEngineSDK.Model.CollectOnDelivery.CollectOnDelivery() -> void +ShipEngineSDK.Model.CollectOnDelivery.PaymentAmount.get -> ShipEngineSDK.Model.PaymentAmount! +ShipEngineSDK.Model.CollectOnDelivery.PaymentAmount.set -> void +ShipEngineSDK.Model.CollectOnDelivery.PaymentType.get -> ShipEngineSDK.Model.CollectOnDeliveryPaymentType? +ShipEngineSDK.Model.CollectOnDelivery.PaymentType.set -> void +ShipEngineSDK.Model.CollectOnDeliveryPaymentType +ShipEngineSDK.Model.CollectOnDeliveryPaymentType.CollectOnDeliveryPaymentType(string! value) -> void +ShipEngineSDK.Model.CompareBulkRatesRequestBody +ShipEngineSDK.Model.CompareBulkRatesRequestBody.CompareBulkRatesRequestBody(ShipEngineSDK.Model.RateRequestByShipmentIds! actualInstance) -> void +ShipEngineSDK.Model.CompareBulkRatesRequestBody.CompareBulkRatesRequestBody(ShipEngineSDK.Model.RateRequestByShipments! actualInstance) -> void +ShipEngineSDK.Model.CompareBulkRatesRequestBody.GetRateRequestByShipmentIds() -> ShipEngineSDK.Model.RateRequestByShipmentIds! +ShipEngineSDK.Model.CompareBulkRatesRequestBody.GetRateRequestByShipments() -> ShipEngineSDK.Model.RateRequestByShipments! +ShipEngineSDK.Model.CompareBulkRatesRequestBody.RateOptions.get -> ShipEngineSDK.Model.RateRequestBody! +ShipEngineSDK.Model.CompareBulkRatesRequestBody.RateOptions.set -> void +ShipEngineSDK.Model.CompareBulkRatesRequestBodyJsonConverter +ShipEngineSDK.Model.CompareBulkRatesRequestBodyJsonConverter.CompareBulkRatesRequestBodyJsonConverter() -> void +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.ConnectAccessWorldwideRequestBody() -> void +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.Username.get -> string! +ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.Username.set -> void +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.ConnectAmazonBuyShippingRequestBody() -> void +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.Email.get -> string! +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.Email.set -> void +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.MerchantSellerId.get -> string! +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.MerchantSellerId.set -> void +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.MwsAuthToken.get -> string! +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.MwsAuthToken.set -> void +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectAmazonShippingUk +ShipEngineSDK.Model.ConnectAmazonShippingUk.AuthCode.get -> string! +ShipEngineSDK.Model.ConnectAmazonShippingUk.AuthCode.set -> void +ShipEngineSDK.Model.ConnectAmazonShippingUk.ConnectAmazonShippingUk() -> void +ShipEngineSDK.Model.ConnectAmazonShippingUk.Nickname.get -> string! +ShipEngineSDK.Model.ConnectAmazonShippingUk.Nickname.set -> void +ShipEngineSDK.Model.ConnectApcRequestBody +ShipEngineSDK.Model.ConnectApcRequestBody.ConnectApcRequestBody() -> void +ShipEngineSDK.Model.ConnectApcRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectApcRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectApcRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectApcRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectApcRequestBody.Username.get -> string! +ShipEngineSDK.Model.ConnectApcRequestBody.Username.set -> void +ShipEngineSDK.Model.ConnectAsendiaRequestBody +ShipEngineSDK.Model.ConnectAsendiaRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectAsendiaRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectAsendiaRequestBody.ConnectAsendiaRequestBody() -> void +ShipEngineSDK.Model.ConnectAsendiaRequestBody.FtpPassword.get -> string! +ShipEngineSDK.Model.ConnectAsendiaRequestBody.FtpPassword.set -> void +ShipEngineSDK.Model.ConnectAsendiaRequestBody.FtpUsername.get -> string! +ShipEngineSDK.Model.ConnectAsendiaRequestBody.FtpUsername.set -> void +ShipEngineSDK.Model.ConnectAsendiaRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectAsendiaRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.ApiKey.get -> string! +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.ApiKey.set -> void +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.ApiSecret.get -> string! +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.ApiSecret.set -> void +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.ConnectAustraliaPostRequestBody() -> void +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectCanadaPostRequestBody +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ApiKey.get -> string! +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ApiKey.set -> void +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ApiSecret.get -> string! +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ApiSecret.set -> void +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ConnectCanadaPostRequestBody() -> void +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ContractId.get -> string! +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ContractId.set -> void +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectCanadaPostRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectAmazonShippingUk! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectApcRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectAsendiaRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectAustraliaPostRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectCanadaPostRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectDhlExpressRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectDpdRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectEndiciaRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectFedexRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectFedexUkRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectFirstmileRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectImexRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectLasershipRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectNewgisticsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectOntracRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectPurolatorRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectRoyalMailRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectSekoRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectSendleRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectStampsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.ConnectCarrierRequestBody(ShipEngineSDK.Model.ConnectUpsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectAccessWorldwideRequestBody() -> ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectAmazonBuyShippingRequestBody() -> ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectAmazonShippingUk() -> ShipEngineSDK.Model.ConnectAmazonShippingUk! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectApcRequestBody() -> ShipEngineSDK.Model.ConnectApcRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectAsendiaRequestBody() -> ShipEngineSDK.Model.ConnectAsendiaRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectAustraliaPostRequestBody() -> ShipEngineSDK.Model.ConnectAustraliaPostRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectCanadaPostRequestBody() -> ShipEngineSDK.Model.ConnectCanadaPostRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectDhlEcommerceRequestBody() -> ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectDhlExpressAuRequestBody() -> ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectDhlExpressCaRequestBody() -> ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectDhlExpressRequestBody() -> ShipEngineSDK.Model.ConnectDhlExpressRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectDhlExpressUkRequestBody() -> ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectDpdRequestBody() -> ShipEngineSDK.Model.ConnectDpdRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectEndiciaRequestBody() -> ShipEngineSDK.Model.ConnectEndiciaRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectFedexRequestBody() -> ShipEngineSDK.Model.ConnectFedexRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectFedexUkRequestBody() -> ShipEngineSDK.Model.ConnectFedexUkRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectFirstmileRequestBody() -> ShipEngineSDK.Model.ConnectFirstmileRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectImexRequestBody() -> ShipEngineSDK.Model.ConnectImexRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectLasershipRequestBody() -> ShipEngineSDK.Model.ConnectLasershipRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectNewgisticsRequestBody() -> ShipEngineSDK.Model.ConnectNewgisticsRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectOntracRequestBody() -> ShipEngineSDK.Model.ConnectOntracRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectPurolatorRequestBody() -> ShipEngineSDK.Model.ConnectPurolatorRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectRoyalMailRequestBody() -> ShipEngineSDK.Model.ConnectRoyalMailRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectRrDonnelleyRequestBody() -> ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectSekoRequestBody() -> ShipEngineSDK.Model.ConnectSekoRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectSendleRequestBody() -> ShipEngineSDK.Model.ConnectSendleRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectStampsRequestBody() -> ShipEngineSDK.Model.ConnectStampsRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBody.GetConnectUpsRequestBody() -> ShipEngineSDK.Model.ConnectUpsRequestBody! +ShipEngineSDK.Model.ConnectCarrierRequestBodyJsonConverter +ShipEngineSDK.Model.ConnectCarrierRequestBodyJsonConverter.ConnectCarrierRequestBodyJsonConverter() -> void +ShipEngineSDK.Model.ConnectCarrierResponseBody +ShipEngineSDK.Model.ConnectCarrierResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.ConnectCarrierResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.ConnectCarrierResponseBody.ConnectCarrierResponseBody() -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.AncillaryEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.AncillaryEndorsement.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ApiKey.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ApiKey.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ApiSecret.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ApiSecret.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ClientId.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ClientId.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ConnectDhlEcommerceRequestBody() -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.DistributionCenter.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.DistributionCenter.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.FtpPassword.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.FtpPassword.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.FtpUsername.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.FtpUsername.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.PickupNumber.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.PickupNumber.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.RegistrationId.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.RegistrationId.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.SoftwareName.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.SoftwareName.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.SoldTo.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.SoldTo.set -> void +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.Username.get -> string! +ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.Username.set -> void +ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody +ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody.ConnectDhlExpressAuRequestBody() -> void +ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody +ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody.ConnectDhlExpressCaRequestBody() -> void +ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectDhlExpressRequestBody +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.ConnectDhlExpressRequestBody() -> void +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.CountryCode.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.CountryCode.set -> void +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.SiteId.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressRequestBody.SiteId.set -> void +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.ConnectDhlExpressUkRequestBody() -> void +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.SiteId.get -> string! +ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.SiteId.set -> void +ShipEngineSDK.Model.ConnectDpdRequestBody +ShipEngineSDK.Model.ConnectDpdRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectDpdRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectDpdRequestBody.ConnectDpdRequestBody() -> void +ShipEngineSDK.Model.ConnectDpdRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectDpdRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectDpdRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectDpdRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectEndiciaRequestBody +ShipEngineSDK.Model.ConnectEndiciaRequestBody.Account.get -> string! +ShipEngineSDK.Model.ConnectEndiciaRequestBody.Account.set -> void +ShipEngineSDK.Model.ConnectEndiciaRequestBody.ConnectEndiciaRequestBody() -> void +ShipEngineSDK.Model.ConnectEndiciaRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectEndiciaRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectEndiciaRequestBody.Passphrase.get -> string! +ShipEngineSDK.Model.ConnectEndiciaRequestBody.Passphrase.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody +ShipEngineSDK.Model.ConnectFedexRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.Address1.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.Address1.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.Address2.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.Address2.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.AgreeToEula.get -> bool +ShipEngineSDK.Model.ConnectFedexRequestBody.AgreeToEula.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.City.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.City.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.Company.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.Company.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.ConnectFedexRequestBody() -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.CountryCode.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.CountryCode.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.Email.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.Email.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.FirstName.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.FirstName.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.LastName.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.LastName.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.MeterNumber.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.MeterNumber.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.Phone.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.Phone.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.PostalCode.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.PostalCode.set -> void +ShipEngineSDK.Model.ConnectFedexRequestBody.State.get -> string! +ShipEngineSDK.Model.ConnectFedexRequestBody.State.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody +ShipEngineSDK.Model.ConnectFedexUkRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Address1.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Address1.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Address2.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Address2.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.AgreeToEula.get -> bool +ShipEngineSDK.Model.ConnectFedexUkRequestBody.AgreeToEula.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.City.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.City.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Company.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Company.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.ConnectFedexUkRequestBody() -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.CountryCode.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.CountryCode.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Email.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Email.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.FirstName.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.FirstName.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.LastName.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.LastName.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.MeterNumber.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.MeterNumber.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Phone.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.Phone.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.PostalCode.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.PostalCode.set -> void +ShipEngineSDK.Model.ConnectFedexUkRequestBody.State.get -> string! +ShipEngineSDK.Model.ConnectFedexUkRequestBody.State.set -> void +ShipEngineSDK.Model.ConnectFirstmileRequestBody +ShipEngineSDK.Model.ConnectFirstmileRequestBody.ConnectFirstmileRequestBody() -> void +ShipEngineSDK.Model.ConnectFirstmileRequestBody.MailerId.get -> string! +ShipEngineSDK.Model.ConnectFirstmileRequestBody.MailerId.set -> void +ShipEngineSDK.Model.ConnectFirstmileRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectFirstmileRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectFirstmileRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectFirstmileRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectFirstmileRequestBody.ProfileName.get -> string! +ShipEngineSDK.Model.ConnectFirstmileRequestBody.ProfileName.set -> void +ShipEngineSDK.Model.ConnectImexRequestBody +ShipEngineSDK.Model.ConnectImexRequestBody.ConnectImexRequestBody() -> void +ShipEngineSDK.Model.ConnectImexRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectImexRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectImexRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectImexRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectImexRequestBody.Username.get -> string! +ShipEngineSDK.Model.ConnectImexRequestBody.Username.set -> void +ShipEngineSDK.Model.ConnectInsurerRequestBody +ShipEngineSDK.Model.ConnectInsurerRequestBody.ConnectInsurerRequestBody() -> void +ShipEngineSDK.Model.ConnectInsurerRequestBody.Email.get -> string! +ShipEngineSDK.Model.ConnectInsurerRequestBody.Email.set -> void +ShipEngineSDK.Model.ConnectInsurerRequestBody.PolicyId.get -> string! +ShipEngineSDK.Model.ConnectInsurerRequestBody.PolicyId.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody +ShipEngineSDK.Model.ConnectLasershipRequestBody.Address.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.Address.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.Address2.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.Address2.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrAlcohol.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrAlcohol.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrControlledSubstance.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrControlledSubstance.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrDryIce.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrDryIce.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrExplosive.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrExplosive.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrHazmat.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrHazmat.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrNoRTS.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrNoRTS.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrPerishable.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrPerishable.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrRefrigerated.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrRefrigerated.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrTwoPersons.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.AttrTwoPersons.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.City.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.City.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.ConnectLasershipRequestBody() -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.Country.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.Country.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.CustomerBranch.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.CustomerBranch.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.DeclarePieceAttributesSeparatelyForEveryShipment.get -> bool +ShipEngineSDK.Model.ConnectLasershipRequestBody.DeclarePieceAttributesSeparatelyForEveryShipment.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.Email.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.Email.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.FacilityCode.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.FacilityCode.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.Instructions.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.Instructions.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.LasershipCriticalEntryTime.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.LasershipCriticalEntryTime.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.LasershipCriticalPullTime.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.LasershipCriticalPullTime.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.Phone.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.Phone.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.PostalCode.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.PostalCode.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.State.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.State.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.WebServicesId.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.WebServicesId.set -> void +ShipEngineSDK.Model.ConnectLasershipRequestBody.WebServicesKey.get -> string! +ShipEngineSDK.Model.ConnectLasershipRequestBody.WebServicesKey.set -> void +ShipEngineSDK.Model.ConnectNewgisticsRequestBody +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.ConnectNewgisticsRequestBody() -> void +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.InductionSite.get -> string! +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.InductionSite.set -> void +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.MailerId.get -> int +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.MailerId.set -> void +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.MerchantId.get -> int +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.MerchantId.set -> void +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectNewgisticsRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectOntracRequestBody +ShipEngineSDK.Model.ConnectOntracRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectOntracRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectOntracRequestBody.ConnectOntracRequestBody() -> void +ShipEngineSDK.Model.ConnectOntracRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectOntracRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectOntracRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectOntracRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectPurolatorRequestBody +ShipEngineSDK.Model.ConnectPurolatorRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectPurolatorRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectPurolatorRequestBody.ActivationKey.get -> string! +ShipEngineSDK.Model.ConnectPurolatorRequestBody.ActivationKey.set -> void +ShipEngineSDK.Model.ConnectPurolatorRequestBody.ConnectPurolatorRequestBody() -> void +ShipEngineSDK.Model.ConnectPurolatorRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectPurolatorRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.City.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.City.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.CompanyName.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.CompanyName.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.ConnectRoyalMailRequestBody() -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.ContactName.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.ContactName.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.Email.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.Email.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.ObaEmail.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.ObaEmail.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.Phone.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.Phone.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.PostalCode.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.PostalCode.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.StreetLine1.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.StreetLine1.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.StreetLine2.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.StreetLine2.set -> void +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.StreetLine3.get -> string! +ShipEngineSDK.Model.ConnectRoyalMailRequestBody.StreetLine3.set -> void +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.ConnectRrDonnelleyRequestBody() -> void +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.Username.get -> string! +ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.Username.set -> void +ShipEngineSDK.Model.ConnectSekoRequestBody +ShipEngineSDK.Model.ConnectSekoRequestBody.AccessKey.get -> string! +ShipEngineSDK.Model.ConnectSekoRequestBody.AccessKey.set -> void +ShipEngineSDK.Model.ConnectSekoRequestBody.ConnectSekoRequestBody() -> void +ShipEngineSDK.Model.ConnectSekoRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectSekoRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectSendleRequestBody +ShipEngineSDK.Model.ConnectSendleRequestBody.ApiKey.get -> string! +ShipEngineSDK.Model.ConnectSendleRequestBody.ApiKey.set -> void +ShipEngineSDK.Model.ConnectSendleRequestBody.ConnectSendleRequestBody() -> void +ShipEngineSDK.Model.ConnectSendleRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectSendleRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectSendleRequestBody.SendleId.get -> string! +ShipEngineSDK.Model.ConnectSendleRequestBody.SendleId.set -> void +ShipEngineSDK.Model.ConnectStampsRequestBody +ShipEngineSDK.Model.ConnectStampsRequestBody.ConnectStampsRequestBody() -> void +ShipEngineSDK.Model.ConnectStampsRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectStampsRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ConnectStampsRequestBody.Password.get -> string! +ShipEngineSDK.Model.ConnectStampsRequestBody.Password.set -> void +ShipEngineSDK.Model.ConnectStampsRequestBody.Username.get -> string! +ShipEngineSDK.Model.ConnectStampsRequestBody.Username.set -> void +ShipEngineSDK.Model.ConnectUpsRequestBody +ShipEngineSDK.Model.ConnectUpsRequestBody.AccountNumber.get -> string! +ShipEngineSDK.Model.ConnectUpsRequestBody.AccountNumber.set -> void +ShipEngineSDK.Model.ConnectUpsRequestBody.ConnectUpsRequestBody() -> void +ShipEngineSDK.Model.ConnectUpsRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.ConnectUpsRequestBody.Nickname.set -> void +ShipEngineSDK.Model.ContactDetails +ShipEngineSDK.Model.ContactDetails.ContactDetails() -> void +ShipEngineSDK.Model.ContactDetails.Email.get -> string! +ShipEngineSDK.Model.ContactDetails.Email.set -> void +ShipEngineSDK.Model.ContactDetails.Name.get -> string! +ShipEngineSDK.Model.ContactDetails.Name.set -> void +ShipEngineSDK.Model.ContactDetails.Phone.get -> string! +ShipEngineSDK.Model.ContactDetails.Phone.set -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.CreateAccountSettingsImageRequestBody() -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentType.get -> ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum! +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentType.set -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum.ImageContentTypeEnum(string! value) -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageData.get -> string! +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageData.set -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.IsDefault.get -> bool +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.IsDefault.set -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.LabelImageId.get -> string! +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.LabelImageId.set -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ModifiedAt.set -> void +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.Name.get -> string! +ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.Name.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.BatchNotes.get -> string! +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.BatchNotes.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.CreateAndProcessBatchRequestBody() -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ExternalBatchId.get -> string! +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ExternalBatchId.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ProcessLabels.get -> ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels! +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ProcessLabels.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.RateIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.RateIds.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ShipmentIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ShipmentIds.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.CreateAndProcessBatchRequestBodyProcessLabels() -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.CreateBatchAndProcessLabels.get -> bool +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.CreateBatchAndProcessLabels.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.LabelFormat.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.LabelLayout.set -> void +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.ShipDate.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment +ShipEngineSDK.Model.CreateAndValidateShipment.AddressValidation.get -> ShipEngineSDK.Model.AddressValidationResult! +ShipEngineSDK.Model.CreateAndValidateShipment.AddressValidation.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.CreateAndValidateShipment.AdvancedOptions.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.CarrierId.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.CarrierId.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ComparisonRateType.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.ComparisonRateType.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation? +ShipEngineSDK.Model.CreateAndValidateShipment.Confirmation.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.CreateAndValidateShipment() -> void +ShipEngineSDK.Model.CreateAndValidateShipment.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateAndValidateShipment.CreatedAt.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.CreateAndValidateShipment.Customs.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateAndValidateShipment.Errors.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ExternalOrderId.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.ExternalOrderId.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.ExternalShipmentId.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider? +ShipEngineSDK.Model.CreateAndValidateShipment.InsuranceProvider.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.IsReturn.get -> bool? +ShipEngineSDK.Model.CreateAndValidateShipment.IsReturn.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateAndValidateShipment.Items.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateAndValidateShipment.ModifiedAt.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.CreateAndValidateShipment.OrderSourceCode.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateAndValidateShipment.Packages.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.CreateAndValidateShipment.ReturnTo.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ServiceCode.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.ServiceCode.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateAndValidateShipment.ShipDate.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.CreateAndValidateShipment.ShipFrom.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ShipmentId.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.ShipmentId.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ShipmentNumber.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.ShipmentNumber.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus? +ShipEngineSDK.Model.CreateAndValidateShipment.ShipmentStatus.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ShippingRuleId.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.ShippingRuleId.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.CreateAndValidateShipment.ShipTo.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateAndValidateShipment.Tags.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateAndValidateShipment.TaxIdentifiers.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.CreateAndValidateShipment.TotalWeight.set -> void +ShipEngineSDK.Model.CreateAndValidateShipment.WarehouseId.get -> string! +ShipEngineSDK.Model.CreateAndValidateShipment.WarehouseId.set -> void +ShipEngineSDK.Model.CreateBatchRequest +ShipEngineSDK.Model.CreateBatchRequest.CreateBatchRequest(ShipEngineSDK.Model.CreateAndProcessBatchRequestBody! actualInstance) -> void +ShipEngineSDK.Model.CreateBatchRequest.CreateBatchRequest(ShipEngineSDK.Model.CreateBatchRequestBody! actualInstance) -> void +ShipEngineSDK.Model.CreateBatchRequest.GetCreateAndProcessBatchRequestBody() -> ShipEngineSDK.Model.CreateAndProcessBatchRequestBody! +ShipEngineSDK.Model.CreateBatchRequest.GetCreateBatchRequestBody() -> ShipEngineSDK.Model.CreateBatchRequestBody! +ShipEngineSDK.Model.CreateBatchRequestBody +ShipEngineSDK.Model.CreateBatchRequestBody.BatchNotes.get -> string! +ShipEngineSDK.Model.CreateBatchRequestBody.BatchNotes.set -> void +ShipEngineSDK.Model.CreateBatchRequestBody.CreateBatchRequestBody() -> void +ShipEngineSDK.Model.CreateBatchRequestBody.ExternalBatchId.get -> string! +ShipEngineSDK.Model.CreateBatchRequestBody.ExternalBatchId.set -> void +ShipEngineSDK.Model.CreateBatchRequestBody.RateIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateBatchRequestBody.RateIds.set -> void +ShipEngineSDK.Model.CreateBatchRequestBody.ShipmentIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateBatchRequestBody.ShipmentIds.set -> void +ShipEngineSDK.Model.CreateBatchRequestJsonConverter +ShipEngineSDK.Model.CreateBatchRequestJsonConverter.CreateBatchRequestJsonConverter() -> void +ShipEngineSDK.Model.CreateBatchResponseBody +ShipEngineSDK.Model.CreateBatchResponseBody.BatchErrorsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.CreateBatchResponseBody.BatchErrorsUrl.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.CreateBatchResponseBody.BatchId.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.BatchLabelsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.CreateBatchResponseBody.BatchLabelsUrl.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.BatchNotes.get -> string! +ShipEngineSDK.Model.CreateBatchResponseBody.BatchNotes.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.BatchNumber.get -> string! +ShipEngineSDK.Model.CreateBatchResponseBody.BatchNumber.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.BatchShipmentsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.CreateBatchResponseBody.BatchShipmentsUrl.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.Completed.get -> int +ShipEngineSDK.Model.CreateBatchResponseBody.Completed.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.Count.get -> int +ShipEngineSDK.Model.CreateBatchResponseBody.Count.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.CreateBatchResponseBody() -> void +ShipEngineSDK.Model.CreateBatchResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateBatchResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.Errors.get -> int +ShipEngineSDK.Model.CreateBatchResponseBody.Errors.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.ExternalBatchId.get -> string! +ShipEngineSDK.Model.CreateBatchResponseBody.ExternalBatchId.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.FormDownload.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.CreateBatchResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.Forms.get -> int +ShipEngineSDK.Model.CreateBatchResponseBody.Forms.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.CreateBatchResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat! +ShipEngineSDK.Model.CreateBatchResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout! +ShipEngineSDK.Model.CreateBatchResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.CreateBatchResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.ProcessedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateBatchResponseBody.ProcessedAt.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.ProcessErrors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateBatchResponseBody.ProcessErrors.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.Status.get -> ShipEngineSDK.Model.BatchStatus! +ShipEngineSDK.Model.CreateBatchResponseBody.Status.set -> void +ShipEngineSDK.Model.CreateBatchResponseBody.Warnings.get -> int +ShipEngineSDK.Model.CreateBatchResponseBody.Warnings.set -> void +ShipEngineSDK.Model.CreateLabelFromRateRequestBody +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.CreateLabelFromRateRequestBody() -> void +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.CreateLabelFromRateRequestBody.ValidateAddress.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.BatchId.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ChargeEvent.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.CreateLabelFromRateResponseBody() -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.InsuranceClaim.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.InsuranceCost.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.IsInternational.get -> bool +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.IsInternational.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.IsReturnLabel.get -> bool +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.IsReturnLabel.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelId.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelId.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelImageId.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelImageId.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.OutboundLabelId.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.OutboundLabelId.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Packages.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.RmaNumber.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.RmaNumber.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Shipment.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ShipmentCost.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Status.get -> ShipEngineSDK.Model.LabelStatus? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Status.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TestLabel.get -> bool +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TestLabel.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Trackable.get -> bool +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Trackable.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TrackingStatus.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ValidateAddress.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Voided.get -> bool +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.Voided.set -> void +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelFromRateResponseBody.VoidedAt.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.CreateLabelFromShipmentRequestBody() -> void +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.ValidateAddress.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.BatchId.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ChargeEvent.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.CreateLabelFromShipmentResponseBody() -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.InsuranceClaim.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.InsuranceCost.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.IsInternational.get -> bool +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.IsInternational.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.IsReturnLabel.get -> bool +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.IsReturnLabel.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelId.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelId.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelImageId.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelImageId.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.OutboundLabelId.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.OutboundLabelId.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Packages.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.RmaNumber.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.RmaNumber.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Shipment.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ShipmentCost.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Status.get -> ShipEngineSDK.Model.LabelStatus? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Status.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TestLabel.get -> bool +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TestLabel.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Trackable.get -> bool +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Trackable.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TrackingStatus.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ValidateAddress.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Voided.get -> bool +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.Voided.set -> void +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.VoidedAt.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody +ShipEngineSDK.Model.CreateLabelRequestBody.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelRequestBody.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.BatchId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.BatchId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.CarrierCode.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.CarrierCode.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.CarrierId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.CarrierId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.CreateLabelRequestBody.ChargeEvent.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelRequestBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.CreateLabelRequestBody() -> void +ShipEngineSDK.Model.CreateLabelRequestBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateLabelRequestBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelRequestBody.FormDownload.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelRequestBody.InsuranceClaim.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelRequestBody.InsuranceCost.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.IsInternational.get -> bool +ShipEngineSDK.Model.CreateLabelRequestBody.IsInternational.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.IsReturnLabel.get -> bool +ShipEngineSDK.Model.CreateLabelRequestBody.IsReturnLabel.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.CreateLabelRequestBody.LabelDownload.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateLabelRequestBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateLabelRequestBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.LabelId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.LabelId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.LabelImageId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.LabelImageId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateLabelRequestBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.OutboundLabelId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.OutboundLabelId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.PackageCode.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.PackageCode.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelRequestBody.Packages.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.CreateLabelRequestBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelRequestBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.RmaNumber.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.RmaNumber.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ServiceCode.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.ServiceCode.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelRequestBody.ShipDate.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ShipFromServicePointId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.ShipFromServicePointId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.CreateLabelRequestBody.Shipment.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelRequestBody.ShipmentCost.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ShipmentId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.ShipmentId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ShipToServicePointId.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.ShipToServicePointId.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.Status.get -> ShipEngineSDK.Model.LabelStatus? +ShipEngineSDK.Model.CreateLabelRequestBody.Status.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.TestLabel.get -> bool +ShipEngineSDK.Model.CreateLabelRequestBody.TestLabel.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.Trackable.get -> bool +ShipEngineSDK.Model.CreateLabelRequestBody.Trackable.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.TrackingNumber.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus? +ShipEngineSDK.Model.CreateLabelRequestBody.TrackingStatus.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.CreateLabelRequestBody.TrackingUrl.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.CreateLabelRequestBody.ValidateAddress.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.Voided.get -> bool +ShipEngineSDK.Model.CreateLabelRequestBody.Voided.set -> void +ShipEngineSDK.Model.CreateLabelRequestBody.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelRequestBody.VoidedAt.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody +ShipEngineSDK.Model.CreateLabelResponseBody.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelResponseBody.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.BatchId.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent! +ShipEngineSDK.Model.CreateLabelResponseBody.ChargeEvent.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.CreateLabelResponseBody() -> void +ShipEngineSDK.Model.CreateLabelResponseBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme! +ShipEngineSDK.Model.CreateLabelResponseBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateLabelResponseBody.InsuranceClaim.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelResponseBody.InsuranceCost.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.IsInternational.get -> bool +ShipEngineSDK.Model.CreateLabelResponseBody.IsInternational.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.IsReturnLabel.get -> bool +ShipEngineSDK.Model.CreateLabelResponseBody.IsReturnLabel.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.CreateLabelResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateLabelResponseBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat! +ShipEngineSDK.Model.CreateLabelResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.LabelId.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.LabelId.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.LabelImageId.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.LabelImageId.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout! +ShipEngineSDK.Model.CreateLabelResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.OutboundLabelId.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.OutboundLabelId.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateLabelResponseBody.Packages.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.CreateLabelResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelResponseBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.RmaNumber.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.RmaNumber.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.CreateLabelResponseBody.Shipment.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateLabelResponseBody.ShipmentCost.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.Status.get -> ShipEngineSDK.Model.LabelStatus! +ShipEngineSDK.Model.CreateLabelResponseBody.Status.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.TestLabel.get -> bool +ShipEngineSDK.Model.CreateLabelResponseBody.TestLabel.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.Trackable.get -> bool +ShipEngineSDK.Model.CreateLabelResponseBody.Trackable.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus! +ShipEngineSDK.Model.CreateLabelResponseBody.TrackingStatus.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.CreateLabelResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.CreateLabelResponseBody.ValidateAddress.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.Voided.get -> bool +ShipEngineSDK.Model.CreateLabelResponseBody.Voided.set -> void +ShipEngineSDK.Model.CreateLabelResponseBody.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateLabelResponseBody.VoidedAt.set -> void +ShipEngineSDK.Model.CreateManifestByObjectRequestBody +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.CarrierId.get -> string! +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.CarrierId.set -> void +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.CreateManifestByObjectRequestBody() -> void +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.ExcludedLabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.ExcludedLabelIds.set -> void +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.LabelIds.set -> void +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.ShipDate.set -> void +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.WarehouseId.get -> string! +ShipEngineSDK.Model.CreateManifestByObjectRequestBody.WarehouseId.set -> void +ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody +ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody.CreateManifestLabelIdsRequestBody() -> void +ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody.LabelIds.set -> void +ShipEngineSDK.Model.CreateManifestRequestBody +ShipEngineSDK.Model.CreateManifestRequestBody.CreateManifestRequestBody(ShipEngineSDK.Model.CreateManifestByObjectRequestBody! actualInstance) -> void +ShipEngineSDK.Model.CreateManifestRequestBody.CreateManifestRequestBody(ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.CreateManifestRequestBody.GetCreateManifestByObjectRequestBody() -> ShipEngineSDK.Model.CreateManifestByObjectRequestBody! +ShipEngineSDK.Model.CreateManifestRequestBody.GetCreateManifestLabelIdsRequestBody() -> ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody! +ShipEngineSDK.Model.CreateManifestRequestBodyJsonConverter +ShipEngineSDK.Model.CreateManifestRequestBodyJsonConverter.CreateManifestRequestBodyJsonConverter() -> void +ShipEngineSDK.Model.CreateManifestResponseBody +ShipEngineSDK.Model.CreateManifestResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.CreateManifestResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateManifestResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.CreateManifestResponseBody() -> void +ShipEngineSDK.Model.CreateManifestResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateManifestResponseBody.Errors.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.FormId.get -> string! +ShipEngineSDK.Model.CreateManifestResponseBody.FormId.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateManifestResponseBody.LabelIds.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.ManifestDownload.get -> ShipEngineSDK.Model.ManifestDownload! +ShipEngineSDK.Model.CreateManifestResponseBody.ManifestDownload.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.ManifestId.get -> string! +ShipEngineSDK.Model.CreateManifestResponseBody.ManifestId.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.ManifestRequests.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateManifestResponseBody.ManifestRequests.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.Manifests.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateManifestResponseBody.Manifests.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.CreateManifestResponseBody.RequestId.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateManifestResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.Shipments.get -> int +ShipEngineSDK.Model.CreateManifestResponseBody.Shipments.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.SubmissionId.get -> string! +ShipEngineSDK.Model.CreateManifestResponseBody.SubmissionId.set -> void +ShipEngineSDK.Model.CreateManifestResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.CreateManifestResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.CreatePackageTypeRequestBody +ShipEngineSDK.Model.CreatePackageTypeRequestBody.CreatePackageTypeRequestBody() -> void +ShipEngineSDK.Model.CreatePackageTypeRequestBody.Description.get -> string! +ShipEngineSDK.Model.CreatePackageTypeRequestBody.Description.set -> void +ShipEngineSDK.Model.CreatePackageTypeRequestBody.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.CreatePackageTypeRequestBody.Dimensions.set -> void +ShipEngineSDK.Model.CreatePackageTypeRequestBody.Name.get -> string! +ShipEngineSDK.Model.CreatePackageTypeRequestBody.Name.set -> void +ShipEngineSDK.Model.CreatePackageTypeRequestBody.PackageCode.get -> string! +ShipEngineSDK.Model.CreatePackageTypeRequestBody.PackageCode.set -> void +ShipEngineSDK.Model.CreatePackageTypeRequestBody.PackageId.get -> string! +ShipEngineSDK.Model.CreatePackageTypeRequestBody.PackageId.set -> void +ShipEngineSDK.Model.CreatePackageTypeResponseBody +ShipEngineSDK.Model.CreatePackageTypeResponseBody.CreatePackageTypeResponseBody() -> void +ShipEngineSDK.Model.CreatePackageTypeResponseBody.Description.get -> string! +ShipEngineSDK.Model.CreatePackageTypeResponseBody.Description.set -> void +ShipEngineSDK.Model.CreatePackageTypeResponseBody.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.CreatePackageTypeResponseBody.Dimensions.set -> void +ShipEngineSDK.Model.CreatePackageTypeResponseBody.Name.get -> string! +ShipEngineSDK.Model.CreatePackageTypeResponseBody.Name.set -> void +ShipEngineSDK.Model.CreatePackageTypeResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.CreatePackageTypeResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.CreatePackageTypeResponseBody.PackageId.get -> string! +ShipEngineSDK.Model.CreatePackageTypeResponseBody.PackageId.set -> void +ShipEngineSDK.Model.CreateReturnLabelRequestBody +ShipEngineSDK.Model.CreateReturnLabelRequestBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.CreateReturnLabelRequestBody.ChargeEvent.set -> void +ShipEngineSDK.Model.CreateReturnLabelRequestBody.CreateReturnLabelRequestBody() -> void +ShipEngineSDK.Model.CreateReturnLabelRequestBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateReturnLabelRequestBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelImageId.get -> string! +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelImageId.set -> void +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateReturnLabelRequestBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody +ShipEngineSDK.Model.CreateReturnLabelResponseBody.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.BatchId.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ChargeEvent.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateReturnLabelResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.CreateReturnLabelResponseBody() -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.DisplayScheme.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.InsuranceClaim.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.InsuranceCost.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.IsInternational.get -> bool +ShipEngineSDK.Model.CreateReturnLabelResponseBody.IsInternational.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.IsReturnLabel.get -> bool +ShipEngineSDK.Model.CreateReturnLabelResponseBody.IsReturnLabel.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelId.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelId.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelImageId.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelImageId.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.OutboundLabelId.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.OutboundLabelId.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Packages.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.RmaNumber.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.RmaNumber.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Shipment.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ShipmentCost.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Status.get -> ShipEngineSDK.Model.LabelStatus? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Status.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TestLabel.get -> bool +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TestLabel.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Trackable.get -> bool +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Trackable.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TrackingStatus.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.CreateReturnLabelResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.CreateReturnLabelResponseBody.ValidateAddress.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Voided.get -> bool +ShipEngineSDK.Model.CreateReturnLabelResponseBody.Voided.set -> void +ShipEngineSDK.Model.CreateReturnLabelResponseBody.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateReturnLabelResponseBody.VoidedAt.set -> void +ShipEngineSDK.Model.CreateShipmentResponseBodyFields +ShipEngineSDK.Model.CreateShipmentResponseBodyFields.AddressValidation.get -> ShipEngineSDK.Model.AddressValidationResult! +ShipEngineSDK.Model.CreateShipmentResponseBodyFields.AddressValidation.set -> void +ShipEngineSDK.Model.CreateShipmentResponseBodyFields.CreateShipmentResponseBodyFields() -> void +ShipEngineSDK.Model.CreateShipmentResponseBodyFields.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateShipmentResponseBodyFields.Errors.set -> void +ShipEngineSDK.Model.CreateShipmentsRequestBody +ShipEngineSDK.Model.CreateShipmentsRequestBody.CreateShipmentsRequestBody() -> void +ShipEngineSDK.Model.CreateShipmentsRequestBody.Shipments.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateShipmentsRequestBody.Shipments.set -> void +ShipEngineSDK.Model.CreateShipmentsResponseBody +ShipEngineSDK.Model.CreateShipmentsResponseBody.CreateShipmentsResponseBody() -> void +ShipEngineSDK.Model.CreateShipmentsResponseBody.HasErrors.get -> bool +ShipEngineSDK.Model.CreateShipmentsResponseBody.HasErrors.set -> void +ShipEngineSDK.Model.CreateShipmentsResponseBody.Shipments.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateShipmentsResponseBody.Shipments.set -> void +ShipEngineSDK.Model.CreateTagResponseBody +ShipEngineSDK.Model.CreateTagResponseBody.CreateTagResponseBody() -> void +ShipEngineSDK.Model.CreateTagResponseBody.Name.get -> string! +ShipEngineSDK.Model.CreateTagResponseBody.Name.set -> void +ShipEngineSDK.Model.CreateWarehouseRequestBody +ShipEngineSDK.Model.CreateWarehouseRequestBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateWarehouseRequestBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateWarehouseRequestBody.CreateWarehouseRequestBody() -> void +ShipEngineSDK.Model.CreateWarehouseRequestBody.IsDefault.get -> bool? +ShipEngineSDK.Model.CreateWarehouseRequestBody.IsDefault.set -> void +ShipEngineSDK.Model.CreateWarehouseRequestBody.Name.get -> string! +ShipEngineSDK.Model.CreateWarehouseRequestBody.Name.set -> void +ShipEngineSDK.Model.CreateWarehouseRequestBody.OriginAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.CreateWarehouseRequestBody.OriginAddress.set -> void +ShipEngineSDK.Model.CreateWarehouseRequestBody.ReturnAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.CreateWarehouseRequestBody.ReturnAddress.set -> void +ShipEngineSDK.Model.CreateWarehouseRequestBody.WarehouseId.get -> string! +ShipEngineSDK.Model.CreateWarehouseRequestBody.WarehouseId.set -> void +ShipEngineSDK.Model.CreateWarehouseResponseBody +ShipEngineSDK.Model.CreateWarehouseResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.CreateWarehouseResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.CreateWarehouseResponseBody.CreateWarehouseResponseBody() -> void +ShipEngineSDK.Model.CreateWarehouseResponseBody.IsDefault.get -> bool? +ShipEngineSDK.Model.CreateWarehouseResponseBody.IsDefault.set -> void +ShipEngineSDK.Model.CreateWarehouseResponseBody.Name.get -> string! +ShipEngineSDK.Model.CreateWarehouseResponseBody.Name.set -> void +ShipEngineSDK.Model.CreateWarehouseResponseBody.OriginAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.CreateWarehouseResponseBody.OriginAddress.set -> void +ShipEngineSDK.Model.CreateWarehouseResponseBody.ReturnAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.CreateWarehouseResponseBody.ReturnAddress.set -> void +ShipEngineSDK.Model.CreateWarehouseResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.CreateWarehouseResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.CreateWebhookRequestBody +ShipEngineSDK.Model.CreateWebhookRequestBody.CreateWebhookRequestBody() -> void +ShipEngineSDK.Model.CreateWebhookRequestBody.Event.get -> ShipEngineSDK.Model.WebhookEvent! +ShipEngineSDK.Model.CreateWebhookRequestBody.Event.set -> void +ShipEngineSDK.Model.CreateWebhookRequestBody.Headers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateWebhookRequestBody.Headers.set -> void +ShipEngineSDK.Model.CreateWebhookRequestBody.Url.get -> string! +ShipEngineSDK.Model.CreateWebhookRequestBody.Url.set -> void +ShipEngineSDK.Model.CreateWebhookResponseBody +ShipEngineSDK.Model.CreateWebhookResponseBody.CreateWebhookResponseBody() -> void +ShipEngineSDK.Model.CreateWebhookResponseBody.Event.get -> ShipEngineSDK.Model.WebhookEvent! +ShipEngineSDK.Model.CreateWebhookResponseBody.Event.set -> void +ShipEngineSDK.Model.CreateWebhookResponseBody.Headers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.CreateWebhookResponseBody.Headers.set -> void +ShipEngineSDK.Model.CreateWebhookResponseBody.Url.get -> string! +ShipEngineSDK.Model.CreateWebhookResponseBody.Url.set -> void +ShipEngineSDK.Model.CreateWebhookResponseBody.WebhookId.get -> string! +ShipEngineSDK.Model.CreateWebhookResponseBody.WebhookId.set -> void +ShipEngineSDK.Model.CustomsItem +ShipEngineSDK.Model.CustomsItem.CountryOfOrigin.get -> string! +ShipEngineSDK.Model.CustomsItem.CountryOfOrigin.set -> void +ShipEngineSDK.Model.CustomsItem.CustomsItem() -> void +ShipEngineSDK.Model.CustomsItem.CustomsItemId.get -> string! +ShipEngineSDK.Model.CustomsItem.CustomsItemId.set -> void +ShipEngineSDK.Model.CustomsItem.Description.get -> string! +ShipEngineSDK.Model.CustomsItem.Description.set -> void +ShipEngineSDK.Model.CustomsItem.HarmonizedTariffCode.get -> string! +ShipEngineSDK.Model.CustomsItem.HarmonizedTariffCode.set -> void +ShipEngineSDK.Model.CustomsItem.Quantity.get -> int +ShipEngineSDK.Model.CustomsItem.Quantity.set -> void +ShipEngineSDK.Model.CustomsItem.Sku.get -> string! +ShipEngineSDK.Model.CustomsItem.Sku.set -> void +ShipEngineSDK.Model.CustomsItem.SkuDescription.get -> string! +ShipEngineSDK.Model.CustomsItem.SkuDescription.set -> void +ShipEngineSDK.Model.CustomsItem.UnitOfMeasure.get -> string! +ShipEngineSDK.Model.CustomsItem.UnitOfMeasure.set -> void +ShipEngineSDK.Model.CustomsItem.Value.get -> double +ShipEngineSDK.Model.CustomsItem.Value.set -> void +ShipEngineSDK.Model.CustomsItem.ValueCurrency.get -> string! +ShipEngineSDK.Model.CustomsItem.ValueCurrency.set -> void +ShipEngineSDK.Model.CustomsItem.Weight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.CustomsItem.Weight.set -> void +ShipEngineSDK.Model.DangerousAmount +ShipEngineSDK.Model.DangerousAmount.Amount.get -> double +ShipEngineSDK.Model.DangerousAmount.Amount.set -> void +ShipEngineSDK.Model.DangerousAmount.DangerousAmount() -> void +ShipEngineSDK.Model.DangerousAmount.Unit.get -> string! +ShipEngineSDK.Model.DangerousAmount.Unit.set -> void +ShipEngineSDK.Model.DangerousGoods +ShipEngineSDK.Model.DangerousGoods.AdditionalDescription.get -> string! +ShipEngineSDK.Model.DangerousGoods.AdditionalDescription.set -> void +ShipEngineSDK.Model.DangerousGoods.DangerousAmount.get -> ShipEngineSDK.Model.DangerousAmount! +ShipEngineSDK.Model.DangerousGoods.DangerousAmount.set -> void +ShipEngineSDK.Model.DangerousGoods.DangerousGoods() -> void +ShipEngineSDK.Model.DangerousGoods.IdNumber.get -> string! +ShipEngineSDK.Model.DangerousGoods.IdNumber.set -> void +ShipEngineSDK.Model.DangerousGoods.PackagingGroup.get -> ShipEngineSDK.Model.PackagingGroup? +ShipEngineSDK.Model.DangerousGoods.PackagingGroup.set -> void +ShipEngineSDK.Model.DangerousGoods.PackagingInstruction.get -> string! +ShipEngineSDK.Model.DangerousGoods.PackagingInstruction.set -> void +ShipEngineSDK.Model.DangerousGoods.PackagingInstructionSection.get -> ShipEngineSDK.Model.PackagingInstructionSection? +ShipEngineSDK.Model.DangerousGoods.PackagingInstructionSection.set -> void +ShipEngineSDK.Model.DangerousGoods.PackagingType.get -> string! +ShipEngineSDK.Model.DangerousGoods.PackagingType.set -> void +ShipEngineSDK.Model.DangerousGoods.ProductClass.get -> string! +ShipEngineSDK.Model.DangerousGoods.ProductClass.set -> void +ShipEngineSDK.Model.DangerousGoods.ProductClassSubsidiary.get -> string! +ShipEngineSDK.Model.DangerousGoods.ProductClassSubsidiary.set -> void +ShipEngineSDK.Model.DangerousGoods.Quantity.get -> int +ShipEngineSDK.Model.DangerousGoods.Quantity.set -> void +ShipEngineSDK.Model.DangerousGoods.Radioactive.get -> bool? +ShipEngineSDK.Model.DangerousGoods.Radioactive.set -> void +ShipEngineSDK.Model.DangerousGoods.RegulationAuthority.get -> string! +ShipEngineSDK.Model.DangerousGoods.RegulationAuthority.set -> void +ShipEngineSDK.Model.DangerousGoods.RegulationLevel.get -> ShipEngineSDK.Model.RegulationLevel? +ShipEngineSDK.Model.DangerousGoods.RegulationLevel.set -> void +ShipEngineSDK.Model.DangerousGoods.ReportableQuantity.get -> bool? +ShipEngineSDK.Model.DangerousGoods.ReportableQuantity.set -> void +ShipEngineSDK.Model.DangerousGoods.ShippingName.get -> string! +ShipEngineSDK.Model.DangerousGoods.ShippingName.set -> void +ShipEngineSDK.Model.DangerousGoods.TechnicalName.get -> string! +ShipEngineSDK.Model.DangerousGoods.TechnicalName.set -> void +ShipEngineSDK.Model.DangerousGoods.TransportCategory.get -> string! +ShipEngineSDK.Model.DangerousGoods.TransportCategory.set -> void +ShipEngineSDK.Model.DangerousGoods.TransportMean.get -> ShipEngineSDK.Model.TransportMean? +ShipEngineSDK.Model.DangerousGoods.TransportMean.set -> void +ShipEngineSDK.Model.DangerousGoods.TunnelCode.get -> string! +ShipEngineSDK.Model.DangerousGoods.TunnelCode.set -> void +ShipEngineSDK.Model.DefaultLabelLayout +ShipEngineSDK.Model.DefaultLabelLayout.DefaultLabelLayout(string! value) -> void +ShipEngineSDK.Model.DeletePickupByIdResponseBody +ShipEngineSDK.Model.DeletePickupByIdResponseBody.DeletePickupByIdResponseBody() -> void +ShipEngineSDK.Model.DeletePickupByIdResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.DeletePickupByIdResponseBody.Errors.set -> void +ShipEngineSDK.Model.DeletePickupByIdResponseBody.PickupId.get -> string! +ShipEngineSDK.Model.DeletePickupByIdResponseBody.PickupId.set -> void +ShipEngineSDK.Model.DeletePickupByIdResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.DeletePickupByIdResponseBody.RequestId.set -> void +ShipEngineSDK.Model.DeleteScheduledPickupResponseBody +ShipEngineSDK.Model.DeleteScheduledPickupResponseBody.DeleteScheduledPickupResponseBody() -> void +ShipEngineSDK.Model.DeleteScheduledPickupResponseBody.PickupId.get -> string! +ShipEngineSDK.Model.DeleteScheduledPickupResponseBody.PickupId.set -> void +ShipEngineSDK.Model.DeliveryConfirmation +ShipEngineSDK.Model.DeliveryConfirmation.DeliveryConfirmation(string! value) -> void +ShipEngineSDK.Model.DeprecatedManifest +ShipEngineSDK.Model.DeprecatedManifest.CarrierId.get -> string! +ShipEngineSDK.Model.DeprecatedManifest.CarrierId.set -> void +ShipEngineSDK.Model.DeprecatedManifest.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.DeprecatedManifest.CreatedAt.set -> void +ShipEngineSDK.Model.DeprecatedManifest.DeprecatedManifest() -> void +ShipEngineSDK.Model.DeprecatedManifest.FormId.get -> string! +ShipEngineSDK.Model.DeprecatedManifest.FormId.set -> void +ShipEngineSDK.Model.DeprecatedManifest.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.DeprecatedManifest.LabelIds.set -> void +ShipEngineSDK.Model.DeprecatedManifest.ManifestDownload.get -> ShipEngineSDK.Model.ManifestDownload! +ShipEngineSDK.Model.DeprecatedManifest.ManifestDownload.set -> void +ShipEngineSDK.Model.DeprecatedManifest.ManifestId.get -> string! +ShipEngineSDK.Model.DeprecatedManifest.ManifestId.set -> void +ShipEngineSDK.Model.DeprecatedManifest.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.DeprecatedManifest.ShipDate.set -> void +ShipEngineSDK.Model.DeprecatedManifest.Shipments.get -> int +ShipEngineSDK.Model.DeprecatedManifest.Shipments.set -> void +ShipEngineSDK.Model.DeprecatedManifest.SubmissionId.get -> string! +ShipEngineSDK.Model.DeprecatedManifest.SubmissionId.set -> void +ShipEngineSDK.Model.DeprecatedManifest.WarehouseId.get -> string! +ShipEngineSDK.Model.DeprecatedManifest.WarehouseId.set -> void +ShipEngineSDK.Model.DhlExpressAccountSettings +ShipEngineSDK.Model.DhlExpressAccountSettings.DhlExpressAccountSettings() -> void +ShipEngineSDK.Model.DhlExpressAccountSettings.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.DhlExpressAccountSettings.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.DhlExpressAccountSettings.Nickname.get -> string! +ShipEngineSDK.Model.DhlExpressAccountSettings.Nickname.set -> void +ShipEngineSDK.Model.DhlExpressAccountSettings.ShouldHideAccountNumberOnArchiveDoc.get -> bool +ShipEngineSDK.Model.DhlExpressAccountSettings.ShouldHideAccountNumberOnArchiveDoc.set -> void +ShipEngineSDK.Model.DhlExpressSettingsResponseBody +ShipEngineSDK.Model.DhlExpressSettingsResponseBody.DhlExpressSettingsResponseBody() -> void +ShipEngineSDK.Model.DhlExpressSettingsResponseBody.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.DhlExpressSettingsResponseBody.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.DhlExpressSettingsResponseBody.Nickname.get -> string! +ShipEngineSDK.Model.DhlExpressSettingsResponseBody.Nickname.set -> void +ShipEngineSDK.Model.DhlExpressSettingsResponseBody.ShouldHideAccountNumberOnArchiveDoc.get -> bool +ShipEngineSDK.Model.DhlExpressSettingsResponseBody.ShouldHideAccountNumberOnArchiveDoc.set -> void +ShipEngineSDK.Model.Dimensions +ShipEngineSDK.Model.Dimensions.Dimensions() -> void +ShipEngineSDK.Model.Dimensions.Height.get -> double +ShipEngineSDK.Model.Dimensions.Height.set -> void +ShipEngineSDK.Model.Dimensions.Length.get -> double +ShipEngineSDK.Model.Dimensions.Length.set -> void +ShipEngineSDK.Model.Dimensions.Unit.get -> ShipEngineSDK.Model.DimensionUnit! +ShipEngineSDK.Model.Dimensions.Unit.set -> void +ShipEngineSDK.Model.Dimensions.Width.get -> double +ShipEngineSDK.Model.Dimensions.Width.set -> void +ShipEngineSDK.Model.DimensionUnit +ShipEngineSDK.Model.DimensionUnit.DimensionUnit(string! value) -> void +ShipEngineSDK.Model.DisplayScheme +ShipEngineSDK.Model.DisplayScheme.DisplayScheme(string! value) -> void +ShipEngineSDK.Model.Error +ShipEngineSDK.Model.Error.Error() -> void +ShipEngineSDK.Model.Error.ErrorCode.get -> ShipEngineSDK.Model.ErrorCode! +ShipEngineSDK.Model.Error.ErrorCode.set -> void +ShipEngineSDK.Model.Error.ErrorSource.get -> ShipEngineSDK.Model.ErrorSource! +ShipEngineSDK.Model.Error.ErrorSource.set -> void +ShipEngineSDK.Model.Error.ErrorType.get -> ShipEngineSDK.Model.ErrorType! +ShipEngineSDK.Model.Error.ErrorType.set -> void +ShipEngineSDK.Model.Error.Message.get -> string! +ShipEngineSDK.Model.Error.Message.set -> void +ShipEngineSDK.Model.ErrorCode +ShipEngineSDK.Model.ErrorCode.ErrorCode(string! value) -> void +ShipEngineSDK.Model.ErrorResponseBody +ShipEngineSDK.Model.ErrorResponseBody.ErrorResponseBody() -> void +ShipEngineSDK.Model.ErrorResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ErrorResponseBody.Errors.set -> void +ShipEngineSDK.Model.ErrorResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.ErrorResponseBody.RequestId.set -> void +ShipEngineSDK.Model.ErrorSource +ShipEngineSDK.Model.ErrorSource.ErrorSource(string! value) -> void +ShipEngineSDK.Model.ErrorType +ShipEngineSDK.Model.ErrorType.ErrorType(string! value) -> void +ShipEngineSDK.Model.ErrorWithLabelIdResponseBody +ShipEngineSDK.Model.ErrorWithLabelIdResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ErrorWithLabelIdResponseBody.Errors.set -> void +ShipEngineSDK.Model.ErrorWithLabelIdResponseBody.ErrorWithLabelIdResponseBody() -> void +ShipEngineSDK.Model.ErrorWithLabelIdResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.ErrorWithLabelIdResponseBody.RequestId.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody +ShipEngineSDK.Model.EstimateRatesRequestBody.AddressResidentialIndicator.get -> ShipEngineSDK.Model.AddressResidentialIndicator? +ShipEngineSDK.Model.EstimateRatesRequestBody.AddressResidentialIndicator.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation? +ShipEngineSDK.Model.EstimateRatesRequestBody.Confirmation.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.EstimateRatesRequestBody.Dimensions.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.EstimateRatesRequestBody(ShipEngineSDK.Model.RateEstimateByCarrierId! actualInstance) -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.EstimateRatesRequestBody(ShipEngineSDK.Model.RateEstimateByCarrierIds! actualInstance) -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.FromCityLocality.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.FromCityLocality.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.FromCountryCode.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.FromCountryCode.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.FromPostalCode.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.FromPostalCode.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.FromStateProvince.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.FromStateProvince.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.GetRateEstimateByCarrierId() -> ShipEngineSDK.Model.RateEstimateByCarrierId! +ShipEngineSDK.Model.EstimateRatesRequestBody.GetRateEstimateByCarrierIds() -> ShipEngineSDK.Model.RateEstimateByCarrierIds! +ShipEngineSDK.Model.EstimateRatesRequestBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.EstimateRatesRequestBody.ShipDate.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.ToCityLocality.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.ToCityLocality.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.ToCountryCode.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.ToCountryCode.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.ToPostalCode.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.ToPostalCode.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.ToStateProvince.get -> string! +ShipEngineSDK.Model.EstimateRatesRequestBody.ToStateProvince.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBody.Weight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.EstimateRatesRequestBody.Weight.set -> void +ShipEngineSDK.Model.EstimateRatesRequestBodyJsonConverter +ShipEngineSDK.Model.EstimateRatesRequestBodyJsonConverter.EstimateRatesRequestBodyJsonConverter() -> void +ShipEngineSDK.Model.FedexAccountSettings +ShipEngineSDK.Model.FedexAccountSettings.FedexAccountSettings() -> void +ShipEngineSDK.Model.FedexAccountSettings.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.FedexAccountSettings.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.FedexAccountSettings.LetterheadImage.get -> string! +ShipEngineSDK.Model.FedexAccountSettings.LetterheadImage.set -> void +ShipEngineSDK.Model.FedexAccountSettings.Nickname.get -> string! +ShipEngineSDK.Model.FedexAccountSettings.Nickname.set -> void +ShipEngineSDK.Model.FedexAccountSettings.PickupType.get -> ShipEngineSDK.Model.FedexPickupType? +ShipEngineSDK.Model.FedexAccountSettings.PickupType.set -> void +ShipEngineSDK.Model.FedexAccountSettings.SignatureImage.get -> string! +ShipEngineSDK.Model.FedexAccountSettings.SignatureImage.set -> void +ShipEngineSDK.Model.FedexAccountSettings.SmartPostEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.FedexAccountSettings.SmartPostEndorsement.set -> void +ShipEngineSDK.Model.FedexAccountSettings.SmartPostHub.get -> ShipEngineSDK.Model.SmartPostHub? +ShipEngineSDK.Model.FedexAccountSettings.SmartPostHub.set -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.FedexAccountSettingsRequestBody() -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.LetterheadImage.get -> string! +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.LetterheadImage.set -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.Nickname.set -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.PickupType.get -> ShipEngineSDK.Model.FedexPickupType? +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.PickupType.set -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.SignatureImage.get -> string! +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.SignatureImage.set -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.SmartPostEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.SmartPostEndorsement.set -> void +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.SmartPostHub.get -> ShipEngineSDK.Model.SmartPostHub? +ShipEngineSDK.Model.FedexAccountSettingsRequestBody.SmartPostHub.set -> void +ShipEngineSDK.Model.FedexPickupType +ShipEngineSDK.Model.FedexPickupType.FedexPickupType(string! value) -> void +ShipEngineSDK.Model.FedexSettingsResponseBody +ShipEngineSDK.Model.FedexSettingsResponseBody.FedexSettingsResponseBody() -> void +ShipEngineSDK.Model.FedexSettingsResponseBody.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.FedexSettingsResponseBody.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.FedexSettingsResponseBody.LetterheadImage.get -> string! +ShipEngineSDK.Model.FedexSettingsResponseBody.LetterheadImage.set -> void +ShipEngineSDK.Model.FedexSettingsResponseBody.Nickname.get -> string! +ShipEngineSDK.Model.FedexSettingsResponseBody.Nickname.set -> void +ShipEngineSDK.Model.FedexSettingsResponseBody.PickupType.get -> ShipEngineSDK.Model.FedexPickupType? +ShipEngineSDK.Model.FedexSettingsResponseBody.PickupType.set -> void +ShipEngineSDK.Model.FedexSettingsResponseBody.SignatureImage.get -> string! +ShipEngineSDK.Model.FedexSettingsResponseBody.SignatureImage.set -> void +ShipEngineSDK.Model.FedexSettingsResponseBody.SmartPostEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.FedexSettingsResponseBody.SmartPostEndorsement.set -> void +ShipEngineSDK.Model.FedexSettingsResponseBody.SmartPostHub.get -> ShipEngineSDK.Model.SmartPostHub? +ShipEngineSDK.Model.FedexSettingsResponseBody.SmartPostHub.set -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.GetAccountSettingsImagesResponseBody() -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentType.get -> ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum? +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentType.set -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum.ImageContentTypeEnum(string! value) -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageData.get -> string! +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageData.set -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.IsDefault.get -> bool +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.IsDefault.set -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.LabelImageId.get -> string! +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.LabelImageId.set -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ModifiedAt.set -> void +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.Name.get -> string! +ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.Name.set -> void +ShipEngineSDK.Model.GetAccountSettingsResponseBody +ShipEngineSDK.Model.GetAccountSettingsResponseBody.DefaultLabelLayout.get -> ShipEngineSDK.Model.DefaultLabelLayout? +ShipEngineSDK.Model.GetAccountSettingsResponseBody.DefaultLabelLayout.set -> void +ShipEngineSDK.Model.GetAccountSettingsResponseBody.GetAccountSettingsResponseBody() -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchErrorsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchErrorsUrl.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchId.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchLabelsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchLabelsUrl.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchNotes.get -> string! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchNotes.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchNumber.get -> string! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchNumber.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchShipmentsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.BatchShipmentsUrl.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Completed.get -> int +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Completed.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Count.get -> int +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Count.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Errors.get -> int +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Errors.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ExternalBatchId.get -> string! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ExternalBatchId.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.FormDownload.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Forms.get -> int +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Forms.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.GetBatchByExternalIdResponseBody() -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ProcessedAt.get -> System.DateTime +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ProcessedAt.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ProcessErrors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ProcessErrors.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Status.get -> ShipEngineSDK.Model.BatchStatus! +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Status.set -> void +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Warnings.get -> int +ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.Warnings.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchErrorsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchErrorsUrl.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchId.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchLabelsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchLabelsUrl.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchNotes.get -> string! +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchNotes.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchNumber.get -> string! +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchNumber.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchShipmentsUrl.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByIdResponseBody.BatchShipmentsUrl.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.Completed.get -> int +ShipEngineSDK.Model.GetBatchByIdResponseBody.Completed.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.Count.get -> int +ShipEngineSDK.Model.GetBatchByIdResponseBody.Count.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetBatchByIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.Errors.get -> int +ShipEngineSDK.Model.GetBatchByIdResponseBody.Errors.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.ExternalBatchId.get -> string! +ShipEngineSDK.Model.GetBatchByIdResponseBody.ExternalBatchId.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.FormDownload.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.GetBatchByIdResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.Forms.get -> int +ShipEngineSDK.Model.GetBatchByIdResponseBody.Forms.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.GetBatchByIdResponseBody() -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.GetBatchByIdResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat! +ShipEngineSDK.Model.GetBatchByIdResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout! +ShipEngineSDK.Model.GetBatchByIdResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.GetBatchByIdResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.ProcessedAt.get -> System.DateTime +ShipEngineSDK.Model.GetBatchByIdResponseBody.ProcessedAt.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.ProcessErrors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetBatchByIdResponseBody.ProcessErrors.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.Status.get -> ShipEngineSDK.Model.BatchStatus! +ShipEngineSDK.Model.GetBatchByIdResponseBody.Status.set -> void +ShipEngineSDK.Model.GetBatchByIdResponseBody.Warnings.get -> int +ShipEngineSDK.Model.GetBatchByIdResponseBody.Warnings.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody +ShipEngineSDK.Model.GetCarrierByIdResponseBody.AccountNumber.get -> string! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.AccountNumber.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Balance.get -> double +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Balance.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.DisabledByBillingPlan.get -> bool +ShipEngineSDK.Model.GetCarrierByIdResponseBody.DisabledByBillingPlan.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.FriendlyName.get -> string! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.FriendlyName.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.GetCarrierByIdResponseBody() -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.HasMultiPackageSupportingServices.get -> bool +ShipEngineSDK.Model.GetCarrierByIdResponseBody.HasMultiPackageSupportingServices.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Nickname.get -> string! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Nickname.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Options.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Options.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Packages.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Primary.get -> bool +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Primary.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.RequiresFundedAmount.get -> bool +ShipEngineSDK.Model.GetCarrierByIdResponseBody.RequiresFundedAmount.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Services.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetCarrierByIdResponseBody.Services.set -> void +ShipEngineSDK.Model.GetCarrierByIdResponseBody.SupportsLabelMessages.get -> bool +ShipEngineSDK.Model.GetCarrierByIdResponseBody.SupportsLabelMessages.set -> void +ShipEngineSDK.Model.GetCarrierOptionsResponseBody +ShipEngineSDK.Model.GetCarrierOptionsResponseBody.GetCarrierOptionsResponseBody() -> void +ShipEngineSDK.Model.GetCarrierOptionsResponseBody.Options.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetCarrierOptionsResponseBody.Options.set -> void +ShipEngineSDK.Model.GetCarrierSettingsResponseBody +ShipEngineSDK.Model.GetCarrierSettingsResponseBody.GetCarrierSettingsResponseBody(ShipEngineSDK.Model.DhlExpressSettingsResponseBody! actualInstance) -> void +ShipEngineSDK.Model.GetCarrierSettingsResponseBody.GetCarrierSettingsResponseBody(ShipEngineSDK.Model.FedexSettingsResponseBody! actualInstance) -> void +ShipEngineSDK.Model.GetCarrierSettingsResponseBody.GetCarrierSettingsResponseBody(ShipEngineSDK.Model.UpsSettingsResponseBody! actualInstance) -> void +ShipEngineSDK.Model.GetCarrierSettingsResponseBody.GetDhlExpressSettingsResponseBody() -> ShipEngineSDK.Model.DhlExpressSettingsResponseBody! +ShipEngineSDK.Model.GetCarrierSettingsResponseBody.GetFedexSettingsResponseBody() -> ShipEngineSDK.Model.FedexSettingsResponseBody! +ShipEngineSDK.Model.GetCarrierSettingsResponseBody.GetUpsSettingsResponseBody() -> ShipEngineSDK.Model.UpsSettingsResponseBody! +ShipEngineSDK.Model.GetCarrierSettingsResponseBodyJsonConverter +ShipEngineSDK.Model.GetCarrierSettingsResponseBodyJsonConverter.GetCarrierSettingsResponseBodyJsonConverter() -> void +ShipEngineSDK.Model.GetCarriersResponseBody +ShipEngineSDK.Model.GetCarriersResponseBody.Carriers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetCarriersResponseBody.Carriers.set -> void +ShipEngineSDK.Model.GetCarriersResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetCarriersResponseBody.Errors.set -> void +ShipEngineSDK.Model.GetCarriersResponseBody.GetCarriersResponseBody() -> void +ShipEngineSDK.Model.GetCarriersResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.GetCarriersResponseBody.RequestId.set -> void +ShipEngineSDK.Model.GetInsuranceBalanceResponseBody +ShipEngineSDK.Model.GetInsuranceBalanceResponseBody.Amount.get -> double +ShipEngineSDK.Model.GetInsuranceBalanceResponseBody.Amount.set -> void +ShipEngineSDK.Model.GetInsuranceBalanceResponseBody.Currency.get -> string! +ShipEngineSDK.Model.GetInsuranceBalanceResponseBody.Currency.set -> void +ShipEngineSDK.Model.GetInsuranceBalanceResponseBody.GetInsuranceBalanceResponseBody() -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.BatchId.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ChargeEvent.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.DisplayScheme.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.GetLabelByExternalShipmentIdResponseBody() -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.InsuranceClaim.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.InsuranceCost.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.IsInternational.get -> bool +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.IsInternational.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.IsReturnLabel.get -> bool +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.IsReturnLabel.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelId.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelId.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelImageId.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelImageId.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.OutboundLabelId.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.OutboundLabelId.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Packages.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.RmaNumber.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.RmaNumber.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Shipment.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ShipmentCost.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Status.get -> ShipEngineSDK.Model.LabelStatus? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Status.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TestLabel.get -> bool +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TestLabel.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Trackable.get -> bool +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Trackable.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TrackingStatus.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ValidateAddress.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Voided.get -> bool +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.Voided.set -> void +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.VoidedAt.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody +ShipEngineSDK.Model.GetLabelByIdResponseBody.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetLabelByIdResponseBody.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.BatchId.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.BatchId.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.GetLabelByIdResponseBody.ChargeEvent.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetLabelByIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.GetLabelByIdResponseBody.DisplayScheme.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.GetLabelByIdResponseBody.FormDownload.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.GetLabelByIdResponseBody() -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.GetLabelByIdResponseBody.InsuranceClaim.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetLabelByIdResponseBody.InsuranceCost.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.IsInternational.get -> bool +ShipEngineSDK.Model.GetLabelByIdResponseBody.IsInternational.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.IsReturnLabel.get -> bool +ShipEngineSDK.Model.GetLabelByIdResponseBody.IsReturnLabel.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelDownload.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelDownloadType.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelFormat.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelId.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelId.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelImageId.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelImageId.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.GetLabelByIdResponseBody.LabelLayout.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.OutboundLabelId.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.OutboundLabelId.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetLabelByIdResponseBody.Packages.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.GetLabelByIdResponseBody.PaperlessDownload.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetLabelByIdResponseBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.RmaNumber.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.RmaNumber.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetLabelByIdResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.GetLabelByIdResponseBody.Shipment.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetLabelByIdResponseBody.ShipmentCost.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.Status.get -> ShipEngineSDK.Model.LabelStatus? +ShipEngineSDK.Model.GetLabelByIdResponseBody.Status.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.TestLabel.get -> bool +ShipEngineSDK.Model.GetLabelByIdResponseBody.TestLabel.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.Trackable.get -> bool +ShipEngineSDK.Model.GetLabelByIdResponseBody.Trackable.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus? +ShipEngineSDK.Model.GetLabelByIdResponseBody.TrackingStatus.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.GetLabelByIdResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.GetLabelByIdResponseBody.ValidateAddress.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.Voided.get -> bool +ShipEngineSDK.Model.GetLabelByIdResponseBody.Voided.set -> void +ShipEngineSDK.Model.GetLabelByIdResponseBody.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.GetLabelByIdResponseBody.VoidedAt.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody +ShipEngineSDK.Model.GetManifestByIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetManifestByIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetManifestByIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.FormId.get -> string! +ShipEngineSDK.Model.GetManifestByIdResponseBody.FormId.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.GetManifestByIdResponseBody() -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetManifestByIdResponseBody.LabelIds.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.ManifestDownload.get -> ShipEngineSDK.Model.ManifestDownload! +ShipEngineSDK.Model.GetManifestByIdResponseBody.ManifestDownload.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.ManifestId.get -> string! +ShipEngineSDK.Model.GetManifestByIdResponseBody.ManifestId.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetManifestByIdResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.Shipments.get -> int +ShipEngineSDK.Model.GetManifestByIdResponseBody.Shipments.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.SubmissionId.get -> string! +ShipEngineSDK.Model.GetManifestByIdResponseBody.SubmissionId.set -> void +ShipEngineSDK.Model.GetManifestByIdResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.GetManifestByIdResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.Description.get -> string! +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.Description.set -> void +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.Dimensions.set -> void +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.GetPackageTypeByIdResponseBody() -> void +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.Name.get -> string! +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.Name.set -> void +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.PackageCode.get -> string! +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.PackageCode.set -> void +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.PackageId.get -> string! +ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.PackageId.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody +ShipEngineSDK.Model.GetPickupByIdResponseBody.CancelledAt.get -> System.DateTime +ShipEngineSDK.Model.GetPickupByIdResponseBody.CancelledAt.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetPickupByIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.ConfirmationNumber.get -> string! +ShipEngineSDK.Model.GetPickupByIdResponseBody.ConfirmationNumber.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.ContactDetails.get -> ShipEngineSDK.Model.ContactDetails! +ShipEngineSDK.Model.GetPickupByIdResponseBody.ContactDetails.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetPickupByIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetPickupByIdResponseBody.Errors.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.GetPickupByIdResponseBody() -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetPickupByIdResponseBody.LabelIds.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupAddress.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupId.get -> string! +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupId.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupNotes.get -> string! +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupNotes.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupWindow.get -> ShipEngineSDK.Model.PickupWindow! +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupWindow.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupWindows.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetPickupByIdResponseBody.PickupWindows.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.GetPickupByIdResponseBody.RequestId.set -> void +ShipEngineSDK.Model.GetPickupByIdResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.GetPickupByIdResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.GetPickupsResponseBody +ShipEngineSDK.Model.GetPickupsResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetPickupsResponseBody.Errors.set -> void +ShipEngineSDK.Model.GetPickupsResponseBody.GetPickupsResponseBody() -> void +ShipEngineSDK.Model.GetPickupsResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.GetPickupsResponseBody.Links.set -> void +ShipEngineSDK.Model.GetPickupsResponseBody.Page.get -> int +ShipEngineSDK.Model.GetPickupsResponseBody.Page.set -> void +ShipEngineSDK.Model.GetPickupsResponseBody.Pages.get -> int +ShipEngineSDK.Model.GetPickupsResponseBody.Pages.set -> void +ShipEngineSDK.Model.GetPickupsResponseBody.Pickups.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetPickupsResponseBody.Pickups.set -> void +ShipEngineSDK.Model.GetPickupsResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.GetPickupsResponseBody.RequestId.set -> void +ShipEngineSDK.Model.GetPickupsResponseBody.Total.get -> long +ShipEngineSDK.Model.GetPickupsResponseBody.Total.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierDeliveryDays.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierDeliveryDays.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierFriendlyName.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierFriendlyName.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierNickname.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.CarrierNickname.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.ConfirmationAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetRateByIdResponseBody.ConfirmationAmount.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.DeliveryDays.get -> int +ShipEngineSDK.Model.GetRateByIdResponseBody.DeliveryDays.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.ErrorMessages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetRateByIdResponseBody.ErrorMessages.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.EstimatedDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.GetRateByIdResponseBody.EstimatedDeliveryDate.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.GetRateByIdResponseBody() -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.GuaranteedService.get -> bool +ShipEngineSDK.Model.GetRateByIdResponseBody.GuaranteedService.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.InsuranceAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetRateByIdResponseBody.InsuranceAmount.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.NegotiatedRate.get -> bool +ShipEngineSDK.Model.GetRateByIdResponseBody.NegotiatedRate.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.OtherAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetRateByIdResponseBody.OtherAmount.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.PackageType.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.PackageType.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.RateId.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.RateId.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.RateType.get -> ShipEngineSDK.Model.RateType! +ShipEngineSDK.Model.GetRateByIdResponseBody.RateType.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetRateByIdResponseBody.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.ServiceType.get -> string! +ShipEngineSDK.Model.GetRateByIdResponseBody.ServiceType.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetRateByIdResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.ShippingAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetRateByIdResponseBody.ShippingAmount.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.TaxAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.GetRateByIdResponseBody.TaxAmount.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.Trackable.get -> bool +ShipEngineSDK.Model.GetRateByIdResponseBody.Trackable.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.ValidationStatus.get -> ShipEngineSDK.Model.ValidationStatus! +ShipEngineSDK.Model.GetRateByIdResponseBody.ValidationStatus.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.WarningMessages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetRateByIdResponseBody.WarningMessages.set -> void +ShipEngineSDK.Model.GetRateByIdResponseBody.Zone.get -> int? +ShipEngineSDK.Model.GetRateByIdResponseBody.Zone.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBody +ShipEngineSDK.Model.GetServicePointByIdResponseBody.GetServicePointByIdResponseBody() -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBody.ServicePoint.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint! +ShipEngineSDK.Model.GetServicePointByIdResponseBody.ServicePoint.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.AddressLine1.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.AddressLine1.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CarrierCode.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CarrierCode.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CityLocality.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CityLocality.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CompanyName.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CompanyName.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CountryCode.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.CountryCode.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Features.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Features.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum.FeaturesEnum(string! value) -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.GetServicePointByIdResponseBodyServicePoint() -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.HoursOfOperation.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.HoursOfOperation.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Lat.get -> double +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Lat.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Long.get -> double +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Long.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.PhoneNumber.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.PhoneNumber.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.PostalCode.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.PostalCode.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.ServiceCodes.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.ServiceCodes.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.ServicePointId.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.ServicePointId.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.StateProvince.get -> string! +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.StateProvince.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Type.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum? +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.Type.set -> void +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum +ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum.TypeEnum(string! value) -> void +ShipEngineSDK.Model.GetServicePointsRequest +ShipEngineSDK.Model.GetServicePointsRequest.GetGetServicePointsRequestBody() -> ShipEngineSDK.Model.GetServicePointsRequestBody! +ShipEngineSDK.Model.GetServicePointsRequest.GetServicePointsRequest(ShipEngineSDK.Model.GetServicePointsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.GetServicePointsRequestBody +ShipEngineSDK.Model.GetServicePointsRequestBody.Address.get -> ShipEngineSDK.Model.GetServicePointsRequestBodyAddress! +ShipEngineSDK.Model.GetServicePointsRequestBody.Address.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.AddressQuery.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBody.AddressQuery.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.GetServicePointsRequestBody() -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.Lat.get -> double +ShipEngineSDK.Model.GetServicePointsRequestBody.Lat.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.Long.get -> double +ShipEngineSDK.Model.GetServicePointsRequestBody.Long.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.MaxResults.get -> int +ShipEngineSDK.Model.GetServicePointsRequestBody.MaxResults.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.Providers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetServicePointsRequestBody.Providers.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.Radius.get -> int +ShipEngineSDK.Model.GetServicePointsRequestBody.Radius.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBody.Shipment.get -> ShipEngineSDK.Model.GetServicePointsRequestBodyShipment! +ShipEngineSDK.Model.GetServicePointsRequestBody.Shipment.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.AddressLine1.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.AddressLine1.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.AddressLine2.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.AddressLine2.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.AddressLine3.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.AddressLine3.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.CityLocality.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.CityLocality.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.CountryCode.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.CountryCode.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.GetServicePointsRequestBodyAddress() -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.PostalCode.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.PostalCode.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.StateProvince.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.StateProvince.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner +ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner.CarrierId.get -> string! +ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner.CarrierId.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner.GetServicePointsRequestBodyProvidersInner() -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner.ServiceCode.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner.ServiceCode.set -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyShipment +ShipEngineSDK.Model.GetServicePointsRequestBodyShipment.GetServicePointsRequestBodyShipment() -> void +ShipEngineSDK.Model.GetServicePointsRequestBodyShipment.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.GetServicePointsRequestBodyShipment.TotalWeight.set -> void +ShipEngineSDK.Model.GetServicePointsRequestJsonConverter +ShipEngineSDK.Model.GetServicePointsRequestJsonConverter.GetServicePointsRequestJsonConverter() -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.AdvancedOptions.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ComparisonRateType.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ComparisonRateType.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Confirmation.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Customs.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ExternalOrderId.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ExternalOrderId.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ExternalShipmentId.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.GetShipmentByExternalIdResponseBody() -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.InsuranceProvider.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.IsReturn.get -> bool? +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.IsReturn.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Items.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ModifiedAt.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.OrderSourceCode.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Packages.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ReturnTo.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipFrom.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipmentNumber.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipmentNumber.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipmentStatus.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShippingRuleId.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShippingRuleId.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ShipTo.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.Tags.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.TaxIdentifiers.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.TotalWeight.set -> void +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody +ShipEngineSDK.Model.GetShipmentByIdResponseBody.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.AdvancedOptions.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ComparisonRateType.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ComparisonRateType.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Confirmation.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetShipmentByIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Customs.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ExternalOrderId.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ExternalOrderId.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ExternalShipmentId.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.GetShipmentByIdResponseBody() -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.InsuranceProvider.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.IsReturn.get -> bool? +ShipEngineSDK.Model.GetShipmentByIdResponseBody.IsReturn.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Items.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ModifiedAt.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.GetShipmentByIdResponseBody.OrderSourceCode.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Packages.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ReturnTo.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipFrom.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipmentNumber.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipmentNumber.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipmentStatus.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShippingRuleId.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShippingRuleId.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.ShipTo.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.Tags.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.TaxIdentifiers.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.TotalWeight.set -> void +ShipEngineSDK.Model.GetShipmentByIdResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.GetShipmentByIdResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ActualDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ActualDeliveryDate.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierDetailCode.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierDetailCode.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierStatusCode.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierStatusCode.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierStatusDescription.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.CarrierStatusDescription.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.EstimatedDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.EstimatedDeliveryDate.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.Events.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.Events.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ExceptionDescription.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ExceptionDescription.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.GetTrackingLogFromLabelResponseBody() -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.StatusCode.get -> ShipEngineSDK.Model.StatusCode! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.StatusCode.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.StatusDescription.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.StatusDescription.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody +ShipEngineSDK.Model.GetTrackingLogResponseBody.ActualDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.GetTrackingLogResponseBody.ActualDeliveryDate.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierCode.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierCode.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierDetailCode.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierDetailCode.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierStatusCode.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierStatusCode.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierStatusDescription.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.CarrierStatusDescription.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.EstimatedDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.GetTrackingLogResponseBody.EstimatedDeliveryDate.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.Events.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetTrackingLogResponseBody.Events.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.ExceptionDescription.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.ExceptionDescription.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.GetTrackingLogResponseBody() -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.GetTrackingLogResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.StatusCode.get -> ShipEngineSDK.Model.StatusCode! +ShipEngineSDK.Model.GetTrackingLogResponseBody.StatusCode.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.StatusDescription.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.StatusDescription.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.TrackingNumber.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.TrackingNumber.set -> void +ShipEngineSDK.Model.GetTrackingLogResponseBody.TrackingUrl.get -> string! +ShipEngineSDK.Model.GetTrackingLogResponseBody.TrackingUrl.set -> void +ShipEngineSDK.Model.GetWarehouseByIdResponseBody +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.GetWarehouseByIdResponseBody() -> void +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.IsDefault.get -> bool? +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.IsDefault.set -> void +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.Name.get -> string! +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.Name.set -> void +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.OriginAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.OriginAddress.set -> void +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.ReturnAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.ReturnAddress.set -> void +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.GetWarehouseByIdResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.GetWebhookByIdResponseBody +ShipEngineSDK.Model.GetWebhookByIdResponseBody.Event.get -> ShipEngineSDK.Model.WebhookEvent! +ShipEngineSDK.Model.GetWebhookByIdResponseBody.Event.set -> void +ShipEngineSDK.Model.GetWebhookByIdResponseBody.GetWebhookByIdResponseBody() -> void +ShipEngineSDK.Model.GetWebhookByIdResponseBody.Headers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.GetWebhookByIdResponseBody.Headers.set -> void +ShipEngineSDK.Model.GetWebhookByIdResponseBody.Url.get -> string! +ShipEngineSDK.Model.GetWebhookByIdResponseBody.Url.set -> void +ShipEngineSDK.Model.GetWebhookByIdResponseBody.WebhookId.get -> string! +ShipEngineSDK.Model.GetWebhookByIdResponseBody.WebhookId.set -> void +ShipEngineSDK.Model.IdentifierType +ShipEngineSDK.Model.IdentifierType.IdentifierType(string! value) -> void +ShipEngineSDK.Model.ImporterOfRecords +ShipEngineSDK.Model.ImporterOfRecords.AddressLine1.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.AddressLine1.set -> void +ShipEngineSDK.Model.ImporterOfRecords.AddressLine2.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.AddressLine2.set -> void +ShipEngineSDK.Model.ImporterOfRecords.AddressLine3.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.AddressLine3.set -> void +ShipEngineSDK.Model.ImporterOfRecords.CityLocality.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.CityLocality.set -> void +ShipEngineSDK.Model.ImporterOfRecords.CompanyName.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.CompanyName.set -> void +ShipEngineSDK.Model.ImporterOfRecords.CountryCode.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.CountryCode.set -> void +ShipEngineSDK.Model.ImporterOfRecords.Email.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.Email.set -> void +ShipEngineSDK.Model.ImporterOfRecords.ImporterOfRecords() -> void +ShipEngineSDK.Model.ImporterOfRecords.Name.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.Name.set -> void +ShipEngineSDK.Model.ImporterOfRecords.Phone.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.Phone.set -> void +ShipEngineSDK.Model.ImporterOfRecords.PostalCode.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.PostalCode.set -> void +ShipEngineSDK.Model.ImporterOfRecords.StateProvince.get -> string! +ShipEngineSDK.Model.ImporterOfRecords.StateProvince.set -> void +ShipEngineSDK.Model.InsuranceProvider +ShipEngineSDK.Model.InsuranceProvider.InsuranceProvider(string! value) -> void +ShipEngineSDK.Model.InternationalShipmentOptions +ShipEngineSDK.Model.InternationalShipmentOptions.Contents.get -> ShipEngineSDK.Model.PackageContents! +ShipEngineSDK.Model.InternationalShipmentOptions.Contents.set -> void +ShipEngineSDK.Model.InternationalShipmentOptions.ContentsExplanation.get -> string! +ShipEngineSDK.Model.InternationalShipmentOptions.ContentsExplanation.set -> void +ShipEngineSDK.Model.InternationalShipmentOptions.CustomsItems.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.InternationalShipmentOptions.CustomsItems.set -> void +ShipEngineSDK.Model.InternationalShipmentOptions.Declaration.get -> string! +ShipEngineSDK.Model.InternationalShipmentOptions.Declaration.set -> void +ShipEngineSDK.Model.InternationalShipmentOptions.ImporterOfRecord.get -> ShipEngineSDK.Model.ImporterOfRecords! +ShipEngineSDK.Model.InternationalShipmentOptions.ImporterOfRecord.set -> void +ShipEngineSDK.Model.InternationalShipmentOptions.InternationalShipmentOptions() -> void +ShipEngineSDK.Model.InternationalShipmentOptions.InvoiceAdditionalDetails.get -> ShipEngineSDK.Model.InvoiceAdditionalDetails! +ShipEngineSDK.Model.InternationalShipmentOptions.InvoiceAdditionalDetails.set -> void +ShipEngineSDK.Model.InternationalShipmentOptions.NonDelivery.get -> ShipEngineSDK.Model.NonDelivery! +ShipEngineSDK.Model.InternationalShipmentOptions.NonDelivery.set -> void +ShipEngineSDK.Model.InternationalShipmentOptions.TermsOfTradeCode.get -> ShipEngineSDK.Model.AllowedIncoterms? +ShipEngineSDK.Model.InternationalShipmentOptions.TermsOfTradeCode.set -> void +ShipEngineSDK.Model.InvoiceAdditionalDetails +ShipEngineSDK.Model.InvoiceAdditionalDetails.Discount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.InvoiceAdditionalDetails.Discount.set -> void +ShipEngineSDK.Model.InvoiceAdditionalDetails.FreightCharge.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.InvoiceAdditionalDetails.FreightCharge.set -> void +ShipEngineSDK.Model.InvoiceAdditionalDetails.InsuranceCharge.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.InvoiceAdditionalDetails.InsuranceCharge.set -> void +ShipEngineSDK.Model.InvoiceAdditionalDetails.InvoiceAdditionalDetails() -> void +ShipEngineSDK.Model.InvoiceAdditionalDetails.OtherCharge.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.InvoiceAdditionalDetails.OtherCharge.set -> void +ShipEngineSDK.Model.InvoiceAdditionalDetails.OtherChargeDescription.get -> string! +ShipEngineSDK.Model.InvoiceAdditionalDetails.OtherChargeDescription.set -> void +ShipEngineSDK.Model.Label +ShipEngineSDK.Model.Label.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Label.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.Label.BatchId.get -> string! +ShipEngineSDK.Model.Label.BatchId.set -> void +ShipEngineSDK.Model.Label.CarrierCode.get -> string! +ShipEngineSDK.Model.Label.CarrierCode.set -> void +ShipEngineSDK.Model.Label.CarrierId.get -> string! +ShipEngineSDK.Model.Label.CarrierId.set -> void +ShipEngineSDK.Model.Label.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent? +ShipEngineSDK.Model.Label.ChargeEvent.set -> void +ShipEngineSDK.Model.Label.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.Label.CreatedAt.set -> void +ShipEngineSDK.Model.Label.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.Label.DisplayScheme.set -> void +ShipEngineSDK.Model.Label.FormDownload.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.Label.FormDownload.set -> void +ShipEngineSDK.Model.Label.InsuranceClaim.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.Label.InsuranceClaim.set -> void +ShipEngineSDK.Model.Label.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Label.InsuranceCost.set -> void +ShipEngineSDK.Model.Label.IsInternational.get -> bool +ShipEngineSDK.Model.Label.IsInternational.set -> void +ShipEngineSDK.Model.Label.IsReturnLabel.get -> bool +ShipEngineSDK.Model.Label.IsReturnLabel.set -> void +ShipEngineSDK.Model.Label.Label() -> void +ShipEngineSDK.Model.Label.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.Label.LabelDownload.set -> void +ShipEngineSDK.Model.Label.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.Label.LabelDownloadType.set -> void +ShipEngineSDK.Model.Label.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.Label.LabelFormat.set -> void +ShipEngineSDK.Model.Label.LabelId.get -> string! +ShipEngineSDK.Model.Label.LabelId.set -> void +ShipEngineSDK.Model.Label.LabelImageId.get -> string! +ShipEngineSDK.Model.Label.LabelImageId.set -> void +ShipEngineSDK.Model.Label.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.Label.LabelLayout.set -> void +ShipEngineSDK.Model.Label.OutboundLabelId.get -> string! +ShipEngineSDK.Model.Label.OutboundLabelId.set -> void +ShipEngineSDK.Model.Label.PackageCode.get -> string! +ShipEngineSDK.Model.Label.PackageCode.set -> void +ShipEngineSDK.Model.Label.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Label.Packages.set -> void +ShipEngineSDK.Model.Label.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.Label.PaperlessDownload.set -> void +ShipEngineSDK.Model.Label.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Label.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.Label.RmaNumber.get -> string! +ShipEngineSDK.Model.Label.RmaNumber.set -> void +ShipEngineSDK.Model.Label.ServiceCode.get -> string! +ShipEngineSDK.Model.Label.ServiceCode.set -> void +ShipEngineSDK.Model.Label.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.Label.ShipDate.set -> void +ShipEngineSDK.Model.Label.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.Label.Shipment.set -> void +ShipEngineSDK.Model.Label.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Label.ShipmentCost.set -> void +ShipEngineSDK.Model.Label.ShipmentId.get -> string! +ShipEngineSDK.Model.Label.ShipmentId.set -> void +ShipEngineSDK.Model.Label.Status.get -> ShipEngineSDK.Model.LabelStatus? +ShipEngineSDK.Model.Label.Status.set -> void +ShipEngineSDK.Model.Label.TestLabel.get -> bool +ShipEngineSDK.Model.Label.TestLabel.set -> void +ShipEngineSDK.Model.Label.Trackable.get -> bool +ShipEngineSDK.Model.Label.Trackable.set -> void +ShipEngineSDK.Model.Label.TrackingNumber.get -> string! +ShipEngineSDK.Model.Label.TrackingNumber.set -> void +ShipEngineSDK.Model.Label.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus? +ShipEngineSDK.Model.Label.TrackingStatus.set -> void +ShipEngineSDK.Model.Label.TrackingUrl.get -> string! +ShipEngineSDK.Model.Label.TrackingUrl.set -> void +ShipEngineSDK.Model.Label.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.Label.ValidateAddress.set -> void +ShipEngineSDK.Model.Label.Voided.get -> bool +ShipEngineSDK.Model.Label.Voided.set -> void +ShipEngineSDK.Model.Label.VoidedAt.get -> System.DateTime +ShipEngineSDK.Model.Label.VoidedAt.set -> void +ShipEngineSDK.Model.LabelChargeEvent +ShipEngineSDK.Model.LabelChargeEvent.LabelChargeEvent(string! value) -> void +ShipEngineSDK.Model.LabelDownload +ShipEngineSDK.Model.LabelDownload.Href.get -> string! +ShipEngineSDK.Model.LabelDownload.Href.set -> void +ShipEngineSDK.Model.LabelDownload.LabelDownload() -> void +ShipEngineSDK.Model.LabelDownload.Pdf.get -> string! +ShipEngineSDK.Model.LabelDownload.Pdf.set -> void +ShipEngineSDK.Model.LabelDownload.Png.get -> string! +ShipEngineSDK.Model.LabelDownload.Png.set -> void +ShipEngineSDK.Model.LabelDownload.Zpl.get -> string! +ShipEngineSDK.Model.LabelDownload.Zpl.set -> void +ShipEngineSDK.Model.LabelDownloadType +ShipEngineSDK.Model.LabelDownloadType.LabelDownloadType(string! value) -> void +ShipEngineSDK.Model.LabelFormat +ShipEngineSDK.Model.LabelFormat.LabelFormat(string! value) -> void +ShipEngineSDK.Model.LabelLayout +ShipEngineSDK.Model.LabelLayout.LabelLayout(string! value) -> void +ShipEngineSDK.Model.LabelMessages +ShipEngineSDK.Model.LabelMessages.LabelMessages() -> void +ShipEngineSDK.Model.LabelMessages.Reference1.get -> string! +ShipEngineSDK.Model.LabelMessages.Reference1.set -> void +ShipEngineSDK.Model.LabelMessages.Reference2.get -> string! +ShipEngineSDK.Model.LabelMessages.Reference2.set -> void +ShipEngineSDK.Model.LabelMessages.Reference3.get -> string! +ShipEngineSDK.Model.LabelMessages.Reference3.set -> void +ShipEngineSDK.Model.LabelPackagesInner +ShipEngineSDK.Model.LabelPackagesInner.AlternativeIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.LabelPackagesInner.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.LabelPackagesInner.ContentDescription.get -> string! +ShipEngineSDK.Model.LabelPackagesInner.ContentDescription.set -> void +ShipEngineSDK.Model.LabelPackagesInner.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.LabelPackagesInner.Dimensions.set -> void +ShipEngineSDK.Model.LabelPackagesInner.ExternalPackageId.get -> string! +ShipEngineSDK.Model.LabelPackagesInner.ExternalPackageId.set -> void +ShipEngineSDK.Model.LabelPackagesInner.FormDownload.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.LabelPackagesInner.FormDownload.set -> void +ShipEngineSDK.Model.LabelPackagesInner.InsuredValue.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.LabelPackagesInner.InsuredValue.set -> void +ShipEngineSDK.Model.LabelPackagesInner.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.LabelPackagesInner.LabelDownload.set -> void +ShipEngineSDK.Model.LabelPackagesInner.LabelMessages.get -> ShipEngineSDK.Model.LabelMessages! +ShipEngineSDK.Model.LabelPackagesInner.LabelMessages.set -> void +ShipEngineSDK.Model.LabelPackagesInner.LabelPackagesInner() -> void +ShipEngineSDK.Model.LabelPackagesInner.PackageCode.get -> string! +ShipEngineSDK.Model.LabelPackagesInner.PackageCode.set -> void +ShipEngineSDK.Model.LabelPackagesInner.PackageId.get -> string! +ShipEngineSDK.Model.LabelPackagesInner.PackageId.set -> void +ShipEngineSDK.Model.LabelPackagesInner.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.LabelPackagesInner.PaperlessDownload.set -> void +ShipEngineSDK.Model.LabelPackagesInner.Products.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.LabelPackagesInner.Products.set -> void +ShipEngineSDK.Model.LabelPackagesInner.Sequence.get -> int +ShipEngineSDK.Model.LabelPackagesInner.Sequence.set -> void +ShipEngineSDK.Model.LabelPackagesInner.TrackingNumber.get -> string! +ShipEngineSDK.Model.LabelPackagesInner.TrackingNumber.set -> void +ShipEngineSDK.Model.LabelPackagesInner.Weight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.LabelPackagesInner.Weight.set -> void +ShipEngineSDK.Model.LabelStatus +ShipEngineSDK.Model.LabelStatus.LabelStatus(string! value) -> void +ShipEngineSDK.Model.Link +ShipEngineSDK.Model.Link.Href.get -> string! +ShipEngineSDK.Model.Link.Href.set -> void +ShipEngineSDK.Model.Link.Link() -> void +ShipEngineSDK.Model.Link.Type.get -> string! +ShipEngineSDK.Model.Link.Type.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody +ShipEngineSDK.Model.ListAccountImagesResponseBody.Images.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListAccountImagesResponseBody.Images.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListAccountImagesResponseBody.Links.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBody() -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.CreatedAt.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.ImageContentType.get -> string! +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.ImageContentType.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.ImageData.get -> string! +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.ImageData.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.IsDefault.get -> bool +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.IsDefault.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.LabelImageId.get -> string! +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.LabelImageId.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.ListAccountImagesResponseBodyItem() -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.ModifiedAt.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.Name.get -> string! +ShipEngineSDK.Model.ListAccountImagesResponseBody.ListAccountImagesResponseBodyItem.Name.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.Page.get -> int +ShipEngineSDK.Model.ListAccountImagesResponseBody.Page.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.Pages.get -> int +ShipEngineSDK.Model.ListAccountImagesResponseBody.Pages.set -> void +ShipEngineSDK.Model.ListAccountImagesResponseBody.Total.get -> int +ShipEngineSDK.Model.ListAccountImagesResponseBody.Total.set -> void +ShipEngineSDK.Model.ListAccountSettingsBody +ShipEngineSDK.Model.ListAccountSettingsBody.DefaultLabelLayout.get -> ShipEngineSDK.Model.DefaultLabelLayout? +ShipEngineSDK.Model.ListAccountSettingsBody.DefaultLabelLayout.set -> void +ShipEngineSDK.Model.ListAccountSettingsBody.ListAccountSettingsBody() -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Images.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Images.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Links.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBody() -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.CreatedAt.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.ImageContentType.get -> string! +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.ImageContentType.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.ImageData.get -> string! +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.ImageData.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.IsDefault.get -> bool +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.IsDefault.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.LabelImageId.get -> string! +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.LabelImageId.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.ListAccountSettingsImagesResponseBodyItem() -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.ModifiedAt.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.Name.get -> string! +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ListAccountSettingsImagesResponseBodyItem.Name.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Page.get -> int +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Page.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Pages.get -> int +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Pages.set -> void +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Total.get -> int +ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.Total.set -> void +ShipEngineSDK.Model.ListBatchErrorsResponseBody +ShipEngineSDK.Model.ListBatchErrorsResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListBatchErrorsResponseBody.Errors.set -> void +ShipEngineSDK.Model.ListBatchErrorsResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListBatchErrorsResponseBody.Links.set -> void +ShipEngineSDK.Model.ListBatchErrorsResponseBody.ListBatchErrorsResponseBody() -> void +ShipEngineSDK.Model.ListBatchesResponseBody +ShipEngineSDK.Model.ListBatchesResponseBody.Batches.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListBatchesResponseBody.Batches.set -> void +ShipEngineSDK.Model.ListBatchesResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListBatchesResponseBody.Links.set -> void +ShipEngineSDK.Model.ListBatchesResponseBody.ListBatchesResponseBody() -> void +ShipEngineSDK.Model.ListBatchesResponseBody.Page.get -> int +ShipEngineSDK.Model.ListBatchesResponseBody.Page.set -> void +ShipEngineSDK.Model.ListBatchesResponseBody.Pages.get -> int +ShipEngineSDK.Model.ListBatchesResponseBody.Pages.set -> void +ShipEngineSDK.Model.ListBatchesResponseBody.Total.get -> long +ShipEngineSDK.Model.ListBatchesResponseBody.Total.set -> void +ShipEngineSDK.Model.ListCarrierPackageTypesResponseBody +ShipEngineSDK.Model.ListCarrierPackageTypesResponseBody.ListCarrierPackageTypesResponseBody() -> void +ShipEngineSDK.Model.ListCarrierPackageTypesResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListCarrierPackageTypesResponseBody.Packages.set -> void +ShipEngineSDK.Model.ListCarrierServicesResponseBody +ShipEngineSDK.Model.ListCarrierServicesResponseBody.ListCarrierServicesResponseBody() -> void +ShipEngineSDK.Model.ListCarrierServicesResponseBody.Services.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListCarrierServicesResponseBody.Services.set -> void +ShipEngineSDK.Model.ListCarriersResponseBody +ShipEngineSDK.Model.ListCarriersResponseBody.Carriers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListCarriersResponseBody.Carriers.set -> void +ShipEngineSDK.Model.ListCarriersResponseBody.ListCarriersResponseBody() -> void +ShipEngineSDK.Model.ListLabelsResponseBody +ShipEngineSDK.Model.ListLabelsResponseBody.Labels.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListLabelsResponseBody.Labels.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListLabelsResponseBody.Links.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBody() -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.AlternativeIdentifiers.get -> System.Collections.Generic.List? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.AlternativeIdentifiers.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.BatchId.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.BatchId.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.CarrierCode.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.CarrierCode.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.CarrierId.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.CarrierId.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ChargeEvent.get -> ShipEngineSDK.Model.LabelChargeEvent! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ChargeEvent.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.CreatedAt.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.DisplayScheme.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.FormDownload.get -> ShipEngineSDK.Model.Link? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.FormDownload.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.InsuranceClaim.get -> ShipEngineSDK.Model.Link? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.InsuranceClaim.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.InsuranceCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.InsuranceCost.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.IsInternational.get -> bool +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.IsInternational.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.IsReturnLabel.get -> bool +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.IsReturnLabel.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelDownload.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelDownloadType.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelFormat.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelId.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelId.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelImageId.get -> string? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelImageId.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.LabelLayout.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ListLabelsResponseBodyItem() -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.OutboundLabelId.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.OutboundLabelId.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.PackageCode.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.PackageCode.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Packages.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.PaperlessDownload.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.RmaNumber.get -> string? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.RmaNumber.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ServiceCode.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ServiceCode.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ShipDate.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Shipment.get -> ShipEngineSDK.Model.Shipment! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Shipment.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ShipmentCost.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ShipmentCost.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ShipmentId.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ShipmentId.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Status.get -> ShipEngineSDK.Model.LabelStatus! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Status.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TestLabel.get -> bool +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TestLabel.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Trackable.get -> bool +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Trackable.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TrackingNumber.get -> string! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TrackingNumber.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TrackingStatus.get -> ShipEngineSDK.Model.TrackingStatus! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TrackingStatus.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TrackingUrl.get -> string? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.TrackingUrl.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress! +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.ValidateAddress.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Voided.get -> bool +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.Voided.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.VoidedAt.get -> System.DateTime? +ShipEngineSDK.Model.ListLabelsResponseBody.ListLabelsResponseBodyItem.VoidedAt.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.Page.get -> int +ShipEngineSDK.Model.ListLabelsResponseBody.Page.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.Pages.get -> int +ShipEngineSDK.Model.ListLabelsResponseBody.Pages.set -> void +ShipEngineSDK.Model.ListLabelsResponseBody.Total.get -> int +ShipEngineSDK.Model.ListLabelsResponseBody.Total.set -> void +ShipEngineSDK.Model.ListManifestsResponseBody +ShipEngineSDK.Model.ListManifestsResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListManifestsResponseBody.Links.set -> void +ShipEngineSDK.Model.ListManifestsResponseBody.ListManifestsResponseBody() -> void +ShipEngineSDK.Model.ListManifestsResponseBody.Manifests.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListManifestsResponseBody.Manifests.set -> void +ShipEngineSDK.Model.ListManifestsResponseBody.Page.get -> int +ShipEngineSDK.Model.ListManifestsResponseBody.Page.set -> void +ShipEngineSDK.Model.ListManifestsResponseBody.Pages.get -> int +ShipEngineSDK.Model.ListManifestsResponseBody.Pages.set -> void +ShipEngineSDK.Model.ListManifestsResponseBody.Total.get -> long +ShipEngineSDK.Model.ListManifestsResponseBody.Total.set -> void +ShipEngineSDK.Model.ListPackageTypesResponseBody +ShipEngineSDK.Model.ListPackageTypesResponseBody.ListPackageTypesResponseBody() -> void +ShipEngineSDK.Model.ListPackageTypesResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListPackageTypesResponseBody.Packages.set -> void +ShipEngineSDK.Model.ListPickupResponseBody +ShipEngineSDK.Model.ListPickupResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListPickupResponseBody.Links.set -> void +ShipEngineSDK.Model.ListPickupResponseBody.ListPickupResponseBody() -> void +ShipEngineSDK.Model.ListPickupResponseBody.Page.get -> int +ShipEngineSDK.Model.ListPickupResponseBody.Page.set -> void +ShipEngineSDK.Model.ListPickupResponseBody.Pages.get -> int +ShipEngineSDK.Model.ListPickupResponseBody.Pages.set -> void +ShipEngineSDK.Model.ListPickupResponseBody.Pickups.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListPickupResponseBody.Pickups.set -> void +ShipEngineSDK.Model.ListPickupResponseBody.Total.get -> long +ShipEngineSDK.Model.ListPickupResponseBody.Total.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBody +ShipEngineSDK.Model.ListServicePointsResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBody.Errors.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBody.Lat.get -> double +ShipEngineSDK.Model.ListServicePointsResponseBody.Lat.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBody.ListServicePointsResponseBody() -> void +ShipEngineSDK.Model.ListServicePointsResponseBody.Long.get -> double +ShipEngineSDK.Model.ListServicePointsResponseBody.Long.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBody.ServicePoints.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBody.ServicePoints.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.AddressLine1.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.AddressLine1.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CarrierCode.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CarrierCode.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CityLocality.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CityLocality.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CompanyName.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CompanyName.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CountryCode.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.CountryCode.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.DistanceInMeters.get -> double +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.DistanceInMeters.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Features.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Features.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum.FeaturesEnum(string! value) -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.HoursOfOperation.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.HoursOfOperation.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Lat.get -> double +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Lat.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.ListServicePointsResponseBodyServicePointsInner() -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Long.get -> double +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Long.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.PhoneNumber.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.PhoneNumber.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.PostalCode.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.PostalCode.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.ServiceCodes.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.ServiceCodes.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.ServicePointId.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.ServicePointId.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.StateProvince.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.StateProvince.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Type.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum? +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.Type.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum.TypeEnum(string! value) -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Friday.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Friday.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation() -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Monday.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Monday.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Saturday.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Saturday.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Sunday.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Sunday.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Thursday.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Thursday.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Tuesday.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Tuesday.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Wednesday.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.Wednesday.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.Close.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.Close.set -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner() -> void +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.Open.get -> string! +ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.Open.set -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody +ShipEngineSDK.Model.ListShipmentRatesResponseBody.CreatedAt.get -> string! +ShipEngineSDK.Model.ListShipmentRatesResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListShipmentRatesResponseBody.Errors.set -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody.InvalidRates.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListShipmentRatesResponseBody.InvalidRates.set -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody.ListShipmentRatesResponseBody() -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody.RateRequestId.get -> string! +ShipEngineSDK.Model.ListShipmentRatesResponseBody.RateRequestId.set -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody.Rates.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListShipmentRatesResponseBody.Rates.set -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.ListShipmentRatesResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.ListShipmentRatesResponseBody.Status.get -> ShipEngineSDK.Model.RateResponseStatus! +ShipEngineSDK.Model.ListShipmentRatesResponseBody.Status.set -> void +ShipEngineSDK.Model.ListShipmentsResponseBody +ShipEngineSDK.Model.ListShipmentsResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.ListShipmentsResponseBody.Links.set -> void +ShipEngineSDK.Model.ListShipmentsResponseBody.ListShipmentsResponseBody() -> void +ShipEngineSDK.Model.ListShipmentsResponseBody.Page.get -> int +ShipEngineSDK.Model.ListShipmentsResponseBody.Page.set -> void +ShipEngineSDK.Model.ListShipmentsResponseBody.Pages.get -> int +ShipEngineSDK.Model.ListShipmentsResponseBody.Pages.set -> void +ShipEngineSDK.Model.ListShipmentsResponseBody.Shipments.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListShipmentsResponseBody.Shipments.set -> void +ShipEngineSDK.Model.ListShipmentsResponseBody.Total.get -> long +ShipEngineSDK.Model.ListShipmentsResponseBody.Total.set -> void +ShipEngineSDK.Model.ListTagsResponseBody +ShipEngineSDK.Model.ListTagsResponseBody.ListTagsResponseBody() -> void +ShipEngineSDK.Model.ListTagsResponseBody.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListTagsResponseBody.Tags.set -> void +ShipEngineSDK.Model.ListWarehousesResponseBody +ShipEngineSDK.Model.ListWarehousesResponseBody.ListWarehousesResponseBody() -> void +ShipEngineSDK.Model.ListWarehousesResponseBody.Warehouses.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ListWarehousesResponseBody.Warehouses.set -> void +ShipEngineSDK.Model.Manifest +ShipEngineSDK.Model.Manifest.CarrierId.get -> string! +ShipEngineSDK.Model.Manifest.CarrierId.set -> void +ShipEngineSDK.Model.Manifest.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.Manifest.CreatedAt.set -> void +ShipEngineSDK.Model.Manifest.FormId.get -> string! +ShipEngineSDK.Model.Manifest.FormId.set -> void +ShipEngineSDK.Model.Manifest.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Manifest.LabelIds.set -> void +ShipEngineSDK.Model.Manifest.Manifest() -> void +ShipEngineSDK.Model.Manifest.ManifestDownload.get -> ShipEngineSDK.Model.ManifestDownload! +ShipEngineSDK.Model.Manifest.ManifestDownload.set -> void +ShipEngineSDK.Model.Manifest.ManifestId.get -> string! +ShipEngineSDK.Model.Manifest.ManifestId.set -> void +ShipEngineSDK.Model.Manifest.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.Manifest.ShipDate.set -> void +ShipEngineSDK.Model.Manifest.Shipments.get -> int +ShipEngineSDK.Model.Manifest.Shipments.set -> void +ShipEngineSDK.Model.Manifest.SubmissionId.get -> string! +ShipEngineSDK.Model.Manifest.SubmissionId.set -> void +ShipEngineSDK.Model.Manifest.WarehouseId.get -> string! +ShipEngineSDK.Model.Manifest.WarehouseId.set -> void +ShipEngineSDK.Model.ManifestDownload +ShipEngineSDK.Model.ManifestDownload.Href.get -> string! +ShipEngineSDK.Model.ManifestDownload.Href.set -> void +ShipEngineSDK.Model.ManifestDownload.ManifestDownload() -> void +ShipEngineSDK.Model.ManifestRequest +ShipEngineSDK.Model.ManifestRequest.ManifestRequest() -> void +ShipEngineSDK.Model.ManifestRequest.ManifestRequestId.get -> string! +ShipEngineSDK.Model.ManifestRequest.ManifestRequestId.set -> void +ShipEngineSDK.Model.ManifestRequest.Status.get -> ShipEngineSDK.Model.ManifestRequestStatus? +ShipEngineSDK.Model.ManifestRequest.Status.set -> void +ShipEngineSDK.Model.ManifestRequestStatus +ShipEngineSDK.Model.ManifestRequestStatus.ManifestRequestStatus(string! value) -> void +ShipEngineSDK.Model.Manifests +ShipEngineSDK.Model.Manifests.Manifests() -> void +ShipEngineSDK.Model.Manifests.VarManifests.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Manifests.VarManifests.set -> void +ShipEngineSDK.Model.ManifestsRequests +ShipEngineSDK.Model.ManifestsRequests.ManifestRequests.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ManifestsRequests.ManifestRequests.set -> void +ShipEngineSDK.Model.ManifestsRequests.ManifestsRequests() -> void +ShipEngineSDK.Model.ModifyBatch +ShipEngineSDK.Model.ModifyBatch.ModifyBatch() -> void +ShipEngineSDK.Model.ModifyBatch.RateIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ModifyBatch.RateIds.set -> void +ShipEngineSDK.Model.ModifyBatch.ShipmentIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ModifyBatch.ShipmentIds.set -> void +ShipEngineSDK.Model.MonetaryValue +ShipEngineSDK.Model.MonetaryValue.Amount.get -> double +ShipEngineSDK.Model.MonetaryValue.Amount.set -> void +ShipEngineSDK.Model.MonetaryValue.Currency.get -> string! +ShipEngineSDK.Model.MonetaryValue.Currency.set -> void +ShipEngineSDK.Model.MonetaryValue.MonetaryValue() -> void +ShipEngineSDK.Model.NonDelivery +ShipEngineSDK.Model.NonDelivery.NonDelivery(string! value) -> void +ShipEngineSDK.Model.OptionalLink +ShipEngineSDK.Model.OptionalLink.Href.get -> string! +ShipEngineSDK.Model.OptionalLink.Href.set -> void +ShipEngineSDK.Model.OptionalLink.OptionalLink() -> void +ShipEngineSDK.Model.OptionalLink.Type.get -> string! +ShipEngineSDK.Model.OptionalLink.Type.set -> void +ShipEngineSDK.Model.OrderSourceName +ShipEngineSDK.Model.OrderSourceName.OrderSourceName(string! value) -> void +ShipEngineSDK.Model.OriginType +ShipEngineSDK.Model.OriginType.OriginType(string! value) -> void +ShipEngineSDK.Model.Package +ShipEngineSDK.Model.Package.ContentDescription.get -> string! +ShipEngineSDK.Model.Package.ContentDescription.set -> void +ShipEngineSDK.Model.Package.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.Package.Dimensions.set -> void +ShipEngineSDK.Model.Package.ExternalPackageId.get -> string! +ShipEngineSDK.Model.Package.ExternalPackageId.set -> void +ShipEngineSDK.Model.Package.FormDownload.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.Package.FormDownload.set -> void +ShipEngineSDK.Model.Package.InsuredValue.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Package.InsuredValue.set -> void +ShipEngineSDK.Model.Package.LabelDownload.get -> ShipEngineSDK.Model.LabelDownload! +ShipEngineSDK.Model.Package.LabelDownload.set -> void +ShipEngineSDK.Model.Package.LabelMessages.get -> ShipEngineSDK.Model.LabelMessages! +ShipEngineSDK.Model.Package.LabelMessages.set -> void +ShipEngineSDK.Model.Package.Package() -> void +ShipEngineSDK.Model.Package.PackageCode.get -> string! +ShipEngineSDK.Model.Package.PackageCode.set -> void +ShipEngineSDK.Model.Package.PackageId.get -> string! +ShipEngineSDK.Model.Package.PackageId.set -> void +ShipEngineSDK.Model.Package.PaperlessDownload.get -> ShipEngineSDK.Model.PaperlessDownload! +ShipEngineSDK.Model.Package.PaperlessDownload.set -> void +ShipEngineSDK.Model.Package.Products.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Package.Products.set -> void +ShipEngineSDK.Model.Package.Sequence.get -> int +ShipEngineSDK.Model.Package.Sequence.set -> void +ShipEngineSDK.Model.Package.TrackingNumber.get -> string! +ShipEngineSDK.Model.Package.TrackingNumber.set -> void +ShipEngineSDK.Model.Package.Weight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.Package.Weight.set -> void +ShipEngineSDK.Model.PackageContents +ShipEngineSDK.Model.PackageContents.PackageContents(string! value) -> void +ShipEngineSDK.Model.PackageType +ShipEngineSDK.Model.PackageType.Description.get -> string! +ShipEngineSDK.Model.PackageType.Description.set -> void +ShipEngineSDK.Model.PackageType.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.PackageType.Dimensions.set -> void +ShipEngineSDK.Model.PackageType.Name.get -> string! +ShipEngineSDK.Model.PackageType.Name.set -> void +ShipEngineSDK.Model.PackageType.PackageCode.get -> string! +ShipEngineSDK.Model.PackageType.PackageCode.set -> void +ShipEngineSDK.Model.PackageType.PackageId.get -> string! +ShipEngineSDK.Model.PackageType.PackageId.set -> void +ShipEngineSDK.Model.PackageType.PackageType() -> void +ShipEngineSDK.Model.PackagingGroup +ShipEngineSDK.Model.PackagingGroup.PackagingGroup(string! value) -> void +ShipEngineSDK.Model.PackagingInstructionSection +ShipEngineSDK.Model.PackagingInstructionSection.PackagingInstructionSection(string! value) -> void +ShipEngineSDK.Model.PagedListResponseBody +ShipEngineSDK.Model.PagedListResponseBody.AdditionalProperties.get -> System.Collections.Generic.IDictionary! +ShipEngineSDK.Model.PagedListResponseBody.AdditionalProperties.set -> void +ShipEngineSDK.Model.PagedListResponseBody.Links.get -> ShipEngineSDK.Model.PaginationLink! +ShipEngineSDK.Model.PagedListResponseBody.Links.set -> void +ShipEngineSDK.Model.PagedListResponseBody.Page.get -> int +ShipEngineSDK.Model.PagedListResponseBody.Page.set -> void +ShipEngineSDK.Model.PagedListResponseBody.PagedListResponseBody() -> void +ShipEngineSDK.Model.PagedListResponseBody.Pages.get -> int +ShipEngineSDK.Model.PagedListResponseBody.Pages.set -> void +ShipEngineSDK.Model.PagedListResponseBody.Total.get -> int +ShipEngineSDK.Model.PagedListResponseBody.Total.set -> void +ShipEngineSDK.Model.PaginationLink +ShipEngineSDK.Model.PaginationLink.First.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.PaginationLink.First.set -> void +ShipEngineSDK.Model.PaginationLink.Last.get -> ShipEngineSDK.Model.Link! +ShipEngineSDK.Model.PaginationLink.Last.set -> void +ShipEngineSDK.Model.PaginationLink.Next.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.PaginationLink.Next.set -> void +ShipEngineSDK.Model.PaginationLink.PaginationLink() -> void +ShipEngineSDK.Model.PaginationLink.Prev.get -> ShipEngineSDK.Model.OptionalLink! +ShipEngineSDK.Model.PaginationLink.Prev.set -> void +ShipEngineSDK.Model.PaperlessDownload +ShipEngineSDK.Model.PaperlessDownload.HandoffCode.get -> string! +ShipEngineSDK.Model.PaperlessDownload.HandoffCode.set -> void +ShipEngineSDK.Model.PaperlessDownload.Href.get -> string! +ShipEngineSDK.Model.PaperlessDownload.Href.set -> void +ShipEngineSDK.Model.PaperlessDownload.Instructions.get -> string! +ShipEngineSDK.Model.PaperlessDownload.Instructions.set -> void +ShipEngineSDK.Model.PaperlessDownload.PaperlessDownload() -> void +ShipEngineSDK.Model.ParseAddressRequestBody +ShipEngineSDK.Model.ParseAddressRequestBody.Address.get -> ShipEngineSDK.Model.PartialAddress! +ShipEngineSDK.Model.ParseAddressRequestBody.Address.set -> void +ShipEngineSDK.Model.ParseAddressRequestBody.ParseAddressRequestBody() -> void +ShipEngineSDK.Model.ParseAddressRequestBody.Text.get -> string! +ShipEngineSDK.Model.ParseAddressRequestBody.Text.set -> void +ShipEngineSDK.Model.ParseAddressResponseBody +ShipEngineSDK.Model.ParseAddressResponseBody.Address.get -> ShipEngineSDK.Model.PartialAddress! +ShipEngineSDK.Model.ParseAddressResponseBody.Address.set -> void +ShipEngineSDK.Model.ParseAddressResponseBody.Entities.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ParseAddressResponseBody.Entities.set -> void +ShipEngineSDK.Model.ParseAddressResponseBody.ParseAddressResponseBody() -> void +ShipEngineSDK.Model.ParseAddressResponseBody.Score.get -> double +ShipEngineSDK.Model.ParseAddressResponseBody.Score.set -> void +ShipEngineSDK.Model.ParseShipmentRequestBody +ShipEngineSDK.Model.ParseShipmentRequestBody.ParseShipmentRequestBody() -> void +ShipEngineSDK.Model.ParseShipmentRequestBody.Shipment.get -> ShipEngineSDK.Model.PartialShipment! +ShipEngineSDK.Model.ParseShipmentRequestBody.Shipment.set -> void +ShipEngineSDK.Model.ParseShipmentRequestBody.Text.get -> string! +ShipEngineSDK.Model.ParseShipmentRequestBody.Text.set -> void +ShipEngineSDK.Model.ParseShipmentResponseBody +ShipEngineSDK.Model.ParseShipmentResponseBody.Entities.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ParseShipmentResponseBody.Entities.set -> void +ShipEngineSDK.Model.ParseShipmentResponseBody.ParseShipmentResponseBody() -> void +ShipEngineSDK.Model.ParseShipmentResponseBody.Score.get -> double +ShipEngineSDK.Model.ParseShipmentResponseBody.Score.set -> void +ShipEngineSDK.Model.ParseShipmentResponseBody.Shipment.get -> ShipEngineSDK.Model.PartialShipment! +ShipEngineSDK.Model.ParseShipmentResponseBody.Shipment.set -> void +ShipEngineSDK.Model.PartialAddress +ShipEngineSDK.Model.PartialAddress.AddressLine1.get -> string! +ShipEngineSDK.Model.PartialAddress.AddressLine1.set -> void +ShipEngineSDK.Model.PartialAddress.AddressLine2.get -> string! +ShipEngineSDK.Model.PartialAddress.AddressLine2.set -> void +ShipEngineSDK.Model.PartialAddress.AddressLine3.get -> string! +ShipEngineSDK.Model.PartialAddress.AddressLine3.set -> void +ShipEngineSDK.Model.PartialAddress.AddressResidentialIndicator.get -> ShipEngineSDK.Model.AddressResidentialIndicator? +ShipEngineSDK.Model.PartialAddress.AddressResidentialIndicator.set -> void +ShipEngineSDK.Model.PartialAddress.CityLocality.get -> string! +ShipEngineSDK.Model.PartialAddress.CityLocality.set -> void +ShipEngineSDK.Model.PartialAddress.CompanyName.get -> string! +ShipEngineSDK.Model.PartialAddress.CompanyName.set -> void +ShipEngineSDK.Model.PartialAddress.CountryCode.get -> string! +ShipEngineSDK.Model.PartialAddress.CountryCode.set -> void +ShipEngineSDK.Model.PartialAddress.Email.get -> string! +ShipEngineSDK.Model.PartialAddress.Email.set -> void +ShipEngineSDK.Model.PartialAddress.Name.get -> string! +ShipEngineSDK.Model.PartialAddress.Name.set -> void +ShipEngineSDK.Model.PartialAddress.PartialAddress() -> void +ShipEngineSDK.Model.PartialAddress.Phone.get -> string! +ShipEngineSDK.Model.PartialAddress.Phone.set -> void +ShipEngineSDK.Model.PartialAddress.PostalCode.get -> string! +ShipEngineSDK.Model.PartialAddress.PostalCode.set -> void +ShipEngineSDK.Model.PartialAddress.StateProvince.get -> string! +ShipEngineSDK.Model.PartialAddress.StateProvince.set -> void +ShipEngineSDK.Model.PartialShipment +ShipEngineSDK.Model.PartialShipment.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.PartialShipment.AdvancedOptions.set -> void +ShipEngineSDK.Model.PartialShipment.CarrierId.get -> string! +ShipEngineSDK.Model.PartialShipment.CarrierId.set -> void +ShipEngineSDK.Model.PartialShipment.ComparisonRateType.get -> string! +ShipEngineSDK.Model.PartialShipment.ComparisonRateType.set -> void +ShipEngineSDK.Model.PartialShipment.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation? +ShipEngineSDK.Model.PartialShipment.Confirmation.set -> void +ShipEngineSDK.Model.PartialShipment.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.PartialShipment.CreatedAt.set -> void +ShipEngineSDK.Model.PartialShipment.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.PartialShipment.Customs.set -> void +ShipEngineSDK.Model.PartialShipment.ExternalOrderId.get -> string! +ShipEngineSDK.Model.PartialShipment.ExternalOrderId.set -> void +ShipEngineSDK.Model.PartialShipment.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.PartialShipment.ExternalShipmentId.set -> void +ShipEngineSDK.Model.PartialShipment.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider? +ShipEngineSDK.Model.PartialShipment.InsuranceProvider.set -> void +ShipEngineSDK.Model.PartialShipment.IsReturn.get -> bool? +ShipEngineSDK.Model.PartialShipment.IsReturn.set -> void +ShipEngineSDK.Model.PartialShipment.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.PartialShipment.Items.set -> void +ShipEngineSDK.Model.PartialShipment.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.PartialShipment.ModifiedAt.set -> void +ShipEngineSDK.Model.PartialShipment.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.PartialShipment.OrderSourceCode.set -> void +ShipEngineSDK.Model.PartialShipment.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.PartialShipment.Packages.set -> void +ShipEngineSDK.Model.PartialShipment.PartialShipment() -> void +ShipEngineSDK.Model.PartialShipment.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.PartialShipment.ReturnTo.set -> void +ShipEngineSDK.Model.PartialShipment.ServiceCode.get -> string! +ShipEngineSDK.Model.PartialShipment.ServiceCode.set -> void +ShipEngineSDK.Model.PartialShipment.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.PartialShipment.ShipDate.set -> void +ShipEngineSDK.Model.PartialShipment.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.PartialShipment.ShipFrom.set -> void +ShipEngineSDK.Model.PartialShipment.ShipmentId.get -> string! +ShipEngineSDK.Model.PartialShipment.ShipmentId.set -> void +ShipEngineSDK.Model.PartialShipment.ShipmentNumber.get -> string! +ShipEngineSDK.Model.PartialShipment.ShipmentNumber.set -> void +ShipEngineSDK.Model.PartialShipment.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus? +ShipEngineSDK.Model.PartialShipment.ShipmentStatus.set -> void +ShipEngineSDK.Model.PartialShipment.ShippingRuleId.get -> string! +ShipEngineSDK.Model.PartialShipment.ShippingRuleId.set -> void +ShipEngineSDK.Model.PartialShipment.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.PartialShipment.ShipTo.set -> void +ShipEngineSDK.Model.PartialShipment.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.PartialShipment.Tags.set -> void +ShipEngineSDK.Model.PartialShipment.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.PartialShipment.TaxIdentifiers.set -> void +ShipEngineSDK.Model.PartialShipment.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.PartialShipment.TotalWeight.set -> void +ShipEngineSDK.Model.PartialShipment.WarehouseId.get -> string! +ShipEngineSDK.Model.PartialShipment.WarehouseId.set -> void +ShipEngineSDK.Model.PartialShippingAddress +ShipEngineSDK.Model.PartialShippingAddress.Instructions.get -> string! +ShipEngineSDK.Model.PartialShippingAddress.Instructions.set -> void +ShipEngineSDK.Model.PartialShippingAddress.PartialShippingAddress() -> void +ShipEngineSDK.Model.PartialShippingAddressTo +ShipEngineSDK.Model.PartialShippingAddressTo.Geolocation.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.PartialShippingAddressTo.Geolocation.set -> void +ShipEngineSDK.Model.PartialShippingAddressTo.Instructions.get -> string! +ShipEngineSDK.Model.PartialShippingAddressTo.Instructions.set -> void +ShipEngineSDK.Model.PartialShippingAddressTo.PartialShippingAddressTo() -> void +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.PartialShippingAddressToGeolocationInner() -> void +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.Type.get -> ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.TypeEnum? +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.Type.set -> void +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.TypeEnum +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.TypeEnum.TypeEnum(string! value) -> void +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.Value.get -> string! +ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.Value.set -> void +ShipEngineSDK.Model.PaymentAmount +ShipEngineSDK.Model.PaymentAmount.Amount.get -> double +ShipEngineSDK.Model.PaymentAmount.Amount.set -> void +ShipEngineSDK.Model.PaymentAmount.Currency.get -> string! +ShipEngineSDK.Model.PaymentAmount.Currency.set -> void +ShipEngineSDK.Model.PaymentAmount.PaymentAmount() -> void +ShipEngineSDK.Model.Pickup +ShipEngineSDK.Model.Pickup.CancelledAt.get -> System.DateTime +ShipEngineSDK.Model.Pickup.CancelledAt.set -> void +ShipEngineSDK.Model.Pickup.CarrierId.get -> string! +ShipEngineSDK.Model.Pickup.CarrierId.set -> void +ShipEngineSDK.Model.Pickup.ConfirmationNumber.get -> string! +ShipEngineSDK.Model.Pickup.ConfirmationNumber.set -> void +ShipEngineSDK.Model.Pickup.ContactDetails.get -> ShipEngineSDK.Model.ContactDetails! +ShipEngineSDK.Model.Pickup.ContactDetails.set -> void +ShipEngineSDK.Model.Pickup.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.Pickup.CreatedAt.set -> void +ShipEngineSDK.Model.Pickup.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Pickup.LabelIds.set -> void +ShipEngineSDK.Model.Pickup.Pickup() -> void +ShipEngineSDK.Model.Pickup.PickupAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.Pickup.PickupAddress.set -> void +ShipEngineSDK.Model.Pickup.PickupId.get -> string! +ShipEngineSDK.Model.Pickup.PickupId.set -> void +ShipEngineSDK.Model.Pickup.PickupNotes.get -> string! +ShipEngineSDK.Model.Pickup.PickupNotes.set -> void +ShipEngineSDK.Model.Pickup.PickupWindow.get -> ShipEngineSDK.Model.PickupWindow! +ShipEngineSDK.Model.Pickup.PickupWindow.set -> void +ShipEngineSDK.Model.Pickup.PickupWindows.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Pickup.PickupWindows.set -> void +ShipEngineSDK.Model.Pickup.WarehouseId.get -> string! +ShipEngineSDK.Model.Pickup.WarehouseId.set -> void +ShipEngineSDK.Model.PickupResponseBody +ShipEngineSDK.Model.PickupResponseBody.CancelledAt.get -> System.DateTime +ShipEngineSDK.Model.PickupResponseBody.CancelledAt.set -> void +ShipEngineSDK.Model.PickupResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.PickupResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.PickupResponseBody.ConfirmationNumber.get -> string! +ShipEngineSDK.Model.PickupResponseBody.ConfirmationNumber.set -> void +ShipEngineSDK.Model.PickupResponseBody.ContactDetails.get -> ShipEngineSDK.Model.ContactDetails! +ShipEngineSDK.Model.PickupResponseBody.ContactDetails.set -> void +ShipEngineSDK.Model.PickupResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.PickupResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.PickupResponseBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.PickupResponseBody.LabelIds.set -> void +ShipEngineSDK.Model.PickupResponseBody.PickupAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.PickupResponseBody.PickupAddress.set -> void +ShipEngineSDK.Model.PickupResponseBody.PickupId.get -> string! +ShipEngineSDK.Model.PickupResponseBody.PickupId.set -> void +ShipEngineSDK.Model.PickupResponseBody.PickupNotes.get -> string! +ShipEngineSDK.Model.PickupResponseBody.PickupNotes.set -> void +ShipEngineSDK.Model.PickupResponseBody.PickupResponseBody() -> void +ShipEngineSDK.Model.PickupResponseBody.PickupWindow.get -> ShipEngineSDK.Model.PickupWindow! +ShipEngineSDK.Model.PickupResponseBody.PickupWindow.set -> void +ShipEngineSDK.Model.PickupResponseBody.PickupWindows.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.PickupResponseBody.PickupWindows.set -> void +ShipEngineSDK.Model.PickupResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.PickupResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.PickupWindow +ShipEngineSDK.Model.PickupWindow.EndAt.get -> System.DateTime +ShipEngineSDK.Model.PickupWindow.EndAt.set -> void +ShipEngineSDK.Model.PickupWindow.PickupWindow() -> void +ShipEngineSDK.Model.PickupWindow.StartAt.get -> System.DateTime +ShipEngineSDK.Model.PickupWindow.StartAt.set -> void +ShipEngineSDK.Model.PickupWindows +ShipEngineSDK.Model.PickupWindows.EndAt.get -> System.DateTime +ShipEngineSDK.Model.PickupWindows.EndAt.set -> void +ShipEngineSDK.Model.PickupWindows.PickupWindows() -> void +ShipEngineSDK.Model.PickupWindows.StartAt.get -> System.DateTime +ShipEngineSDK.Model.PickupWindows.StartAt.set -> void +ShipEngineSDK.Model.ProcessBatchRequestBody +ShipEngineSDK.Model.ProcessBatchRequestBody.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.ProcessBatchRequestBody.DisplayScheme.set -> void +ShipEngineSDK.Model.ProcessBatchRequestBody.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.ProcessBatchRequestBody.LabelFormat.set -> void +ShipEngineSDK.Model.ProcessBatchRequestBody.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.ProcessBatchRequestBody.LabelLayout.set -> void +ShipEngineSDK.Model.ProcessBatchRequestBody.ProcessBatchRequestBody() -> void +ShipEngineSDK.Model.ProcessBatchRequestBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.ProcessBatchRequestBody.ShipDate.set -> void +ShipEngineSDK.Model.Products +ShipEngineSDK.Model.Products.CountryOfOrigin.get -> string! +ShipEngineSDK.Model.Products.CountryOfOrigin.set -> void +ShipEngineSDK.Model.Products.DangerousGoods.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Products.DangerousGoods.set -> void +ShipEngineSDK.Model.Products.Description.get -> string! +ShipEngineSDK.Model.Products.Description.set -> void +ShipEngineSDK.Model.Products.HarmonizedTariffCode.get -> string! +ShipEngineSDK.Model.Products.HarmonizedTariffCode.set -> void +ShipEngineSDK.Model.Products.MidCode.get -> string! +ShipEngineSDK.Model.Products.MidCode.set -> void +ShipEngineSDK.Model.Products.Products() -> void +ShipEngineSDK.Model.Products.ProductUrl.get -> string! +ShipEngineSDK.Model.Products.ProductUrl.set -> void +ShipEngineSDK.Model.Products.Quantity.get -> int +ShipEngineSDK.Model.Products.Quantity.set -> void +ShipEngineSDK.Model.Products.Sku.get -> string! +ShipEngineSDK.Model.Products.Sku.set -> void +ShipEngineSDK.Model.Products.SkuDescription.get -> string! +ShipEngineSDK.Model.Products.SkuDescription.set -> void +ShipEngineSDK.Model.Products.UnitOfMeasure.get -> string! +ShipEngineSDK.Model.Products.UnitOfMeasure.set -> void +ShipEngineSDK.Model.Products.Value.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Products.Value.set -> void +ShipEngineSDK.Model.Products.VatRate.get -> double? +ShipEngineSDK.Model.Products.VatRate.set -> void +ShipEngineSDK.Model.Products.Weight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.Products.Weight.set -> void +ShipEngineSDK.Model.PurchaseLabelWithoutShipment +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.DisplayScheme.get -> ShipEngineSDK.Model.DisplayScheme? +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.DisplayScheme.set -> void +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.LabelDownloadType.get -> ShipEngineSDK.Model.LabelDownloadType? +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.LabelDownloadType.set -> void +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.LabelFormat.get -> ShipEngineSDK.Model.LabelFormat? +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.LabelFormat.set -> void +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.LabelLayout.get -> ShipEngineSDK.Model.LabelLayout? +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.LabelLayout.set -> void +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.PurchaseLabelWithoutShipment() -> void +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.PurchaseLabelWithoutShipment.ValidateAddress.set -> void +ShipEngineSDK.Model.Rate +ShipEngineSDK.Model.Rate.CarrierCode.get -> string! +ShipEngineSDK.Model.Rate.CarrierCode.set -> void +ShipEngineSDK.Model.Rate.CarrierDeliveryDays.get -> string! +ShipEngineSDK.Model.Rate.CarrierDeliveryDays.set -> void +ShipEngineSDK.Model.Rate.CarrierFriendlyName.get -> string! +ShipEngineSDK.Model.Rate.CarrierFriendlyName.set -> void +ShipEngineSDK.Model.Rate.CarrierId.get -> string! +ShipEngineSDK.Model.Rate.CarrierId.set -> void +ShipEngineSDK.Model.Rate.CarrierNickname.get -> string! +ShipEngineSDK.Model.Rate.CarrierNickname.set -> void +ShipEngineSDK.Model.Rate.ConfirmationAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Rate.ConfirmationAmount.set -> void +ShipEngineSDK.Model.Rate.DeliveryDays.get -> int +ShipEngineSDK.Model.Rate.DeliveryDays.set -> void +ShipEngineSDK.Model.Rate.ErrorMessages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Rate.ErrorMessages.set -> void +ShipEngineSDK.Model.Rate.EstimatedDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.Rate.EstimatedDeliveryDate.set -> void +ShipEngineSDK.Model.Rate.GuaranteedService.get -> bool +ShipEngineSDK.Model.Rate.GuaranteedService.set -> void +ShipEngineSDK.Model.Rate.InsuranceAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Rate.InsuranceAmount.set -> void +ShipEngineSDK.Model.Rate.NegotiatedRate.get -> bool +ShipEngineSDK.Model.Rate.NegotiatedRate.set -> void +ShipEngineSDK.Model.Rate.OtherAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Rate.OtherAmount.set -> void +ShipEngineSDK.Model.Rate.PackageType.get -> string! +ShipEngineSDK.Model.Rate.PackageType.set -> void +ShipEngineSDK.Model.Rate.Rate() -> void +ShipEngineSDK.Model.Rate.RateId.get -> string! +ShipEngineSDK.Model.Rate.RateId.set -> void +ShipEngineSDK.Model.Rate.RateType.get -> ShipEngineSDK.Model.RateType! +ShipEngineSDK.Model.Rate.RateType.set -> void +ShipEngineSDK.Model.Rate.RequestedComparisonAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Rate.RequestedComparisonAmount.set -> void +ShipEngineSDK.Model.Rate.ServiceCode.get -> string! +ShipEngineSDK.Model.Rate.ServiceCode.set -> void +ShipEngineSDK.Model.Rate.ServiceType.get -> string! +ShipEngineSDK.Model.Rate.ServiceType.set -> void +ShipEngineSDK.Model.Rate.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.Rate.ShipDate.set -> void +ShipEngineSDK.Model.Rate.ShippingAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Rate.ShippingAmount.set -> void +ShipEngineSDK.Model.Rate.TaxAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.Rate.TaxAmount.set -> void +ShipEngineSDK.Model.Rate.Trackable.get -> bool +ShipEngineSDK.Model.Rate.Trackable.set -> void +ShipEngineSDK.Model.Rate.ValidationStatus.get -> ShipEngineSDK.Model.ValidationStatus! +ShipEngineSDK.Model.Rate.ValidationStatus.set -> void +ShipEngineSDK.Model.Rate.WarningMessages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Rate.WarningMessages.set -> void +ShipEngineSDK.Model.Rate.Zone.get -> int? +ShipEngineSDK.Model.Rate.Zone.set -> void +ShipEngineSDK.Model.RateEstimate +ShipEngineSDK.Model.RateEstimate.CarrierCode.get -> string! +ShipEngineSDK.Model.RateEstimate.CarrierCode.set -> void +ShipEngineSDK.Model.RateEstimate.CarrierDeliveryDays.get -> string! +ShipEngineSDK.Model.RateEstimate.CarrierDeliveryDays.set -> void +ShipEngineSDK.Model.RateEstimate.CarrierFriendlyName.get -> string! +ShipEngineSDK.Model.RateEstimate.CarrierFriendlyName.set -> void +ShipEngineSDK.Model.RateEstimate.CarrierId.get -> string! +ShipEngineSDK.Model.RateEstimate.CarrierId.set -> void +ShipEngineSDK.Model.RateEstimate.CarrierNickname.get -> string! +ShipEngineSDK.Model.RateEstimate.CarrierNickname.set -> void +ShipEngineSDK.Model.RateEstimate.ConfirmationAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.RateEstimate.ConfirmationAmount.set -> void +ShipEngineSDK.Model.RateEstimate.DeliveryDays.get -> int +ShipEngineSDK.Model.RateEstimate.DeliveryDays.set -> void +ShipEngineSDK.Model.RateEstimate.ErrorMessages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateEstimate.ErrorMessages.set -> void +ShipEngineSDK.Model.RateEstimate.EstimatedDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.RateEstimate.EstimatedDeliveryDate.set -> void +ShipEngineSDK.Model.RateEstimate.GuaranteedService.get -> bool +ShipEngineSDK.Model.RateEstimate.GuaranteedService.set -> void +ShipEngineSDK.Model.RateEstimate.InsuranceAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.RateEstimate.InsuranceAmount.set -> void +ShipEngineSDK.Model.RateEstimate.NegotiatedRate.get -> bool +ShipEngineSDK.Model.RateEstimate.NegotiatedRate.set -> void +ShipEngineSDK.Model.RateEstimate.OtherAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.RateEstimate.OtherAmount.set -> void +ShipEngineSDK.Model.RateEstimate.PackageType.get -> string! +ShipEngineSDK.Model.RateEstimate.PackageType.set -> void +ShipEngineSDK.Model.RateEstimate.RateEstimate() -> void +ShipEngineSDK.Model.RateEstimate.RateType.get -> ShipEngineSDK.Model.RateType! +ShipEngineSDK.Model.RateEstimate.RateType.set -> void +ShipEngineSDK.Model.RateEstimate.ServiceCode.get -> string! +ShipEngineSDK.Model.RateEstimate.ServiceCode.set -> void +ShipEngineSDK.Model.RateEstimate.ServiceType.get -> string! +ShipEngineSDK.Model.RateEstimate.ServiceType.set -> void +ShipEngineSDK.Model.RateEstimate.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.RateEstimate.ShipDate.set -> void +ShipEngineSDK.Model.RateEstimate.ShippingAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.RateEstimate.ShippingAmount.set -> void +ShipEngineSDK.Model.RateEstimate.TaxAmount.get -> ShipEngineSDK.Model.MonetaryValue! +ShipEngineSDK.Model.RateEstimate.TaxAmount.set -> void +ShipEngineSDK.Model.RateEstimate.Trackable.get -> bool +ShipEngineSDK.Model.RateEstimate.Trackable.set -> void +ShipEngineSDK.Model.RateEstimate.ValidationStatus.get -> ShipEngineSDK.Model.ValidationStatus! +ShipEngineSDK.Model.RateEstimate.ValidationStatus.set -> void +ShipEngineSDK.Model.RateEstimate.WarningMessages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateEstimate.WarningMessages.set -> void +ShipEngineSDK.Model.RateEstimate.Zone.get -> int? +ShipEngineSDK.Model.RateEstimate.Zone.set -> void +ShipEngineSDK.Model.RateEstimateByCarrierId +ShipEngineSDK.Model.RateEstimateByCarrierId.CarrierId.get -> string! +ShipEngineSDK.Model.RateEstimateByCarrierId.CarrierId.set -> void +ShipEngineSDK.Model.RateEstimateByCarrierId.RateEstimateByCarrierId() -> void +ShipEngineSDK.Model.RateEstimateByCarrierIds +ShipEngineSDK.Model.RateEstimateByCarrierIds.CarrierIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateEstimateByCarrierIds.CarrierIds.set -> void +ShipEngineSDK.Model.RateEstimateByCarrierIds.RateEstimateByCarrierIds() -> void +ShipEngineSDK.Model.RateEstimateOptions +ShipEngineSDK.Model.RateEstimateOptions.AddressResidentialIndicator.get -> ShipEngineSDK.Model.AddressResidentialIndicator? +ShipEngineSDK.Model.RateEstimateOptions.AddressResidentialIndicator.set -> void +ShipEngineSDK.Model.RateEstimateOptions.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation? +ShipEngineSDK.Model.RateEstimateOptions.Confirmation.set -> void +ShipEngineSDK.Model.RateEstimateOptions.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.RateEstimateOptions.Dimensions.set -> void +ShipEngineSDK.Model.RateEstimateOptions.FromCityLocality.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.FromCityLocality.set -> void +ShipEngineSDK.Model.RateEstimateOptions.FromCountryCode.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.FromCountryCode.set -> void +ShipEngineSDK.Model.RateEstimateOptions.FromPostalCode.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.FromPostalCode.set -> void +ShipEngineSDK.Model.RateEstimateOptions.FromStateProvince.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.FromStateProvince.set -> void +ShipEngineSDK.Model.RateEstimateOptions.RateEstimateOptions() -> void +ShipEngineSDK.Model.RateEstimateOptions.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.RateEstimateOptions.ShipDate.set -> void +ShipEngineSDK.Model.RateEstimateOptions.ToCityLocality.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.ToCityLocality.set -> void +ShipEngineSDK.Model.RateEstimateOptions.ToCountryCode.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.ToCountryCode.set -> void +ShipEngineSDK.Model.RateEstimateOptions.ToPostalCode.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.ToPostalCode.set -> void +ShipEngineSDK.Model.RateEstimateOptions.ToStateProvince.get -> string! +ShipEngineSDK.Model.RateEstimateOptions.ToStateProvince.set -> void +ShipEngineSDK.Model.RateEstimateOptions.Weight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.RateEstimateOptions.Weight.set -> void +ShipEngineSDK.Model.RateRequestBody +ShipEngineSDK.Model.RateRequestBody.CalculateTaxAmount.get -> bool +ShipEngineSDK.Model.RateRequestBody.CalculateTaxAmount.set -> void +ShipEngineSDK.Model.RateRequestBody.CarrierIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateRequestBody.CarrierIds.set -> void +ShipEngineSDK.Model.RateRequestBody.IsReturn.get -> bool +ShipEngineSDK.Model.RateRequestBody.IsReturn.set -> void +ShipEngineSDK.Model.RateRequestBody.PackageTypes.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateRequestBody.PackageTypes.set -> void +ShipEngineSDK.Model.RateRequestBody.PreferredCurrency.get -> string! +ShipEngineSDK.Model.RateRequestBody.PreferredCurrency.set -> void +ShipEngineSDK.Model.RateRequestBody.RateRequestBody() -> void +ShipEngineSDK.Model.RateRequestBody.ServiceCodes.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateRequestBody.ServiceCodes.set -> void +ShipEngineSDK.Model.RateRequestByShipmentIds +ShipEngineSDK.Model.RateRequestByShipmentIds.RateRequestByShipmentIds() -> void +ShipEngineSDK.Model.RateRequestByShipmentIds.ShipmentIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateRequestByShipmentIds.ShipmentIds.set -> void +ShipEngineSDK.Model.RateRequestByShipments +ShipEngineSDK.Model.RateRequestByShipments.RateRequestByShipments() -> void +ShipEngineSDK.Model.RateRequestByShipments.Shipments.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RateRequestByShipments.Shipments.set -> void +ShipEngineSDK.Model.RateRequestOptions +ShipEngineSDK.Model.RateRequestOptions.RateOptions.get -> ShipEngineSDK.Model.RateRequestBody! +ShipEngineSDK.Model.RateRequestOptions.RateOptions.set -> void +ShipEngineSDK.Model.RateRequestOptions.RateRequestOptions() -> void +ShipEngineSDK.Model.RateRequestRateOptions +ShipEngineSDK.Model.RateRequestRateOptions.RateOptions.get -> ShipEngineSDK.Model.RateRequestBody! +ShipEngineSDK.Model.RateRequestRateOptions.RateOptions.set -> void +ShipEngineSDK.Model.RateRequestRateOptions.RateRequestRateOptions() -> void +ShipEngineSDK.Model.RateResponse +ShipEngineSDK.Model.RateResponse.RateResponse() -> void +ShipEngineSDK.Model.RateResponse.VarRateResponse.get -> ShipEngineSDK.Model.RatesInformation! +ShipEngineSDK.Model.RateResponse.VarRateResponse.set -> void +ShipEngineSDK.Model.RateResponseStatus +ShipEngineSDK.Model.RateResponseStatus.RateResponseStatus(string! value) -> void +ShipEngineSDK.Model.RatesInformation +ShipEngineSDK.Model.RatesInformation.CreatedAt.get -> string! +ShipEngineSDK.Model.RatesInformation.CreatedAt.set -> void +ShipEngineSDK.Model.RatesInformation.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RatesInformation.Errors.set -> void +ShipEngineSDK.Model.RatesInformation.InvalidRates.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RatesInformation.InvalidRates.set -> void +ShipEngineSDK.Model.RatesInformation.RateRequestId.get -> string! +ShipEngineSDK.Model.RatesInformation.RateRequestId.set -> void +ShipEngineSDK.Model.RatesInformation.Rates.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RatesInformation.Rates.set -> void +ShipEngineSDK.Model.RatesInformation.RatesInformation() -> void +ShipEngineSDK.Model.RatesInformation.ShipmentId.get -> string! +ShipEngineSDK.Model.RatesInformation.ShipmentId.set -> void +ShipEngineSDK.Model.RatesInformation.Status.get -> ShipEngineSDK.Model.RateResponseStatus? +ShipEngineSDK.Model.RatesInformation.Status.set -> void +ShipEngineSDK.Model.RateType +ShipEngineSDK.Model.RateType.RateType(string! value) -> void +ShipEngineSDK.Model.ReasonCode +ShipEngineSDK.Model.ReasonCode.ReasonCode(string! value) -> void +ShipEngineSDK.Model.RecognizedEntity +ShipEngineSDK.Model.RecognizedEntity.EndIndex.get -> int +ShipEngineSDK.Model.RecognizedEntity.EndIndex.set -> void +ShipEngineSDK.Model.RecognizedEntity.RecognizedEntity() -> void +ShipEngineSDK.Model.RecognizedEntity.Result.get -> System.Collections.Generic.Dictionary! +ShipEngineSDK.Model.RecognizedEntity.Result.set -> void +ShipEngineSDK.Model.RecognizedEntity.Score.get -> double +ShipEngineSDK.Model.RecognizedEntity.Score.set -> void +ShipEngineSDK.Model.RecognizedEntity.StartIndex.get -> int +ShipEngineSDK.Model.RecognizedEntity.StartIndex.set -> void +ShipEngineSDK.Model.RecognizedEntity.Text.get -> string! +ShipEngineSDK.Model.RecognizedEntity.Text.set -> void +ShipEngineSDK.Model.RecognizedEntity.Type.get -> string! +ShipEngineSDK.Model.RecognizedEntity.Type.set -> void +ShipEngineSDK.Model.Redirect +ShipEngineSDK.Model.Redirect.Redirect(string! value) -> void +ShipEngineSDK.Model.RegulationLevel +ShipEngineSDK.Model.RegulationLevel.RegulationLevel(string! value) -> void +ShipEngineSDK.Model.RemoveFromBatchRequestBody +ShipEngineSDK.Model.RemoveFromBatchRequestBody.RateIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RemoveFromBatchRequestBody.RateIds.set -> void +ShipEngineSDK.Model.RemoveFromBatchRequestBody.RemoveFromBatchRequestBody() -> void +ShipEngineSDK.Model.RemoveFromBatchRequestBody.ShipmentIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.RemoveFromBatchRequestBody.ShipmentIds.set -> void +ShipEngineSDK.Model.ResponseMessage +ShipEngineSDK.Model.ResponseMessage.Code.get -> ShipEngineSDK.Model.AddressValidationCode! +ShipEngineSDK.Model.ResponseMessage.Code.set -> void +ShipEngineSDK.Model.ResponseMessage.DetailCode.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +ShipEngineSDK.Model.ResponseMessage.DetailCode.set -> void +ShipEngineSDK.Model.ResponseMessage.Message.get -> string! +ShipEngineSDK.Model.ResponseMessage.Message.set -> void +ShipEngineSDK.Model.ResponseMessage.ResponseMessage() -> void +ShipEngineSDK.Model.ResponseMessage.Type.get -> ShipEngineSDK.Model.AddressValidationMessageType! +ShipEngineSDK.Model.ResponseMessage.Type.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody +ShipEngineSDK.Model.SchedulePickupRequestBody.CancelledAt.get -> System.DateTime +ShipEngineSDK.Model.SchedulePickupRequestBody.CancelledAt.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.CarrierId.get -> string! +ShipEngineSDK.Model.SchedulePickupRequestBody.CarrierId.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.ConfirmationNumber.get -> string! +ShipEngineSDK.Model.SchedulePickupRequestBody.ConfirmationNumber.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.ContactDetails.get -> ShipEngineSDK.Model.ContactDetails! +ShipEngineSDK.Model.SchedulePickupRequestBody.ContactDetails.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.SchedulePickupRequestBody.CreatedAt.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.SchedulePickupRequestBody.LabelIds.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupAddress.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupId.get -> string! +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupId.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupNotes.get -> string! +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupNotes.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupWindow.get -> ShipEngineSDK.Model.PickupWindow! +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupWindow.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupWindows.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.SchedulePickupRequestBody.PickupWindows.set -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.SchedulePickupRequestBody() -> void +ShipEngineSDK.Model.SchedulePickupRequestBody.WarehouseId.get -> string! +ShipEngineSDK.Model.SchedulePickupRequestBody.WarehouseId.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody +ShipEngineSDK.Model.SchedulePickupResponseBody.CancelledAt.get -> System.DateTime +ShipEngineSDK.Model.SchedulePickupResponseBody.CancelledAt.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.SchedulePickupResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.ConfirmationNumber.get -> string! +ShipEngineSDK.Model.SchedulePickupResponseBody.ConfirmationNumber.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.ContactDetails.get -> ShipEngineSDK.Model.ContactDetails! +ShipEngineSDK.Model.SchedulePickupResponseBody.ContactDetails.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.SchedulePickupResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.SchedulePickupResponseBody.Errors.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.LabelIds.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.SchedulePickupResponseBody.LabelIds.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupAddress.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupId.get -> string! +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupId.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupNotes.get -> string! +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupNotes.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupWindow.get -> ShipEngineSDK.Model.PickupWindow! +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupWindow.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupWindows.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.SchedulePickupResponseBody.PickupWindows.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.RequestId.get -> System.Guid +ShipEngineSDK.Model.SchedulePickupResponseBody.RequestId.set -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.SchedulePickupResponseBody() -> void +ShipEngineSDK.Model.SchedulePickupResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.SchedulePickupResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.Service +ShipEngineSDK.Model.Service.CarrierCode.get -> string! +ShipEngineSDK.Model.Service.CarrierCode.set -> void +ShipEngineSDK.Model.Service.CarrierId.get -> string! +ShipEngineSDK.Model.Service.CarrierId.set -> void +ShipEngineSDK.Model.Service.Domestic.get -> bool +ShipEngineSDK.Model.Service.Domestic.set -> void +ShipEngineSDK.Model.Service.International.get -> bool +ShipEngineSDK.Model.Service.International.set -> void +ShipEngineSDK.Model.Service.IsMultiPackageSupported.get -> bool +ShipEngineSDK.Model.Service.IsMultiPackageSupported.set -> void +ShipEngineSDK.Model.Service.Name.get -> string! +ShipEngineSDK.Model.Service.Name.set -> void +ShipEngineSDK.Model.Service.Service() -> void +ShipEngineSDK.Model.Service.ServiceCode.get -> string! +ShipEngineSDK.Model.Service.ServiceCode.set -> void +ShipEngineSDK.Model.Shipment +ShipEngineSDK.Model.Shipment.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.Shipment.AdvancedOptions.set -> void +ShipEngineSDK.Model.Shipment.CarrierId.get -> string! +ShipEngineSDK.Model.Shipment.CarrierId.set -> void +ShipEngineSDK.Model.Shipment.ComparisonRateType.get -> string! +ShipEngineSDK.Model.Shipment.ComparisonRateType.set -> void +ShipEngineSDK.Model.Shipment.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation! +ShipEngineSDK.Model.Shipment.Confirmation.set -> void +ShipEngineSDK.Model.Shipment.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.Shipment.CreatedAt.set -> void +ShipEngineSDK.Model.Shipment.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.Shipment.Customs.set -> void +ShipEngineSDK.Model.Shipment.ExternalOrderId.get -> string! +ShipEngineSDK.Model.Shipment.ExternalOrderId.set -> void +ShipEngineSDK.Model.Shipment.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.Shipment.ExternalShipmentId.set -> void +ShipEngineSDK.Model.Shipment.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider! +ShipEngineSDK.Model.Shipment.InsuranceProvider.set -> void +ShipEngineSDK.Model.Shipment.IsReturn.get -> bool? +ShipEngineSDK.Model.Shipment.IsReturn.set -> void +ShipEngineSDK.Model.Shipment.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Shipment.Items.set -> void +ShipEngineSDK.Model.Shipment.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.Shipment.ModifiedAt.set -> void +ShipEngineSDK.Model.Shipment.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.Shipment.OrderSourceCode.set -> void +ShipEngineSDK.Model.Shipment.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Shipment.Packages.set -> void +ShipEngineSDK.Model.Shipment.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.Shipment.ReturnTo.set -> void +ShipEngineSDK.Model.Shipment.ServiceCode.get -> string! +ShipEngineSDK.Model.Shipment.ServiceCode.set -> void +ShipEngineSDK.Model.Shipment.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.Shipment.ShipDate.set -> void +ShipEngineSDK.Model.Shipment.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.Shipment.ShipFrom.set -> void +ShipEngineSDK.Model.Shipment.Shipment() -> void +ShipEngineSDK.Model.Shipment.ShipmentId.get -> string! +ShipEngineSDK.Model.Shipment.ShipmentId.set -> void +ShipEngineSDK.Model.Shipment.ShipmentNumber.get -> string! +ShipEngineSDK.Model.Shipment.ShipmentNumber.set -> void +ShipEngineSDK.Model.Shipment.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus! +ShipEngineSDK.Model.Shipment.ShipmentStatus.set -> void +ShipEngineSDK.Model.Shipment.ShippingRuleId.get -> string! +ShipEngineSDK.Model.Shipment.ShippingRuleId.set -> void +ShipEngineSDK.Model.Shipment.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.Shipment.ShipTo.set -> void +ShipEngineSDK.Model.Shipment.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Shipment.Tags.set -> void +ShipEngineSDK.Model.Shipment.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Shipment.TaxIdentifiers.set -> void +ShipEngineSDK.Model.Shipment.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.Shipment.TotalWeight.set -> void +ShipEngineSDK.Model.Shipment.WarehouseId.get -> string! +ShipEngineSDK.Model.Shipment.WarehouseId.set -> void +ShipEngineSDK.Model.ShipmentIdRequest +ShipEngineSDK.Model.ShipmentIdRequest.ShipmentId.get -> string! +ShipEngineSDK.Model.ShipmentIdRequest.ShipmentId.set -> void +ShipEngineSDK.Model.ShipmentIdRequest.ShipmentIdRequest() -> void +ShipEngineSDK.Model.ShipmentItem +ShipEngineSDK.Model.ShipmentItem.Asin.get -> string! +ShipEngineSDK.Model.ShipmentItem.Asin.set -> void +ShipEngineSDK.Model.ShipmentItem.ExternalOrderId.get -> string! +ShipEngineSDK.Model.ShipmentItem.ExternalOrderId.set -> void +ShipEngineSDK.Model.ShipmentItem.ExternalOrderItemId.get -> string! +ShipEngineSDK.Model.ShipmentItem.ExternalOrderItemId.set -> void +ShipEngineSDK.Model.ShipmentItem.Name.get -> string! +ShipEngineSDK.Model.ShipmentItem.Name.set -> void +ShipEngineSDK.Model.ShipmentItem.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.ShipmentItem.OrderSourceCode.set -> void +ShipEngineSDK.Model.ShipmentItem.Quantity.get -> int +ShipEngineSDK.Model.ShipmentItem.Quantity.set -> void +ShipEngineSDK.Model.ShipmentItem.SalesOrderId.get -> string! +ShipEngineSDK.Model.ShipmentItem.SalesOrderId.set -> void +ShipEngineSDK.Model.ShipmentItem.SalesOrderItemId.get -> string! +ShipEngineSDK.Model.ShipmentItem.SalesOrderItemId.set -> void +ShipEngineSDK.Model.ShipmentItem.ShipmentItem() -> void +ShipEngineSDK.Model.ShipmentItem.Sku.get -> string! +ShipEngineSDK.Model.ShipmentItem.Sku.set -> void +ShipEngineSDK.Model.ShipmentRequest +ShipEngineSDK.Model.ShipmentRequest.Shipment.get -> ShipEngineSDK.Model.AddressValidatingShipment! +ShipEngineSDK.Model.ShipmentRequest.Shipment.set -> void +ShipEngineSDK.Model.ShipmentRequest.ShipmentRequest() -> void +ShipEngineSDK.Model.ShipmentsSortBy +ShipEngineSDK.Model.ShipmentsSortBy.ShipmentsSortBy(string! value) -> void +ShipEngineSDK.Model.ShipmentStatus +ShipEngineSDK.Model.ShipmentStatus.ShipmentStatus(string! value) -> void +ShipEngineSDK.Model.ShippingAddress +ShipEngineSDK.Model.ShippingAddress.AddressLine1.get -> string! +ShipEngineSDK.Model.ShippingAddress.AddressLine1.set -> void +ShipEngineSDK.Model.ShippingAddress.AddressLine2.get -> string! +ShipEngineSDK.Model.ShippingAddress.AddressLine2.set -> void +ShipEngineSDK.Model.ShippingAddress.AddressLine3.get -> string! +ShipEngineSDK.Model.ShippingAddress.AddressLine3.set -> void +ShipEngineSDK.Model.ShippingAddress.AddressResidentialIndicator.get -> ShipEngineSDK.Model.AddressResidentialIndicator! +ShipEngineSDK.Model.ShippingAddress.AddressResidentialIndicator.set -> void +ShipEngineSDK.Model.ShippingAddress.CityLocality.get -> string! +ShipEngineSDK.Model.ShippingAddress.CityLocality.set -> void +ShipEngineSDK.Model.ShippingAddress.CompanyName.get -> string! +ShipEngineSDK.Model.ShippingAddress.CompanyName.set -> void +ShipEngineSDK.Model.ShippingAddress.CountryCode.get -> string! +ShipEngineSDK.Model.ShippingAddress.CountryCode.set -> void +ShipEngineSDK.Model.ShippingAddress.Email.get -> string! +ShipEngineSDK.Model.ShippingAddress.Email.set -> void +ShipEngineSDK.Model.ShippingAddress.Instructions.get -> string! +ShipEngineSDK.Model.ShippingAddress.Instructions.set -> void +ShipEngineSDK.Model.ShippingAddress.Name.get -> string! +ShipEngineSDK.Model.ShippingAddress.Name.set -> void +ShipEngineSDK.Model.ShippingAddress.Phone.get -> string! +ShipEngineSDK.Model.ShippingAddress.Phone.set -> void +ShipEngineSDK.Model.ShippingAddress.PostalCode.get -> string! +ShipEngineSDK.Model.ShippingAddress.PostalCode.set -> void +ShipEngineSDK.Model.ShippingAddress.ShippingAddress() -> void +ShipEngineSDK.Model.ShippingAddress.StateProvince.get -> string! +ShipEngineSDK.Model.ShippingAddress.StateProvince.set -> void +ShipEngineSDK.Model.ShippingAddressTo +ShipEngineSDK.Model.ShippingAddressTo.AddressLine1.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.AddressLine1.set -> void +ShipEngineSDK.Model.ShippingAddressTo.AddressLine2.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.AddressLine2.set -> void +ShipEngineSDK.Model.ShippingAddressTo.AddressLine3.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.AddressLine3.set -> void +ShipEngineSDK.Model.ShippingAddressTo.AddressResidentialIndicator.get -> ShipEngineSDK.Model.AddressResidentialIndicator! +ShipEngineSDK.Model.ShippingAddressTo.AddressResidentialIndicator.set -> void +ShipEngineSDK.Model.ShippingAddressTo.CityLocality.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.CityLocality.set -> void +ShipEngineSDK.Model.ShippingAddressTo.CompanyName.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.CompanyName.set -> void +ShipEngineSDK.Model.ShippingAddressTo.CountryCode.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.CountryCode.set -> void +ShipEngineSDK.Model.ShippingAddressTo.Email.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.Email.set -> void +ShipEngineSDK.Model.ShippingAddressTo.Geolocation.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.ShippingAddressTo.Geolocation.set -> void +ShipEngineSDK.Model.ShippingAddressTo.Instructions.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.Instructions.set -> void +ShipEngineSDK.Model.ShippingAddressTo.Name.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.Name.set -> void +ShipEngineSDK.Model.ShippingAddressTo.Phone.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.Phone.set -> void +ShipEngineSDK.Model.ShippingAddressTo.PostalCode.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.PostalCode.set -> void +ShipEngineSDK.Model.ShippingAddressTo.ShippingAddressTo() -> void +ShipEngineSDK.Model.ShippingAddressTo.StateProvince.get -> string! +ShipEngineSDK.Model.ShippingAddressTo.StateProvince.set -> void +ShipEngineSDK.Model.SmartPostHub +ShipEngineSDK.Model.SmartPostHub.SmartPostHub(string! value) -> void +ShipEngineSDK.Model.SortDir +ShipEngineSDK.Model.SortDir.SortDir(string! value) -> void +ShipEngineSDK.Model.StatusCode +ShipEngineSDK.Model.StatusCode.StatusCode(string! value) -> void +ShipEngineSDK.Model.Tag +ShipEngineSDK.Model.Tag.Name.get -> string! +ShipEngineSDK.Model.Tag.Name.set -> void +ShipEngineSDK.Model.Tag.Tag() -> void +ShipEngineSDK.Model.TagShipmentResponseBody +ShipEngineSDK.Model.TagShipmentResponseBody.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.TagShipmentResponseBody.Tags.set -> void +ShipEngineSDK.Model.TagShipmentResponseBody.TagShipmentResponseBody() -> void +ShipEngineSDK.Model.TaxableEntityType +ShipEngineSDK.Model.TaxableEntityType.TaxableEntityType(string! value) -> void +ShipEngineSDK.Model.TaxIdentifier +ShipEngineSDK.Model.TaxIdentifier.IdentifierType.get -> ShipEngineSDK.Model.IdentifierType! +ShipEngineSDK.Model.TaxIdentifier.IdentifierType.set -> void +ShipEngineSDK.Model.TaxIdentifier.IssuingAuthority.get -> string! +ShipEngineSDK.Model.TaxIdentifier.IssuingAuthority.set -> void +ShipEngineSDK.Model.TaxIdentifier.TaxableEntityType.get -> ShipEngineSDK.Model.TaxableEntityType! +ShipEngineSDK.Model.TaxIdentifier.TaxableEntityType.set -> void +ShipEngineSDK.Model.TaxIdentifier.TaxIdentifier() -> void +ShipEngineSDK.Model.TaxIdentifier.Value.get -> string! +ShipEngineSDK.Model.TaxIdentifier.Value.set -> void +ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml +ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml.RedirectUrl.get -> string! +ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml.RedirectUrl.set -> void +ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml.Token.get -> string! +ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml.Token.set -> void +ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml.TokensGetEphemeralTokenResponseBodyYaml() -> void +ShipEngineSDK.Model.TrackEvent +ShipEngineSDK.Model.TrackEvent.CarrierDetailCode.get -> string! +ShipEngineSDK.Model.TrackEvent.CarrierDetailCode.set -> void +ShipEngineSDK.Model.TrackEvent.CarrierOccurredAt.get -> System.DateTime +ShipEngineSDK.Model.TrackEvent.CarrierOccurredAt.set -> void +ShipEngineSDK.Model.TrackEvent.CarrierStatusCode.get -> string! +ShipEngineSDK.Model.TrackEvent.CarrierStatusCode.set -> void +ShipEngineSDK.Model.TrackEvent.CarrierStatusDescription.get -> string! +ShipEngineSDK.Model.TrackEvent.CarrierStatusDescription.set -> void +ShipEngineSDK.Model.TrackEvent.CityLocality.get -> string! +ShipEngineSDK.Model.TrackEvent.CityLocality.set -> void +ShipEngineSDK.Model.TrackEvent.CompanyName.get -> string! +ShipEngineSDK.Model.TrackEvent.CompanyName.set -> void +ShipEngineSDK.Model.TrackEvent.CountryCode.get -> string! +ShipEngineSDK.Model.TrackEvent.CountryCode.set -> void +ShipEngineSDK.Model.TrackEvent.Description.get -> string! +ShipEngineSDK.Model.TrackEvent.Description.set -> void +ShipEngineSDK.Model.TrackEvent.EventCode.get -> string! +ShipEngineSDK.Model.TrackEvent.EventCode.set -> void +ShipEngineSDK.Model.TrackEvent.Latitude.get -> double +ShipEngineSDK.Model.TrackEvent.Latitude.set -> void +ShipEngineSDK.Model.TrackEvent.Longitude.get -> double +ShipEngineSDK.Model.TrackEvent.Longitude.set -> void +ShipEngineSDK.Model.TrackEvent.OccurredAt.get -> System.DateTime +ShipEngineSDK.Model.TrackEvent.OccurredAt.set -> void +ShipEngineSDK.Model.TrackEvent.PostalCode.get -> string! +ShipEngineSDK.Model.TrackEvent.PostalCode.set -> void +ShipEngineSDK.Model.TrackEvent.Signer.get -> string! +ShipEngineSDK.Model.TrackEvent.Signer.set -> void +ShipEngineSDK.Model.TrackEvent.StateProvince.get -> string! +ShipEngineSDK.Model.TrackEvent.StateProvince.set -> void +ShipEngineSDK.Model.TrackEvent.StatusCode.get -> ShipEngineSDK.Model.StatusCode! +ShipEngineSDK.Model.TrackEvent.StatusCode.set -> void +ShipEngineSDK.Model.TrackEvent.StatusDescription.get -> string! +ShipEngineSDK.Model.TrackEvent.StatusDescription.set -> void +ShipEngineSDK.Model.TrackEvent.TrackEvent() -> void +ShipEngineSDK.Model.TrackingInformation +ShipEngineSDK.Model.TrackingInformation.ActualDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.TrackingInformation.ActualDeliveryDate.set -> void +ShipEngineSDK.Model.TrackingInformation.CarrierCode.get -> string! +ShipEngineSDK.Model.TrackingInformation.CarrierCode.set -> void +ShipEngineSDK.Model.TrackingInformation.CarrierDetailCode.get -> string! +ShipEngineSDK.Model.TrackingInformation.CarrierDetailCode.set -> void +ShipEngineSDK.Model.TrackingInformation.CarrierId.get -> string! +ShipEngineSDK.Model.TrackingInformation.CarrierId.set -> void +ShipEngineSDK.Model.TrackingInformation.CarrierStatusCode.get -> string! +ShipEngineSDK.Model.TrackingInformation.CarrierStatusCode.set -> void +ShipEngineSDK.Model.TrackingInformation.CarrierStatusDescription.get -> string! +ShipEngineSDK.Model.TrackingInformation.CarrierStatusDescription.set -> void +ShipEngineSDK.Model.TrackingInformation.EstimatedDeliveryDate.get -> System.DateTime +ShipEngineSDK.Model.TrackingInformation.EstimatedDeliveryDate.set -> void +ShipEngineSDK.Model.TrackingInformation.Events.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.TrackingInformation.Events.set -> void +ShipEngineSDK.Model.TrackingInformation.ExceptionDescription.get -> string! +ShipEngineSDK.Model.TrackingInformation.ExceptionDescription.set -> void +ShipEngineSDK.Model.TrackingInformation.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.TrackingInformation.ShipDate.set -> void +ShipEngineSDK.Model.TrackingInformation.StatusCode.get -> ShipEngineSDK.Model.StatusCode? +ShipEngineSDK.Model.TrackingInformation.StatusCode.set -> void +ShipEngineSDK.Model.TrackingInformation.StatusDescription.get -> string! +ShipEngineSDK.Model.TrackingInformation.StatusDescription.set -> void +ShipEngineSDK.Model.TrackingInformation.TrackingInformation() -> void +ShipEngineSDK.Model.TrackingInformation.TrackingNumber.get -> string! +ShipEngineSDK.Model.TrackingInformation.TrackingNumber.set -> void +ShipEngineSDK.Model.TrackingInformation.TrackingUrl.get -> string! +ShipEngineSDK.Model.TrackingInformation.TrackingUrl.set -> void +ShipEngineSDK.Model.TrackingStatus +ShipEngineSDK.Model.TrackingStatus.TrackingStatus(string! value) -> void +ShipEngineSDK.Model.TransportMean +ShipEngineSDK.Model.TransportMean.TransportMean(string! value) -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.CreatedAt.set -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentType.get -> ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum? +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentType.set -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum.ImageContentTypeEnum(string! value) -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageData.get -> string! +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageData.set -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.IsDefault.get -> bool +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.IsDefault.set -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.LabelImageId.get -> string! +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.LabelImageId.set -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ModifiedAt.set -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.Name.get -> string! +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.Name.set -> void +ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.UpdateAccountSettingsImageRequestBody() -> void +ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody +ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody.Email.get -> string! +ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody.Email.set -> void +ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody.UpdateAmazonBuyShippingRequestBody() -> void +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.GetUpdateAmazonBuyShippingRequestBody() -> ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody! +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.GetUpdateDhlExpressSettingsRequestBody() -> ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody! +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.GetUpdateFedexSettingsRequestBody() -> ShipEngineSDK.Model.UpdateFedexSettingsRequestBody! +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.GetUpdateNewgisticsSettingsRequestBody() -> ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody! +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.GetUpdateUpsSettingsRequestBody() -> ShipEngineSDK.Model.UpdateUpsSettingsRequestBody! +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.UpdateCarrierSettingsRequestBody(ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody! actualInstance) -> void +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.UpdateCarrierSettingsRequestBody(ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.UpdateCarrierSettingsRequestBody(ShipEngineSDK.Model.UpdateFedexSettingsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.UpdateCarrierSettingsRequestBody(ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBody.UpdateCarrierSettingsRequestBody(ShipEngineSDK.Model.UpdateUpsSettingsRequestBody! actualInstance) -> void +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBodyJsonConverter +ShipEngineSDK.Model.UpdateCarrierSettingsRequestBodyJsonConverter.UpdateCarrierSettingsRequestBodyJsonConverter() -> void +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.Nickname.set -> void +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.ShouldHideAccountNumberOnArchiveDoc.get -> bool +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.ShouldHideAccountNumberOnArchiveDoc.set -> void +ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.UpdateDhlExpressSettingsRequestBody() -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.LetterheadImage.get -> string! +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.LetterheadImage.set -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.Nickname.set -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.PickupType.get -> ShipEngineSDK.Model.FedexPickupType? +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.PickupType.set -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.SignatureImage.get -> string! +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.SignatureImage.set -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.SmartPostEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.SmartPostEndorsement.set -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.SmartPostHub.get -> ShipEngineSDK.Model.SmartPostHub? +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.SmartPostHub.set -> void +ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.UpdateFedexSettingsRequestBody() -> void +ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody +ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody.IncludeBarcodeWithOrderNumber.get -> bool +ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody.IncludeBarcodeWithOrderNumber.set -> void +ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody.ReceiveEmailOnManifestProcessing.get -> bool +ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody.ReceiveEmailOnManifestProcessing.set -> void +ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody.UpdateNewgisticsSettingsRequestBody() -> void +ShipEngineSDK.Model.UpdatePackageTypeRequestBody +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.Description.get -> string! +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.Description.set -> void +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.Dimensions.get -> ShipEngineSDK.Model.Dimensions! +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.Dimensions.set -> void +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.Name.get -> string! +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.Name.set -> void +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.PackageCode.get -> string! +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.PackageCode.set -> void +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.PackageId.get -> string! +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.PackageId.set -> void +ShipEngineSDK.Model.UpdatePackageTypeRequestBody.UpdatePackageTypeRequestBody() -> void +ShipEngineSDK.Model.UpdateShipmentFields +ShipEngineSDK.Model.UpdateShipmentFields.UpdateShipmentFields() -> void +ShipEngineSDK.Model.UpdateShipmentFields.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.UpdateShipmentFields.ValidateAddress.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody +ShipEngineSDK.Model.UpdateShipmentRequestBody.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.UpdateShipmentRequestBody.AdvancedOptions.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.CarrierId.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.CarrierId.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ComparisonRateType.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ComparisonRateType.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation? +ShipEngineSDK.Model.UpdateShipmentRequestBody.Confirmation.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.UpdateShipmentRequestBody.CreatedAt.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.UpdateShipmentRequestBody.Customs.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ExternalOrderId.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ExternalOrderId.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ExternalShipmentId.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider? +ShipEngineSDK.Model.UpdateShipmentRequestBody.InsuranceProvider.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.IsReturn.get -> bool? +ShipEngineSDK.Model.UpdateShipmentRequestBody.IsReturn.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentRequestBody.Items.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.UpdateShipmentRequestBody.ModifiedAt.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.UpdateShipmentRequestBody.OrderSourceCode.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentRequestBody.Packages.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ReturnTo.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ServiceCode.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ServiceCode.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipDate.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipFrom.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipmentId.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipmentId.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipmentNumber.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipmentNumber.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus? +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipmentStatus.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShippingRuleId.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShippingRuleId.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.UpdateShipmentRequestBody.ShipTo.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentRequestBody.Tags.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentRequestBody.TaxIdentifiers.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.UpdateShipmentRequestBody.TotalWeight.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.UpdateShipmentRequestBody() -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.UpdateShipmentRequestBody.ValidateAddress.set -> void +ShipEngineSDK.Model.UpdateShipmentRequestBody.WarehouseId.get -> string! +ShipEngineSDK.Model.UpdateShipmentRequestBody.WarehouseId.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody +ShipEngineSDK.Model.UpdateShipmentResponseBody.AddressValidation.get -> ShipEngineSDK.Model.AddressValidationResult! +ShipEngineSDK.Model.UpdateShipmentResponseBody.AddressValidation.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.AdvancedOptions.get -> ShipEngineSDK.Model.AdvancedShipmentOptions! +ShipEngineSDK.Model.UpdateShipmentResponseBody.AdvancedOptions.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.CarrierId.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.CarrierId.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ComparisonRateType.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ComparisonRateType.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.Confirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation! +ShipEngineSDK.Model.UpdateShipmentResponseBody.Confirmation.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.UpdateShipmentResponseBody.CreatedAt.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.Customs.get -> ShipEngineSDK.Model.InternationalShipmentOptions! +ShipEngineSDK.Model.UpdateShipmentResponseBody.Customs.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.Errors.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentResponseBody.Errors.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ExternalOrderId.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ExternalOrderId.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ExternalShipmentId.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ExternalShipmentId.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.InsuranceProvider.get -> ShipEngineSDK.Model.InsuranceProvider! +ShipEngineSDK.Model.UpdateShipmentResponseBody.InsuranceProvider.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.IsReturn.get -> bool? +ShipEngineSDK.Model.UpdateShipmentResponseBody.IsReturn.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.Items.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentResponseBody.Items.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ModifiedAt.get -> System.DateTime +ShipEngineSDK.Model.UpdateShipmentResponseBody.ModifiedAt.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.OrderSourceCode.get -> ShipEngineSDK.Model.OrderSourceName? +ShipEngineSDK.Model.UpdateShipmentResponseBody.OrderSourceCode.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.Packages.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentResponseBody.Packages.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ReturnTo.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ReturnTo.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ServiceCode.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ServiceCode.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipDate.get -> System.DateTime +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipDate.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipFrom.get -> ShipEngineSDK.Model.ShippingAddress! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipFrom.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipmentId.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipmentId.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipmentNumber.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipmentNumber.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipmentStatus.get -> ShipEngineSDK.Model.ShipmentStatus! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipmentStatus.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShippingRuleId.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShippingRuleId.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipTo.get -> ShipEngineSDK.Model.ShippingAddressTo! +ShipEngineSDK.Model.UpdateShipmentResponseBody.ShipTo.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentResponseBody.Tags.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.TaxIdentifiers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentResponseBody.TaxIdentifiers.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.TotalWeight.get -> ShipEngineSDK.Model.Weight! +ShipEngineSDK.Model.UpdateShipmentResponseBody.TotalWeight.set -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.UpdateShipmentResponseBody() -> void +ShipEngineSDK.Model.UpdateShipmentResponseBody.WarehouseId.get -> string! +ShipEngineSDK.Model.UpdateShipmentResponseBody.WarehouseId.set -> void +ShipEngineSDK.Model.UpdateShipmentsTags +ShipEngineSDK.Model.UpdateShipmentsTags.ShipmentsTags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentsTags.ShipmentsTags.set -> void +ShipEngineSDK.Model.UpdateShipmentsTags.UpdateShipmentsTags() -> void +ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody +ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody.ShipmentsTags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody.ShipmentsTags.set -> void +ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody.UpdateShipmentsTagsRequestBody() -> void +ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner +ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner.ShipmentId.get -> string! +ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner.ShipmentId.set -> void +ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner.Tags.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner.Tags.set -> void +ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner.UpdateShipmentsTagsShipmentsTagsInner() -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.AccountPostalCode.get -> string! +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.AccountPostalCode.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.Invoice.get -> ShipEngineSDK.Model.UpsInvoice! +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.Invoice.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.MailInnovationsCostCenter.get -> string! +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.MailInnovationsCostCenter.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.MailInnovationsEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.MailInnovationsEndorsement.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.Nickname.get -> string! +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.Nickname.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.PickupType.get -> ShipEngineSDK.Model.UpsPickupType? +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.PickupType.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UpdateUpsSettingsRequestBody() -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseCarbonNeutralShippingProgram.get -> bool +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseCarbonNeutralShippingProgram.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseConsolidationServices.get -> bool +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseConsolidationServices.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseGroundFreightPricing.get -> bool +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseGroundFreightPricing.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseNegotiatedRates.get -> bool +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseNegotiatedRates.set -> void +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseOrderNumberOnMailInnovationsLabels.get -> bool +ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.UseOrderNumberOnMailInnovationsLabels.set -> void +ShipEngineSDK.Model.UpdateWarehouseRequestBody +ShipEngineSDK.Model.UpdateWarehouseRequestBody.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.UpdateWarehouseRequestBody.CreatedAt.set -> void +ShipEngineSDK.Model.UpdateWarehouseRequestBody.IsDefault.get -> bool? +ShipEngineSDK.Model.UpdateWarehouseRequestBody.IsDefault.set -> void +ShipEngineSDK.Model.UpdateWarehouseRequestBody.Name.get -> string! +ShipEngineSDK.Model.UpdateWarehouseRequestBody.Name.set -> void +ShipEngineSDK.Model.UpdateWarehouseRequestBody.OriginAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.UpdateWarehouseRequestBody.OriginAddress.set -> void +ShipEngineSDK.Model.UpdateWarehouseRequestBody.ReturnAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.UpdateWarehouseRequestBody.ReturnAddress.set -> void +ShipEngineSDK.Model.UpdateWarehouseRequestBody.UpdateWarehouseRequestBody() -> void +ShipEngineSDK.Model.UpdateWarehouseRequestBody.WarehouseId.get -> string! +ShipEngineSDK.Model.UpdateWarehouseRequestBody.WarehouseId.set -> void +ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody +ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody.IsDefault.get -> bool? +ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody.IsDefault.set -> void +ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody.UpdateWarehouseSettingsRequestBody() -> void +ShipEngineSDK.Model.UpdateWebhookRequestBody +ShipEngineSDK.Model.UpdateWebhookRequestBody.Headers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.UpdateWebhookRequestBody.Headers.set -> void +ShipEngineSDK.Model.UpdateWebhookRequestBody.UpdateWebhookRequestBody() -> void +ShipEngineSDK.Model.UpdateWebhookRequestBody.Url.get -> string! +ShipEngineSDK.Model.UpdateWebhookRequestBody.Url.set -> void +ShipEngineSDK.Model.UpsAccountSettings +ShipEngineSDK.Model.UpsAccountSettings.AccountPostalCode.get -> string! +ShipEngineSDK.Model.UpsAccountSettings.AccountPostalCode.set -> void +ShipEngineSDK.Model.UpsAccountSettings.Invoice.get -> ShipEngineSDK.Model.UpsInvoice! +ShipEngineSDK.Model.UpsAccountSettings.Invoice.set -> void +ShipEngineSDK.Model.UpsAccountSettings.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.UpsAccountSettings.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.UpsAccountSettings.MailInnovationsCostCenter.get -> string! +ShipEngineSDK.Model.UpsAccountSettings.MailInnovationsCostCenter.set -> void +ShipEngineSDK.Model.UpsAccountSettings.MailInnovationsEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.UpsAccountSettings.MailInnovationsEndorsement.set -> void +ShipEngineSDK.Model.UpsAccountSettings.Nickname.get -> string! +ShipEngineSDK.Model.UpsAccountSettings.Nickname.set -> void +ShipEngineSDK.Model.UpsAccountSettings.PickupType.get -> ShipEngineSDK.Model.UpsPickupType? +ShipEngineSDK.Model.UpsAccountSettings.PickupType.set -> void +ShipEngineSDK.Model.UpsAccountSettings.UpsAccountSettings() -> void +ShipEngineSDK.Model.UpsAccountSettings.UseCarbonNeutralShippingProgram.get -> bool +ShipEngineSDK.Model.UpsAccountSettings.UseCarbonNeutralShippingProgram.set -> void +ShipEngineSDK.Model.UpsAccountSettings.UseConsolidationServices.get -> bool +ShipEngineSDK.Model.UpsAccountSettings.UseConsolidationServices.set -> void +ShipEngineSDK.Model.UpsAccountSettings.UseGroundFreightPricing.get -> bool +ShipEngineSDK.Model.UpsAccountSettings.UseGroundFreightPricing.set -> void +ShipEngineSDK.Model.UpsAccountSettings.UseNegotiatedRates.get -> bool +ShipEngineSDK.Model.UpsAccountSettings.UseNegotiatedRates.set -> void +ShipEngineSDK.Model.UpsAccountSettings.UseOrderNumberOnMailInnovationsLabels.get -> bool +ShipEngineSDK.Model.UpsAccountSettings.UseOrderNumberOnMailInnovationsLabels.set -> void +ShipEngineSDK.Model.UpsInvoice +ShipEngineSDK.Model.UpsInvoice.ControlId.get -> string! +ShipEngineSDK.Model.UpsInvoice.ControlId.set -> void +ShipEngineSDK.Model.UpsInvoice.InvoiceAmount.get -> double +ShipEngineSDK.Model.UpsInvoice.InvoiceAmount.set -> void +ShipEngineSDK.Model.UpsInvoice.InvoiceCurrencyCode.get -> string! +ShipEngineSDK.Model.UpsInvoice.InvoiceCurrencyCode.set -> void +ShipEngineSDK.Model.UpsInvoice.InvoiceDate.get -> System.DateTime +ShipEngineSDK.Model.UpsInvoice.InvoiceDate.set -> void +ShipEngineSDK.Model.UpsInvoice.InvoiceNumber.get -> string! +ShipEngineSDK.Model.UpsInvoice.InvoiceNumber.set -> void +ShipEngineSDK.Model.UpsInvoice.UpsInvoice() -> void +ShipEngineSDK.Model.UpsPickupType +ShipEngineSDK.Model.UpsPickupType.UpsPickupType(string! value) -> void +ShipEngineSDK.Model.UpsSettingsResponseBody +ShipEngineSDK.Model.UpsSettingsResponseBody.AccountPostalCode.get -> string! +ShipEngineSDK.Model.UpsSettingsResponseBody.AccountPostalCode.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.Invoice.get -> ShipEngineSDK.Model.UpsInvoice! +ShipEngineSDK.Model.UpsSettingsResponseBody.Invoice.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.IsPrimaryAccount.get -> bool +ShipEngineSDK.Model.UpsSettingsResponseBody.IsPrimaryAccount.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.MailInnovationsCostCenter.get -> string! +ShipEngineSDK.Model.UpsSettingsResponseBody.MailInnovationsCostCenter.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.MailInnovationsEndorsement.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement? +ShipEngineSDK.Model.UpsSettingsResponseBody.MailInnovationsEndorsement.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.Nickname.get -> string! +ShipEngineSDK.Model.UpsSettingsResponseBody.Nickname.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.PickupType.get -> ShipEngineSDK.Model.UpsPickupType? +ShipEngineSDK.Model.UpsSettingsResponseBody.PickupType.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.UpsSettingsResponseBody() -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.UseCarbonNeutralShippingProgram.get -> bool +ShipEngineSDK.Model.UpsSettingsResponseBody.UseCarbonNeutralShippingProgram.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.UseConsolidationServices.get -> bool +ShipEngineSDK.Model.UpsSettingsResponseBody.UseConsolidationServices.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.UseGroundFreightPricing.get -> bool +ShipEngineSDK.Model.UpsSettingsResponseBody.UseGroundFreightPricing.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.UseNegotiatedRates.get -> bool +ShipEngineSDK.Model.UpsSettingsResponseBody.UseNegotiatedRates.set -> void +ShipEngineSDK.Model.UpsSettingsResponseBody.UseOrderNumberOnMailInnovationsLabels.get -> bool +ShipEngineSDK.Model.UpsSettingsResponseBody.UseOrderNumberOnMailInnovationsLabels.set -> void +ShipEngineSDK.Model.ValidateAddress +ShipEngineSDK.Model.ValidateAddress.ValidateAddress(string! value) -> void +ShipEngineSDK.Model.ValidateShipmentFields +ShipEngineSDK.Model.ValidateShipmentFields.ValidateAddress.get -> ShipEngineSDK.Model.ValidateAddress? +ShipEngineSDK.Model.ValidateShipmentFields.ValidateAddress.set -> void +ShipEngineSDK.Model.ValidateShipmentFields.ValidateShipmentFields() -> void +ShipEngineSDK.Model.ValidationStatus +ShipEngineSDK.Model.ValidationStatus.ValidationStatus(string! value) -> void +ShipEngineSDK.Model.VoidLabelResponseBody +ShipEngineSDK.Model.VoidLabelResponseBody.Approved.get -> bool +ShipEngineSDK.Model.VoidLabelResponseBody.Approved.set -> void +ShipEngineSDK.Model.VoidLabelResponseBody.Message.get -> string! +ShipEngineSDK.Model.VoidLabelResponseBody.Message.set -> void +ShipEngineSDK.Model.VoidLabelResponseBody.ReasonCode.get -> ShipEngineSDK.Model.ReasonCode? +ShipEngineSDK.Model.VoidLabelResponseBody.ReasonCode.set -> void +ShipEngineSDK.Model.VoidLabelResponseBody.VoidLabelResponseBody() -> void +ShipEngineSDK.Model.Warehouse +ShipEngineSDK.Model.Warehouse.CreatedAt.get -> System.DateTime +ShipEngineSDK.Model.Warehouse.CreatedAt.set -> void +ShipEngineSDK.Model.Warehouse.IsDefault.get -> bool? +ShipEngineSDK.Model.Warehouse.IsDefault.set -> void +ShipEngineSDK.Model.Warehouse.Name.get -> string! +ShipEngineSDK.Model.Warehouse.Name.set -> void +ShipEngineSDK.Model.Warehouse.OriginAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.Warehouse.OriginAddress.set -> void +ShipEngineSDK.Model.Warehouse.ReturnAddress.get -> ShipEngineSDK.Model.Address! +ShipEngineSDK.Model.Warehouse.ReturnAddress.set -> void +ShipEngineSDK.Model.Warehouse.Warehouse() -> void +ShipEngineSDK.Model.Warehouse.WarehouseId.get -> string! +ShipEngineSDK.Model.Warehouse.WarehouseId.set -> void +ShipEngineSDK.Model.Webhook +ShipEngineSDK.Model.Webhook.Event.get -> ShipEngineSDK.Model.WebhookEvent? +ShipEngineSDK.Model.Webhook.Event.set -> void +ShipEngineSDK.Model.Webhook.Headers.get -> System.Collections.Generic.List! +ShipEngineSDK.Model.Webhook.Headers.set -> void +ShipEngineSDK.Model.Webhook.Url.get -> string! +ShipEngineSDK.Model.Webhook.Url.set -> void +ShipEngineSDK.Model.Webhook.Webhook() -> void +ShipEngineSDK.Model.Webhook.WebhookId.get -> string! +ShipEngineSDK.Model.Webhook.WebhookId.set -> void +ShipEngineSDK.Model.WebhookEvent +ShipEngineSDK.Model.WebhookEvent.WebhookEvent(string! value) -> void +ShipEngineSDK.Model.WebhookHeader +ShipEngineSDK.Model.WebhookHeader.Key.get -> string! +ShipEngineSDK.Model.WebhookHeader.Key.set -> void +ShipEngineSDK.Model.WebhookHeader.Value.get -> string! +ShipEngineSDK.Model.WebhookHeader.Value.set -> void +ShipEngineSDK.Model.WebhookHeader.WebhookHeader() -> void +ShipEngineSDK.Model.Weight +ShipEngineSDK.Model.Weight.Unit.get -> ShipEngineSDK.Model.WeightUnit! +ShipEngineSDK.Model.Weight.Unit.set -> void +ShipEngineSDK.Model.Weight.Value.get -> double +ShipEngineSDK.Model.Weight.Value.set -> void +ShipEngineSDK.Model.Weight.Weight() -> void +ShipEngineSDK.Model.WeightUnit +ShipEngineSDK.Model.WeightUnit.WeightUnit(string! value) -> void +ShipEngineSDK.RequestOptions +ShipEngineSDK.RequestOptions.Cookies.get -> System.Collections.Generic.List! +ShipEngineSDK.RequestOptions.Cookies.set -> void +ShipEngineSDK.RequestOptions.Data.get -> string! +ShipEngineSDK.RequestOptions.Data.set -> void +ShipEngineSDK.RequestOptions.FileParameters.get -> ShipEngineSDK.Client.Multimap! +ShipEngineSDK.RequestOptions.FormParameters.get -> System.Collections.Generic.Dictionary! +ShipEngineSDK.RequestOptions.FullPath() -> string! +ShipEngineSDK.RequestOptions.HeaderParameters.get -> ShipEngineSDK.Client.Multimap! +ShipEngineSDK.RequestOptions.Operation.get -> string! +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.ShipEngineException.ErrorCode.get -> ShipEngineSDK.Enums.ErrorCode +ShipEngineSDK.ShipEngineException.ErrorSource.get -> ShipEngineSDK.Enums.ErrorSource +ShipEngineSDK.ShipEngineException.ErrorType.get -> ShipEngineSDK.Enums.ErrorType +ShipEngineSDK.ShipEngineException.ShipEngineException(string! message, ShipEngineSDK.Enums.ErrorSource errorSource = ShipEngineSDK.Enums.ErrorSource.Shipengine, ShipEngineSDK.Enums.ErrorType errorType = ShipEngineSDK.Enums.ErrorType.System, ShipEngineSDK.Enums.ErrorCode errorCode = ShipEngineSDK.Enums.ErrorCode.Unspecified, string? requestID = null, System.Net.Http.HttpResponseMessage? responseMessage = null) -> void +static readonly ShipEngineSDK.Client.ClientUtils.JsonRegex -> System.Text.RegularExpressions.Regex! +static readonly ShipEngineSDK.Model.AbstractOpenAPISchema.SerializerSettings -> System.Text.Json.JsonSerializerOptions! +static ShipEngineSDK.Client.ClientUtils.Base64Encode(string! text) -> string! +static ShipEngineSDK.Client.ClientUtils.IsJsonMime(string! mime) -> bool +static ShipEngineSDK.Client.ClientUtils.ParameterToMultiMap(string! collectionFormat, string! name, object! value) -> ShipEngineSDK.Client.Multimap! +static ShipEngineSDK.Client.ClientUtils.ParameterToString(object! obj) -> string! +static ShipEngineSDK.Client.ClientUtils.ReadAsBytes(System.IO.Stream! inputStream) -> byte[]! +static ShipEngineSDK.Client.ClientUtils.SanitizeFilename(string! filename) -> string! +static ShipEngineSDK.Client.ClientUtils.SelectHeaderAccept(string![]! accepts) -> string! +static ShipEngineSDK.Client.ClientUtils.SelectHeaderContentType(string![]! contentTypes) -> string! +static ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum.Jpeg.get -> ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum! +static ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum.Png.get -> ShipEngineSDK.Model.AccountSettingsImages.ImageContentTypeEnum! +static ShipEngineSDK.Model.AddressResidentialIndicator.No.get -> ShipEngineSDK.Model.AddressResidentialIndicator! +static ShipEngineSDK.Model.AddressResidentialIndicator.Unknown.get -> ShipEngineSDK.Model.AddressResidentialIndicator! +static ShipEngineSDK.Model.AddressResidentialIndicator.Yes.get -> ShipEngineSDK.Model.AddressResidentialIndicator! +static ShipEngineSDK.Model.AddressValidationCode.A1000.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1001.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1002.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1003.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1004.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1005.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1006.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1007.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.A1008.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.R1000.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.R1001.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.R1002.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationCode.R1003.get -> ShipEngineSDK.Model.AddressValidationCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.AddressNotFound.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CityLocalityChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CityLocalityMaxLengthExceeded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CodedToCommunityLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CodedToNeighborhoodLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CodedToRooftopInterpolationLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CodedToRooftopLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CodedToStateLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CodedToStreetLavel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CompanyNameMaxLengthExceeded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.CountryInvalidLength.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.DoubleDependentLocalityChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.HouseNumberChanged.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.IncompatiblePairedLabels.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.InvalidBoxNumber.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.InvalidChargeEvent.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.InvalidHouseNumber.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.InvalidPostalCode.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.Line1MinMaxLength.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.Line2MaxLengthExceeded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.Line3MaxLengthExceeded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.MinimumPostalCodeVerificationFailed.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.MissingBoxNumber.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.MissingCmraOrPrivateMailBoxNumber.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.MissingHouseNumber.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.MultipleDirectionals.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.MultipleMatches.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.NameMaxLengthExceeded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.NonSupportedCountry.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.OrganizationChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PartiallyVerifiedToCityLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PartiallyVerifiedToPremiseLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PartiallyVerifiedToStateLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PartiallyVerifiedToStreetLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PhoneMaxLengthExceeded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PoBoxChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PostalCodeChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.PremiseTypeChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.StateProvinceChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.StateProvinceMaxLengthExceeded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.StreetDirectionChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.StreetDoesNotMatchUniqueStreetName.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.StreetNameSpellingChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.StreetNameTypeChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.SubadministrativeAreaChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.SubnationalAreaChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.SuiteHasNoSecondaries.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.SuiteMissing.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.SuiteNotValid.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.SuiteTypeChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.SuiteUnitNumberChangedOrAdded.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.UnsupportedCountry.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.UrbanizationChanged.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.VerifiedToCityLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.VerifiedToPremiseLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.VerifiedToStateLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.VerifiedToStreetLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationDetailCode.VerifiedToSuiteLevel.get -> ShipEngineSDK.Model.AddressValidationDetailCode! +static ShipEngineSDK.Model.AddressValidationMessageType.Error.get -> ShipEngineSDK.Model.AddressValidationMessageType! +static ShipEngineSDK.Model.AddressValidationMessageType.Info.get -> ShipEngineSDK.Model.AddressValidationMessageType! +static ShipEngineSDK.Model.AddressValidationMessageType.Warning.get -> ShipEngineSDK.Model.AddressValidationMessageType! +static ShipEngineSDK.Model.AddressValidationStatus.Error.get -> ShipEngineSDK.Model.AddressValidationStatus! +static ShipEngineSDK.Model.AddressValidationStatus.Unverified.get -> ShipEngineSDK.Model.AddressValidationStatus! +static ShipEngineSDK.Model.AddressValidationStatus.Verified.get -> ShipEngineSDK.Model.AddressValidationStatus! +static ShipEngineSDK.Model.AddressValidationStatus.Warning.get -> ShipEngineSDK.Model.AddressValidationStatus! +static ShipEngineSDK.Model.AllowedIncoterms.Cfr.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Cif.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Cip.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Cpt.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Daf.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Dap.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Ddp.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Ddu.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Deq.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Des.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Dpu.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Exw.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Fas.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Fca.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AllowedIncoterms.Fob.get -> ShipEngineSDK.Model.AllowedIncoterms! +static ShipEngineSDK.Model.AncillaryServiceEndorsement.AddressServiceRequested.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement! +static ShipEngineSDK.Model.AncillaryServiceEndorsement.ChangeServiceRequested.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement! +static ShipEngineSDK.Model.AncillaryServiceEndorsement.ForwardingServiceRequested.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement! +static ShipEngineSDK.Model.AncillaryServiceEndorsement.LeaveIfNoResponse.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement! +static ShipEngineSDK.Model.AncillaryServiceEndorsement.None.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement! +static ShipEngineSDK.Model.AncillaryServiceEndorsement.ReturnServiceRequested.get -> ShipEngineSDK.Model.AncillaryServiceEndorsement! +static ShipEngineSDK.Model.BatchesSortBy.CreatedAt.get -> ShipEngineSDK.Model.BatchesSortBy! +static ShipEngineSDK.Model.BatchesSortBy.ProcessedAt.get -> ShipEngineSDK.Model.BatchesSortBy! +static ShipEngineSDK.Model.BatchesSortBy.ShipDate.get -> ShipEngineSDK.Model.BatchesSortBy! +static ShipEngineSDK.Model.BatchStatus.Archived.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BatchStatus.Completed.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BatchStatus.CompletedWithErrors.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BatchStatus.Invalid.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BatchStatus.Notifying.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BatchStatus.Open.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BatchStatus.Processing.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BatchStatus.Queued.get -> ShipEngineSDK.Model.BatchStatus! +static ShipEngineSDK.Model.BillToParty.Recipient.get -> ShipEngineSDK.Model.BillToParty! +static ShipEngineSDK.Model.BillToParty.ThirdParty.get -> ShipEngineSDK.Model.BillToParty! +static ShipEngineSDK.Model.CarrierName.AccessWorldwide.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.AmazonBuyShipping.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.AmazonShippingUk.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Apc.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Asendia.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.AustraliaPost.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.CanadaPost.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.DhlEcommerce.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.DhlExpress.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.DhlExpressAu.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.DhlExpressCa.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.DhlExpressUk.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Dpd.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Endicia.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Fedex.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.FedexUk.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Firstmile.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Imex.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Lasership.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Newgistics.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Ontrac.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.PurolatorCanada.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.RoyalMail.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.RrDonnelley.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Seko.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Sendle.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.StampsCom.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierName.Ups.get -> ShipEngineSDK.Model.CarrierName! +static ShipEngineSDK.Model.CarrierNameWithSettings.DhlExpress.get -> ShipEngineSDK.Model.CarrierNameWithSettings! +static ShipEngineSDK.Model.CarrierNameWithSettings.Fedex.get -> ShipEngineSDK.Model.CarrierNameWithSettings! +static ShipEngineSDK.Model.CarrierNameWithSettings.Newgistics.get -> ShipEngineSDK.Model.CarrierNameWithSettings! +static ShipEngineSDK.Model.CarrierNameWithSettings.Ups.get -> ShipEngineSDK.Model.CarrierNameWithSettings! +static ShipEngineSDK.Model.CollectOnDeliveryPaymentType.Any.get -> ShipEngineSDK.Model.CollectOnDeliveryPaymentType! +static ShipEngineSDK.Model.CollectOnDeliveryPaymentType.Cash.get -> ShipEngineSDK.Model.CollectOnDeliveryPaymentType! +static ShipEngineSDK.Model.CollectOnDeliveryPaymentType.CashEquivalent.get -> ShipEngineSDK.Model.CollectOnDeliveryPaymentType! +static ShipEngineSDK.Model.CollectOnDeliveryPaymentType.None.get -> ShipEngineSDK.Model.CollectOnDeliveryPaymentType! +static ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum.Jpeg.get -> ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum! +static ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum.Png.get -> ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ImageContentTypeEnum! +static ShipEngineSDK.Model.DefaultLabelLayout.Letter.get -> ShipEngineSDK.Model.DefaultLabelLayout! +static ShipEngineSDK.Model.DefaultLabelLayout._4x6.get -> ShipEngineSDK.Model.DefaultLabelLayout! +static ShipEngineSDK.Model.DeliveryConfirmation.AdultSignature.get -> ShipEngineSDK.Model.DeliveryConfirmation! +static ShipEngineSDK.Model.DeliveryConfirmation.Delivery.get -> ShipEngineSDK.Model.DeliveryConfirmation! +static ShipEngineSDK.Model.DeliveryConfirmation.DeliveryMailed.get -> ShipEngineSDK.Model.DeliveryConfirmation! +static ShipEngineSDK.Model.DeliveryConfirmation.DirectSignature.get -> ShipEngineSDK.Model.DeliveryConfirmation! +static ShipEngineSDK.Model.DeliveryConfirmation.None.get -> ShipEngineSDK.Model.DeliveryConfirmation! +static ShipEngineSDK.Model.DeliveryConfirmation.Signature.get -> ShipEngineSDK.Model.DeliveryConfirmation! +static ShipEngineSDK.Model.DeliveryConfirmation.VerbalConfirmation.get -> ShipEngineSDK.Model.DeliveryConfirmation! +static ShipEngineSDK.Model.DimensionUnit.Centimeter.get -> ShipEngineSDK.Model.DimensionUnit! +static ShipEngineSDK.Model.DimensionUnit.Inch.get -> ShipEngineSDK.Model.DimensionUnit! +static ShipEngineSDK.Model.DisplayScheme.Label.get -> ShipEngineSDK.Model.DisplayScheme! +static ShipEngineSDK.Model.DisplayScheme.LabelAndPaperless.get -> ShipEngineSDK.Model.DisplayScheme! +static ShipEngineSDK.Model.DisplayScheme.LabelAndQrCode.get -> ShipEngineSDK.Model.DisplayScheme! +static ShipEngineSDK.Model.DisplayScheme.Paperless.get -> ShipEngineSDK.Model.DisplayScheme! +static ShipEngineSDK.Model.DisplayScheme.QrCode.get -> ShipEngineSDK.Model.DisplayScheme! +static ShipEngineSDK.Model.ErrorCode.AutoFundNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.BatchCannotBeModified.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.CarrierConflict.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.CarrierDisconnected.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.CarrierNotConnected.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.CarrierNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.ConfirmationNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.CustomsItemsRequired.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.DefaultWarehouseCannotBeDeleted.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.FieldConflict.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.FieldValueRequired.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.Forbidden.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.IdentifierConflict.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.IdentifiersMustMatch.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.IncompatiblePairedLabels.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InsufficientFunds.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidAddress.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidBillingPlan.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidChargeEvent.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidFieldValue.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidIdentifier.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidObject.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidStatus.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.InvalidStringLength.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.LabelImagesNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.MeterFailure.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.NoRatesReturned.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.OrderSourceNotActive.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.RateLimitExceeded.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.RefreshNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.RequestBodyRequired.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.ReturnLabelNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.SettingsNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.SubscriptionInactive.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.TermsNotAccepted.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.TrackingNotSupported.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.TrialExpired.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.Unauthorized.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.Unknown.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.Unspecified.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.VerificationFailure.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.WarehouseConflict.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorCode.WebhookEventTypeConflict.get -> ShipEngineSDK.Model.ErrorCode! +static ShipEngineSDK.Model.ErrorSource.Carrier.get -> ShipEngineSDK.Model.ErrorSource! +static ShipEngineSDK.Model.ErrorSource.OrderSource.get -> ShipEngineSDK.Model.ErrorSource! +static ShipEngineSDK.Model.ErrorSource.Shipengine.get -> ShipEngineSDK.Model.ErrorSource! +static ShipEngineSDK.Model.ErrorType.AccountStatus.get -> ShipEngineSDK.Model.ErrorType! +static ShipEngineSDK.Model.ErrorType.BusinessRules.get -> ShipEngineSDK.Model.ErrorType! +static ShipEngineSDK.Model.ErrorType.Integrations.get -> ShipEngineSDK.Model.ErrorType! +static ShipEngineSDK.Model.ErrorType.Security.get -> ShipEngineSDK.Model.ErrorType! +static ShipEngineSDK.Model.ErrorType.System.get -> ShipEngineSDK.Model.ErrorType! +static ShipEngineSDK.Model.ErrorType.Validation.get -> ShipEngineSDK.Model.ErrorType! +static ShipEngineSDK.Model.FedexPickupType.BusinessServiceCenter.get -> ShipEngineSDK.Model.FedexPickupType! +static ShipEngineSDK.Model.FedexPickupType.DropBox.get -> ShipEngineSDK.Model.FedexPickupType! +static ShipEngineSDK.Model.FedexPickupType.None.get -> ShipEngineSDK.Model.FedexPickupType! +static ShipEngineSDK.Model.FedexPickupType.RegularPickup.get -> ShipEngineSDK.Model.FedexPickupType! +static ShipEngineSDK.Model.FedexPickupType.RequestCourier.get -> ShipEngineSDK.Model.FedexPickupType! +static ShipEngineSDK.Model.FedexPickupType.Station.get -> ShipEngineSDK.Model.FedexPickupType! +static ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum.Jpeg.get -> ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum! +static ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum.Png.get -> ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ImageContentTypeEnum! +static ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum.AfterHoursDropbox.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum! +static ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum.AfterHoursLocker.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum! +static ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum.DropOffPoint.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum! +static ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum.PickupPoint.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum! +static ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum.PrintServices.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.FeaturesEnum! +static ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum.Locker.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum! +static ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum.Pudo.get -> ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.TypeEnum! +static ShipEngineSDK.Model.IdentifierType.Abn.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Ein.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Eori.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Ioss.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Oss.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Pan.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Passport.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Pccc.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Ssn.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Tin.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Vat.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.IdentifierType.Voec.get -> ShipEngineSDK.Model.IdentifierType! +static ShipEngineSDK.Model.InsuranceProvider.Carrier.get -> ShipEngineSDK.Model.InsuranceProvider! +static ShipEngineSDK.Model.InsuranceProvider.None.get -> ShipEngineSDK.Model.InsuranceProvider! +static ShipEngineSDK.Model.InsuranceProvider.Shipsurance.get -> ShipEngineSDK.Model.InsuranceProvider! +static ShipEngineSDK.Model.InsuranceProvider.ThirdParty.get -> ShipEngineSDK.Model.InsuranceProvider! +static ShipEngineSDK.Model.LabelChargeEvent.CarrierDefault.get -> ShipEngineSDK.Model.LabelChargeEvent! +static ShipEngineSDK.Model.LabelChargeEvent.OnCarrierAcceptance.get -> ShipEngineSDK.Model.LabelChargeEvent! +static ShipEngineSDK.Model.LabelChargeEvent.OnCreation.get -> ShipEngineSDK.Model.LabelChargeEvent! +static ShipEngineSDK.Model.LabelDownloadType.Inline.get -> ShipEngineSDK.Model.LabelDownloadType! +static ShipEngineSDK.Model.LabelDownloadType.Url.get -> ShipEngineSDK.Model.LabelDownloadType! +static ShipEngineSDK.Model.LabelFormat.Pdf.get -> ShipEngineSDK.Model.LabelFormat! +static ShipEngineSDK.Model.LabelFormat.Png.get -> ShipEngineSDK.Model.LabelFormat! +static ShipEngineSDK.Model.LabelFormat.Zpl.get -> ShipEngineSDK.Model.LabelFormat! +static ShipEngineSDK.Model.LabelLayout.Letter.get -> ShipEngineSDK.Model.LabelLayout! +static ShipEngineSDK.Model.LabelLayout._4x6.get -> ShipEngineSDK.Model.LabelLayout! +static ShipEngineSDK.Model.LabelStatus.Completed.get -> ShipEngineSDK.Model.LabelStatus! +static ShipEngineSDK.Model.LabelStatus.Error.get -> ShipEngineSDK.Model.LabelStatus! +static ShipEngineSDK.Model.LabelStatus.Processing.get -> ShipEngineSDK.Model.LabelStatus! +static ShipEngineSDK.Model.LabelStatus.Voided.get -> ShipEngineSDK.Model.LabelStatus! +static ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum.AfterHoursDropbox.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum! +static ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum.AfterHoursLocker.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum! +static ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum.DropOffPoint.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum! +static ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum.PickupPoint.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum! +static ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum.PrintServices.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.FeaturesEnum! +static ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum.Locker.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum! +static ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum.Pudo.get -> ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.TypeEnum! +static ShipEngineSDK.Model.ManifestRequestStatus.Completed.get -> ShipEngineSDK.Model.ManifestRequestStatus! +static ShipEngineSDK.Model.ManifestRequestStatus.InProgress.get -> ShipEngineSDK.Model.ManifestRequestStatus! +static ShipEngineSDK.Model.NonDelivery.ReturnToSender.get -> ShipEngineSDK.Model.NonDelivery! +static ShipEngineSDK.Model.NonDelivery.TreatAsAbandoned.get -> ShipEngineSDK.Model.NonDelivery! +static ShipEngineSDK.Model.OrderSourceName.AmazonCa.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.AmazonUs.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Brightpearl.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.ChannelAdvisor.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Cratejoy.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Ebay.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Etsy.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.GrouponGoods.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Jane.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Magento.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Paypal.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.SellerActive.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Shopify.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Squarespace.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.StitchLabs.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.ThreeDcart.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Tophatter.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Volusion.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.Walmart.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OrderSourceName.WooCommerce.get -> ShipEngineSDK.Model.OrderSourceName! +static ShipEngineSDK.Model.OriginType.DropOff.get -> ShipEngineSDK.Model.OriginType! +static ShipEngineSDK.Model.OriginType.Pickup.get -> ShipEngineSDK.Model.OriginType! +static ShipEngineSDK.Model.PackageContents.Documents.get -> ShipEngineSDK.Model.PackageContents! +static ShipEngineSDK.Model.PackageContents.Gift.get -> ShipEngineSDK.Model.PackageContents! +static ShipEngineSDK.Model.PackageContents.Merchandise.get -> ShipEngineSDK.Model.PackageContents! +static ShipEngineSDK.Model.PackageContents.Other.get -> ShipEngineSDK.Model.PackageContents! +static ShipEngineSDK.Model.PackageContents.ReturnedGoods.get -> ShipEngineSDK.Model.PackageContents! +static ShipEngineSDK.Model.PackageContents.Sample.get -> ShipEngineSDK.Model.PackageContents! +static ShipEngineSDK.Model.PackagingGroup.I.get -> ShipEngineSDK.Model.PackagingGroup! +static ShipEngineSDK.Model.PackagingGroup.Ii.get -> ShipEngineSDK.Model.PackagingGroup! +static ShipEngineSDK.Model.PackagingGroup.Iii.get -> ShipEngineSDK.Model.PackagingGroup! +static ShipEngineSDK.Model.PackagingInstructionSection._1.get -> ShipEngineSDK.Model.PackagingInstructionSection! +static ShipEngineSDK.Model.PackagingInstructionSection._1a.get -> ShipEngineSDK.Model.PackagingInstructionSection! +static ShipEngineSDK.Model.PackagingInstructionSection._1b.get -> ShipEngineSDK.Model.PackagingInstructionSection! +static ShipEngineSDK.Model.PackagingInstructionSection._2.get -> ShipEngineSDK.Model.PackagingInstructionSection! +static ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.TypeEnum.What3words.get -> ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.TypeEnum! +static ShipEngineSDK.Model.RateResponseStatus.Completed.get -> ShipEngineSDK.Model.RateResponseStatus! +static ShipEngineSDK.Model.RateResponseStatus.Error.get -> ShipEngineSDK.Model.RateResponseStatus! +static ShipEngineSDK.Model.RateResponseStatus.Partial.get -> ShipEngineSDK.Model.RateResponseStatus! +static ShipEngineSDK.Model.RateResponseStatus.Working.get -> ShipEngineSDK.Model.RateResponseStatus! +static ShipEngineSDK.Model.RateType.Check.get -> ShipEngineSDK.Model.RateType! +static ShipEngineSDK.Model.RateType.Shipment.get -> ShipEngineSDK.Model.RateType! +static ShipEngineSDK.Model.ReasonCode.ContactCarrier.get -> ShipEngineSDK.Model.ReasonCode! +static ShipEngineSDK.Model.ReasonCode.LabelAlreadyUsed.get -> ShipEngineSDK.Model.ReasonCode! +static ShipEngineSDK.Model.ReasonCode.LabelAlreadyVoided.get -> ShipEngineSDK.Model.ReasonCode! +static ShipEngineSDK.Model.ReasonCode.LabelNotFoundWithinVoidPeriod.get -> ShipEngineSDK.Model.ReasonCode! +static ShipEngineSDK.Model.ReasonCode.Unknown.get -> ShipEngineSDK.Model.ReasonCode! +static ShipEngineSDK.Model.ReasonCode.Unspecified.get -> ShipEngineSDK.Model.ReasonCode! +static ShipEngineSDK.Model.ReasonCode.ValidationFailed.get -> ShipEngineSDK.Model.ReasonCode! +static ShipEngineSDK.Model.Redirect.ShipengineDashboard.get -> ShipEngineSDK.Model.Redirect! +static ShipEngineSDK.Model.RegulationLevel.ExceptedQuantity.get -> ShipEngineSDK.Model.RegulationLevel! +static ShipEngineSDK.Model.RegulationLevel.FullyRegulated.get -> ShipEngineSDK.Model.RegulationLevel! +static ShipEngineSDK.Model.RegulationLevel.LightlyRegulated.get -> ShipEngineSDK.Model.RegulationLevel! +static ShipEngineSDK.Model.RegulationLevel.LimitedQuantities.get -> ShipEngineSDK.Model.RegulationLevel! +static ShipEngineSDK.Model.ShipmentsSortBy.CreatedAt.get -> ShipEngineSDK.Model.ShipmentsSortBy! +static ShipEngineSDK.Model.ShipmentsSortBy.ModifiedAt.get -> ShipEngineSDK.Model.ShipmentsSortBy! +static ShipEngineSDK.Model.ShipmentStatus.Cancelled.get -> ShipEngineSDK.Model.ShipmentStatus! +static ShipEngineSDK.Model.ShipmentStatus.LabelPurchased.get -> ShipEngineSDK.Model.ShipmentStatus! +static ShipEngineSDK.Model.ShipmentStatus.Pending.get -> ShipEngineSDK.Model.ShipmentStatus! +static ShipEngineSDK.Model.ShipmentStatus.Processing.get -> ShipEngineSDK.Model.ShipmentStatus! +static ShipEngineSDK.Model.SmartPostHub.AllentownPa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.AtlantaGa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.BaltimoreMd.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.CharlotteNc.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.ChinoCa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.DallasTx.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.DenverCo.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.DetroitMi.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.EdisonNj.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.GroveCityOh.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.GroveportOh.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.HoustonTx.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.IndianapolisIn.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.KansasCityKs.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.LosAngelesCa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.MartinsburgWv.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.MemphisTn.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.MinneapolisMn.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.NewarkNy.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.NewBerlinWi.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.None.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.NorthboroughMa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.OrlandoFl.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.PhoneixAz.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.PittsburghPa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.RenoNv.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.SacramentoCa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.SaltLakeCityUt.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.ScrantonPa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.SeattleWa.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.SouthBrunswickNj.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.StLouisMo.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.WheelingIl.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SmartPostHub.WindsorCt.get -> ShipEngineSDK.Model.SmartPostHub! +static ShipEngineSDK.Model.SortDir.Asc.get -> ShipEngineSDK.Model.SortDir! +static ShipEngineSDK.Model.SortDir.Desc.get -> ShipEngineSDK.Model.SortDir! +static ShipEngineSDK.Model.StatusCode.Ac.get -> ShipEngineSDK.Model.StatusCode! +static ShipEngineSDK.Model.StatusCode.At.get -> ShipEngineSDK.Model.StatusCode! +static ShipEngineSDK.Model.StatusCode.De.get -> ShipEngineSDK.Model.StatusCode! +static ShipEngineSDK.Model.StatusCode.Ex.get -> ShipEngineSDK.Model.StatusCode! +static ShipEngineSDK.Model.StatusCode.It.get -> ShipEngineSDK.Model.StatusCode! +static ShipEngineSDK.Model.StatusCode.Ny.get -> ShipEngineSDK.Model.StatusCode! +static ShipEngineSDK.Model.StatusCode.Un.get -> ShipEngineSDK.Model.StatusCode! +static ShipEngineSDK.Model.TaxableEntityType.Ior.get -> ShipEngineSDK.Model.TaxableEntityType! +static ShipEngineSDK.Model.TaxableEntityType.Recipient.get -> ShipEngineSDK.Model.TaxableEntityType! +static ShipEngineSDK.Model.TaxableEntityType.Shipper.get -> ShipEngineSDK.Model.TaxableEntityType! +static ShipEngineSDK.Model.TrackingStatus.Delivered.get -> ShipEngineSDK.Model.TrackingStatus! +static ShipEngineSDK.Model.TrackingStatus.Error.get -> ShipEngineSDK.Model.TrackingStatus! +static ShipEngineSDK.Model.TrackingStatus.InTransit.get -> ShipEngineSDK.Model.TrackingStatus! +static ShipEngineSDK.Model.TrackingStatus.Unknown.get -> ShipEngineSDK.Model.TrackingStatus! +static ShipEngineSDK.Model.TransportMean.CargoAircraftOnly.get -> ShipEngineSDK.Model.TransportMean! +static ShipEngineSDK.Model.TransportMean.Ground.get -> ShipEngineSDK.Model.TransportMean! +static ShipEngineSDK.Model.TransportMean.PassengerAircraft.get -> ShipEngineSDK.Model.TransportMean! +static ShipEngineSDK.Model.TransportMean.Water.get -> ShipEngineSDK.Model.TransportMean! +static ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum.Jpeg.get -> ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum! +static ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum.Png.get -> ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ImageContentTypeEnum! +static ShipEngineSDK.Model.UpsPickupType.CustomerCounter.get -> ShipEngineSDK.Model.UpsPickupType! +static ShipEngineSDK.Model.UpsPickupType.DailyPickup.get -> ShipEngineSDK.Model.UpsPickupType! +static ShipEngineSDK.Model.UpsPickupType.OccasionalPickup.get -> ShipEngineSDK.Model.UpsPickupType! +static ShipEngineSDK.Model.ValidateAddress.NoValidation.get -> ShipEngineSDK.Model.ValidateAddress! +static ShipEngineSDK.Model.ValidateAddress.ValidateAndClean.get -> ShipEngineSDK.Model.ValidateAddress! +static ShipEngineSDK.Model.ValidateAddress.ValidateOnly.get -> ShipEngineSDK.Model.ValidateAddress! +static ShipEngineSDK.Model.ValidationStatus.HasWarnings.get -> ShipEngineSDK.Model.ValidationStatus! +static ShipEngineSDK.Model.ValidationStatus.Invalid.get -> ShipEngineSDK.Model.ValidationStatus! +static ShipEngineSDK.Model.ValidationStatus.Unknown.get -> ShipEngineSDK.Model.ValidationStatus! +static ShipEngineSDK.Model.ValidationStatus.Valid.get -> ShipEngineSDK.Model.ValidationStatus! +static ShipEngineSDK.Model.WebhookEvent.Batch.get -> ShipEngineSDK.Model.WebhookEvent! +static ShipEngineSDK.Model.WebhookEvent.CarrierConnected.get -> ShipEngineSDK.Model.WebhookEvent! +static ShipEngineSDK.Model.WebhookEvent.OrderSourceRefreshComplete.get -> ShipEngineSDK.Model.WebhookEvent! +static ShipEngineSDK.Model.WebhookEvent.Rate.get -> ShipEngineSDK.Model.WebhookEvent! +static ShipEngineSDK.Model.WebhookEvent.ReportComplete.get -> ShipEngineSDK.Model.WebhookEvent! +static ShipEngineSDK.Model.WebhookEvent.SalesOrdersImported.get -> ShipEngineSDK.Model.WebhookEvent! +static ShipEngineSDK.Model.WebhookEvent.Track.get -> ShipEngineSDK.Model.WebhookEvent! +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! +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! +virtual ShipEngineSDK.Model.AddFundsToCarrierResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AddFundsToInsuranceRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AddFundsToInsuranceResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Address.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AddressToValidate.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AddressValidatingShipment.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AddressValidationResult.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AddToBatchRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AdvancedShipmentOptions.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AdvancedShipmentOptionsDangerousGoodsContact.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AdvancedShipmentOptionsFedexFreight.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AlternativeIdentifier.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.AlternativeIdentifiers.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Batch.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.BatchResponseError.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.BulkRate.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CalculateRatesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Carrier.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CarrierAdvancedOption.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CollectOnDelivery.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectAccessWorldwideRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectAmazonBuyShippingRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectAmazonShippingUk.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectApcRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectAsendiaRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectAustraliaPostRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectCanadaPostRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectCarrierResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectDhlEcommerceRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectDhlExpressAuRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectDhlExpressCaRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectDhlExpressRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectDhlExpressUkRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectDpdRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectEndiciaRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectFedexRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectFedexUkRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectFirstmileRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectImexRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectInsurerRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectLasershipRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectNewgisticsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectOntracRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectPurolatorRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectRoyalMailRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectRrDonnelleyRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectSekoRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectSendleRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectStampsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ConnectUpsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ContactDetails.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateAccountSettingsImageRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateAndProcessBatchRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateAndProcessBatchRequestBodyProcessLabels.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateAndValidateShipment.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateBatchRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateBatchResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateLabelFromRateRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateLabelFromRateResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateLabelFromShipmentRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateLabelFromShipmentResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateLabelRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateLabelResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateManifestByObjectRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateManifestLabelIdsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateManifestResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreatePackageTypeRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreatePackageTypeResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateReturnLabelRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateReturnLabelResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateShipmentResponseBodyFields.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateShipmentsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateShipmentsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateTagResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateWarehouseRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateWarehouseResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateWebhookRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CreateWebhookResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.CustomsItem.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.DangerousAmount.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.DangerousGoods.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.DeletePickupByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.DeleteScheduledPickupResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.DeprecatedManifest.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.DhlExpressAccountSettings.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.DhlExpressSettingsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Dimensions.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Error.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ErrorResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ErrorWithLabelIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.FedexAccountSettings.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.FedexAccountSettingsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.FedexSettingsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetAccountSettingsImagesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetAccountSettingsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetBatchByExternalIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetBatchByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetCarrierByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetCarrierOptionsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetCarriersResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetInsuranceBalanceResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetLabelByExternalShipmentIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetLabelByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetManifestByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetPackageTypeByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetPickupByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetPickupsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetRateByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetServicePointByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetServicePointByIdResponseBodyServicePoint.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetServicePointsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetServicePointsRequestBodyAddress.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetServicePointsRequestBodyProvidersInner.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetServicePointsRequestBodyShipment.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetShipmentByExternalIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetShipmentByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetTrackingLogFromLabelResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetTrackingLogResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetWarehouseByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.GetWebhookByIdResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ImporterOfRecords.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.InternationalShipmentOptions.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.InvoiceAdditionalDetails.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Label.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.LabelDownload.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.LabelMessages.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.LabelPackagesInner.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Link.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListAccountImagesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListAccountSettingsBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListAccountSettingsImagesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListBatchErrorsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListBatchesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListCarrierPackageTypesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListCarrierServicesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListCarriersResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListLabelsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListManifestsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListPackageTypesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListPickupResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListServicePointsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInner.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperation.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListServicePointsResponseBodyServicePointsInnerHoursOfOperationMondayInner.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListShipmentRatesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListShipmentsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListTagsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ListWarehousesResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Manifest.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ManifestDownload.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ManifestRequest.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Manifests.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ManifestsRequests.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ModifyBatch.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.MonetaryValue.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.OptionalLink.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Package.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PackageType.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PagedListResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PaginationLink.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PaperlessDownload.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ParseAddressRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ParseAddressResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ParseShipmentRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ParseShipmentResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PartialAddress.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PartialShipment.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PartialShippingAddress.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PartialShippingAddressTo.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PartialShippingAddressToGeolocationInner.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PaymentAmount.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Pickup.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PickupResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PickupWindow.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PickupWindows.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ProcessBatchRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Products.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.PurchaseLabelWithoutShipment.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Rate.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateEstimate.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateEstimateByCarrierId.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateEstimateByCarrierIds.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateEstimateOptions.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateRequestByShipmentIds.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateRequestByShipments.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateRequestOptions.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateRequestRateOptions.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RateResponse.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RatesInformation.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RecognizedEntity.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.RemoveFromBatchRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ResponseMessage.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.SchedulePickupRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.SchedulePickupResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Service.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Shipment.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ShipmentIdRequest.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ShipmentItem.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ShipmentRequest.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ShippingAddress.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ShippingAddressTo.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Tag.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.TagShipmentResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.TaxIdentifier.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.TokensGetEphemeralTokenResponseBodyYaml.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.TrackEvent.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.TrackingInformation.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateAccountSettingsImageRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateAmazonBuyShippingRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateDhlExpressSettingsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateFedexSettingsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateNewgisticsSettingsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdatePackageTypeRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateShipmentFields.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateShipmentRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateShipmentResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateShipmentsTags.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateShipmentsTagsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateShipmentsTagsShipmentsTagsInner.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateUpsSettingsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateWarehouseRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateWarehouseSettingsRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpdateWebhookRequestBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpsAccountSettings.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpsInvoice.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.UpsSettingsResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.ValidateShipmentFields.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.VoidLabelResponseBody.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Warehouse.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Webhook.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.WebhookHeader.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.Model.Weight.ToJson(System.Text.Json.JsonSerializerOptions! options) -> string! +virtual ShipEngineSDK.ShipEngineClient.SendHttpRequestAsync(System.Net.Http.HttpMethod! method, ShipEngineSDK.RequestOptions! requestOptions, System.Net.Http.HttpClient! client, ShipEngineSDK.Config! config, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! +virtual ShipEngineSDK.ShipEngineClient.SendHttpRequestAsync(System.Net.Http.HttpMethod! method, string! path, string? jsonContent, System.Net.Http.HttpClient! client, ShipEngineSDK.Config! config, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task! \ No newline at end of file diff --git a/ShipEngineSDK/RequestOptions.cs b/ShipEngineSDK/RequestOptions.cs new file mode 100644 index 00000000..d1cb8d50 --- /dev/null +++ b/ShipEngineSDK/RequestOptions.cs @@ -0,0 +1,83 @@ +/* + * ShipEngine API + * + * ShipEngine's easy-to-use REST API lets you manage all of your shipping needs without worrying about the complexities of different carrier APIs and protocols. We handle all the heavy lifting so you can focus on providing a first-class shipping experience for your customers at the best possible prices. Each of ShipEngine's features can be used by itself or in conjunction with each other to build powerful shipping functionality into your application or service. ## Getting Started If you're new to REST APIs then be sure to read our [introduction to REST](https://www.shipengine.com/docs/rest/) to understand the basics. Learn how to [authenticate yourself to ShipEngine](https://www.shipengine.com/docs/auth/), and then use our [sandbox environment](https://www.shipengine.com/docs/sandbox/) to kick the tires and get familiar with our API. If you run into any problems, then be sure to check the [error handling guide](https://www.shipengine.com/docs/errors/) for tips. Here are some step-by-step **tutorials** to get you started: - [Learn how to create your first shipping label](https://www.shipengine.com/docs/labels/create-a-label/) - [Calculate shipping costs and compare rates across carriers](https://www.shipengine.com/docs/rates/) - [Track packages on-demand or in real time](https://www.shipengine.com/docs/tracking/) - [Validate mailing addresses anywhere on Earth](https://www.shipengine.com/docs/addresses/validation/) ## Shipping Labels for Every Major Carrier ShipEngine makes it easy to [create shipping labels for any carrier](https://www.shipengine.com/docs/labels/create-a-label/) and [download them](https://www.shipengine.com/docs/labels/downloading/) in a [variety of file formats](https://www.shipengine.com/docs/labels/formats/). You can even customize labels with your own [messages](https://www.shipengine.com/docs/labels/messages/) and [images](https://www.shipengine.com/docs/labels/branding/). ## Real-Time Package Tracking With ShipEngine you can [get the current status of a package](https://www.shipengine.com/docs/tracking/) or [subscribe to real-time tracking updates](https://www.shipengine.com/docs/tracking/webhooks/) via webhooks. You can also create [custimized tracking pages](https://www.shipengine.com/docs/tracking/branded-tracking-page/) with your own branding so your customers will always know where their package is. ## Compare Shipping Costs Across Carriers Make sure you ship as cost-effectively as possible by [comparing rates across carriers](https://www.shipengine.com/docs/rates/get-shipment-rates/) using the ShipEngine Rates API. Or if you don't know the full shipment details yet, then you can [get rate estimates](https://www.shipengine.com/docs/rates/estimate/) with limited address info. ## Worldwide Address Validation ShipEngine supports [address validation](https://www.shipengine.com/docs/addresses/validation/) for virtually [every country on Earth](https://www.shipengine.com/docs/addresses/validation/countries/), including the United States, Canada, Great Britain, Australia, Germany, France, Norway, Spain, Sweden, Israel, Italy, and over 160 others. # Authentication - -> + * + * The version of the OpenAPI document: 1.1.202406071006 + * Contact: sales@shipengine.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; + +namespace ShipEngineSDK; +/// +/// A container for generalized request inputs. This type allows consumers to extend the request functionality +/// by abstracting away from the default (built-in) request framework (e.g. RestSharp). +/// +public class RequestOptions(string path) +{ + string _path = path; + + /// + /// Parameters to be bound to path parts of the Request's URL + /// + internal Dictionary PathParameters { get; } = new(); + + /// + /// Query parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + internal Multimap QueryParameters { get; } = new(); + + /// + /// Header parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + internal Multimap HeaderParameters { get; } = new(); + + /// + /// Form parameters to be sent along with the request. + /// + internal Dictionary FormParameters { get; } = new(); + + /// + /// File parameters to be sent along with the request. + /// + internal Multimap FileParameters { get; } = new(); + + /// + /// Cookies to be sent along with the request. + /// + internal List Cookies { get; set; } = new(); + + /// + /// Operation associated with the request path. + /// + internal string Operation { get; set; } + + /// + /// Any data associated with a request body. + /// + internal string Data { get; set; } + + internal string FullPath() + { + var path = PathParameters.Aggregate(_path, + (x, y) => x.Replace("{" + y.Key + "}", Uri.EscapeDataString(y.Value))); + if (!QueryParameters.Any()) + { + return path; + } + + var queryString = String.Join("&", + QueryParameters.Select(x => $"{x.Key}={Uri.EscapeDataString(String.Join(",", x.Value))}")); + + return $"{path}?{queryString}"; + } +} \ No newline at end of file diff --git a/ShipEngine/ShipEngine.cs b/ShipEngineSDK/ShipEngine.cs similarity index 72% rename from ShipEngine/ShipEngine.cs rename to ShipEngineSDK/ShipEngine.cs index c6da51cb..f08206e7 100644 --- a/ShipEngine/ShipEngine.cs +++ b/ShipEngineSDK/ShipEngine.cs @@ -1,20 +1,23 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Result = ShipEngineSDK.ValidateAddresses.Result; using ShipEngineSDK.Common; using ShipEngineSDK.Manifests; using System; using System.Collections.Generic; using System.Net.Http; +using System.Runtime.CompilerServices; using System.Text.Json; using System.Threading.Tasks; +using Result = ShipEngineSDK.ValidateAddresses.Result; + +[assembly: InternalsVisibleTo("ShipEngineSDK.Test")] namespace ShipEngineSDK { /// /// Interface for ShipEngine /// - public interface IShipEngine + public partial interface IShipEngine { /// /// Validates an address in nearly any country in the world. @@ -152,200 +155,6 @@ public interface IShipEngine Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams, Config methodConfig); } - /// - /// Mock implementation of IShipEngine - /// - public class ShipEngineMock : IShipEngine - { - /// - /// Validates an address in nearly any country in the world. - /// - /// The address to validate. This can even be an incomplete or improperly formatted address - /// An address validation result object - public virtual Task> ValidateAddresses(List
addresses) - { - return Task.FromResult(new List()); - } - - /// - /// Validates an address in nearly any country in the world. - /// - /// 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 - public virtual Task> ValidateAddresses(List
addresses, Config methodConfig) - { - return Task.FromResult(new List()); - } - - /// - /// Retrieve a list of all carriers that have been added to this account - /// - /// A list of carriers - public virtual Task ListCarriers() - { - return Task.FromResult(new ListCarriers.Result()); - } - - /// - /// Retrieve a list of all carriers that have been added to this account - /// - /// Configuration object that overrides the global config for this method call. - /// A list of carriers - public virtual Task ListCarriers(Config methodConfig) - { - return Task.FromResult(new ListCarriers.Result()); - } - - /// - /// Create a manifest - /// - /// The details of the manifest you want to create. - /// - public virtual Task CreateManifest(Params manifestParams) - { - return Task.FromResult(new Manifests.Result()); - } - - /// - /// Create a manifest - /// - /// Configuration object that overrides the global config for this method call. - /// The details of the manifest you want to create. - /// - public virtual Task CreateManifest(Config methodConfig, Params manifestParams) - { - return Task.FromResult(new Manifests.Result()); - } - - /// - /// Void a label by ID to get a refund. - /// - /// The id of the label to void - /// Result object indicating the success of the void label attempt - public virtual Task VoidLabelWithLabelId(string labelId) - { - return Task.FromResult(new VoidLabelWithLabelId.Result()); - } - - /// - /// Void a label by ID to get a refund. - /// - /// 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 - public virtual Task VoidLabelWithLabelId(string labelId, Config methodConfig) - { - return Task.FromResult(new VoidLabelWithLabelId.Result()); - } - - /// - /// Track a shipment using the label id - /// - /// The label id associated with the shipment - /// An object that contains the label id tracking information - public virtual Task TrackUsingLabelId(string labelId) - { - return Task.FromResult(new TrackUsingLabelId.Result()); - } - - /// - /// Track a shipment using the label id - /// - /// 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 - public virtual Task TrackUsingLabelId(string labelId, Config methodConfig) - { - return Task.FromResult(new TrackUsingLabelId.Result()); - } - - /// - /// Tracks a package based on the trackingNumber and carrierCode. - /// - /// The tracking number of the package you wish to track. - /// The carrierCode for the trackingNumber you are using to track the package. - /// - public virtual Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode) - { - return Task.FromResult(new TrackUsingCarrierCodeAndTrackingNumber.Result()); - } - - /// - /// Tracks a package based on the trackingNumber and carrierCode. - /// - /// The tracking number of the package you wish to track. - /// The carrierCode for the trackingNumber you are using to track the package. - /// Configuration object that overrides the global config for this method call - /// - public virtual Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode, Config methodConfig) - { - return Task.FromResult(new TrackUsingCarrierCodeAndTrackingNumber.Result()); - } - - /// - /// Create a label from shipment details - /// - /// Details of the label that you want to create - /// Object containing the created label information - public virtual Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams) - { - return Task.FromResult(new CreateLabelFromShipmentDetails.Result()); - } - - /// - /// Create a label from shipment details - /// - /// 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 - public virtual Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams, Config methodConfig) - { - return Task.FromResult(new CreateLabelFromShipmentDetails.Result()); - } - - /// - /// Create a label from a rate id - /// - /// The details of the rate that you want to use to purchase a label - /// Object containing the created label information - public virtual Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams) - { - return Task.FromResult(new CreateLabelFromRate.Result()); - } - - /// - /// Create a label from a rate id - /// - /// 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 - public virtual Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams, Config methodConfig) - { - return Task.FromResult(new CreateLabelFromRate.Result()); - } - - /// - /// Retrieve rates for a package with the provided shipment details. - /// - /// - /// The rates result - public virtual Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams) - { - return Task.FromResult(new GetRatesWithShipmentDetails.Result()); - } - - /// - /// Retrieve rates for a package with the provided shipment details. - /// - /// - /// Configuration object that overrides the global config for this method call - /// The rates result - public virtual Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams, Config methodConfig) - { - return Task.FromResult(new GetRatesWithShipmentDetails.Result()); - } - } /// /// Extension method to allow customized client configuration @@ -375,7 +184,7 @@ public static IHostApplicationBuilder AddShipEngine(this IHostApplicationBuilder /// /// Contains methods for interacting with the ShipEngine API. /// - public class ShipEngine : ShipEngineClient, IDisposable, IShipEngine + public partial class ShipEngine : ShipEngineClient, IDisposable, IShipEngine { /// /// Global HttpClient for ShipEngine instance. @@ -429,6 +238,7 @@ public void Dispose() /// /// The address to validate. This can even be an incomplete or improperly formatted address /// An address validation result object + public async Task> ValidateAddresses(List
addresses) { @@ -447,6 +257,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 + public async Task> ValidateAddresses(List
addresses, Config methodConfig) { @@ -467,6 +278,7 @@ public void Dispose() /// Retrieve a list of all carriers that have been added to this account ///
/// A list of carriers + public async Task ListCarriers() { var path = "v1/carriers"; @@ -481,6 +293,7 @@ public void Dispose() ///
/// Configuration object that overrides the global config for this method call. /// A list of carriers + public async Task ListCarriers(Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -500,6 +313,7 @@ public void Dispose() ///
/// The details of the manifest you want to create. /// + public async Task CreateManifest(Manifests.Params manifestParams) { var path = "v1/manifests"; @@ -517,6 +331,7 @@ public void Dispose() /// Configuration object that overrides the global config for this method call. /// The details of the manifest you want to create. /// + public async Task CreateManifest(Config methodConfig, Manifests.Params manifestParams) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -535,6 +350,7 @@ public void Dispose() ///
/// The id of the label to void /// Result object indicating the success of the void label attempt + public async Task VoidLabelWithLabelId(string labelId) { var path = $"v1/labels/{labelId}/void"; @@ -550,6 +366,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 + public async Task VoidLabelWithLabelId(string labelId, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -568,6 +385,7 @@ public void Dispose() ///
/// The label id associated with the shipment /// An object that contains the label id tracking information + public async Task TrackUsingLabelId(string labelId) { var path = $"/v1/labels/{labelId}/track"; @@ -583,6 +401,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 + public async Task TrackUsingLabelId(string labelId, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -602,6 +421,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. /// + public async Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode) { var path = $"/v1/tracking?tracking_number={trackingNumber}&carrier_code={carrierCode}"; @@ -618,6 +438,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 /// + public async Task TrackUsingCarrierCodeAndTrackingNumber(string trackingNumber, string carrierCode, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); @@ -636,6 +457,7 @@ public void Dispose() /// /// Details of the label that you want to create /// Object containing the created label information + public async Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams) { @@ -654,6 +476,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 + public async Task CreateLabelFromShipmentDetails(CreateLabelFromShipmentDetails.Params labelParams, Config methodConfig) { @@ -675,6 +498,7 @@ public void Dispose() /// /// The details of the rate that you want to use to purchase a label /// Object containing the created label information + public async Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams) { var path = $"/v1/labels/rates/{createLabelFromRateParams.RateId}"; @@ -692,6 +516,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 + public async Task CreateLabelFromRate(CreateLabelFromRate.Params createLabelFromRateParams, Config methodConfig) { @@ -713,6 +538,7 @@ public void Dispose() /// /// /// The rates result + public async Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams) { var path = "/v1/rates"; @@ -730,6 +556,7 @@ public void Dispose() /// /// Configuration object that overrides the global config for this method call /// The rates result + public async Task GetRatesWithShipmentDetails(GetRatesWithShipmentDetails.Params rateParams, Config methodConfig) { var client = ConfigureHttpClient(methodConfig, new HttpClient()); diff --git a/ShipEngine/ShipEngineClient.cs b/ShipEngineSDK/ShipEngineClient.cs similarity index 83% rename from ShipEngine/ShipEngineClient.cs rename to ShipEngineSDK/ShipEngineClient.cs index 6faa780d..1aa1b913 100644 --- a/ShipEngine/ShipEngineClient.cs +++ b/ShipEngineSDK/ShipEngineClient.cs @@ -1,4 +1,5 @@ using ShipEngineSDK.Common; +using ShipEngineSDK.Enums; using System; using System.Linq; using System.Net; @@ -11,6 +12,7 @@ namespace ShipEngineSDK { + using HttpMethod = System.Net.Http.HttpMethod; /// /// ShipEngine Client is used for handling generic calls and settings that @@ -146,6 +148,34 @@ private async Task DeserializedResultOrThrow(HttpResponseMessage response) throw new ShipEngineException(message: "Unexpected null response", requestID: requestId, responseMessage: response); } + /// + /// Builds and sends an HTTP Request to the ShipEngine Client, has special logic for handling + /// 429 rate limit exceeded errors and subsequent retry logic. + /// + /// + /// + /// Options for the request + /// + /// + /// Token that can be used to cancel the request + /// + public virtual Task SendHttpRequestAsync(HttpMethod method, RequestOptions requestOptions, + HttpClient client, Config config, CancellationToken cancellationToken) => + SendHttpRequestAsync(method, requestOptions.FullPath(), requestOptions.Data, client, config, cancellationToken); + + /// + /// Builds and sends an HTTP Request to the ShipEngine Client, has special logic for handling + /// 429 rate limit exceeded errors and subsequent retry logic. + /// + /// + /// + /// + /// + /// + /// + /// + public virtual Task SendHttpRequestAsync(HttpMethod method, string path, string? jsonContent, HttpClient client, Config config) => + SendHttpRequestAsync(method, path, jsonContent, client, config, CancellationToken); /// /// Builds and sends an HTTP Request to the ShipEngine Client, has special logic for handling @@ -157,8 +187,9 @@ private async Task DeserializedResultOrThrow(HttpResponseMessage response) /// /// /// + /// Token that can be used to cancel the request /// - public virtual async Task SendHttpRequestAsync(HttpMethod method, string path, string? jsonContent, HttpClient client, Config config) + public virtual async Task SendHttpRequestAsync(HttpMethod method, string path, string? jsonContent, HttpClient client, Config config, CancellationToken cancellationToken) { int retry = 0; @@ -169,7 +200,7 @@ public virtual async Task SendHttpRequestAsync(HttpMethod method, string p try { var request = BuildRequest(method, path, jsonContent); - response = await client.SendAsync(request, CancellationToken); + response = await client.SendAsync(request, cancellationToken); var deserializedResult = await DeserializedResultOrThrow(response); diff --git a/ShipEngine/ShipEngine.csproj b/ShipEngineSDK/ShipEngineSDK.csproj similarity index 98% rename from ShipEngine/ShipEngine.csproj rename to ShipEngineSDK/ShipEngineSDK.csproj index 4c6c9588..634fbcf9 100644 --- a/ShipEngine/ShipEngine.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.0.5 + 2.1.0 ShipEngine ShipEngine The official ShipEngine C# SDK for .NET diff --git a/ShipEngine/icon.png b/ShipEngineSDK/icon.png similarity index 100% rename from ShipEngine/icon.png rename to ShipEngineSDK/icon.png diff --git a/generation/swagger.json b/generation/swagger.json new file mode 100644 index 00000000..ca870b7f --- /dev/null +++ b/generation/swagger.json @@ -0,0 +1,16251 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "ShipEngine API", + "version": "1.1.202406212006", + "termsOfService": "https://www.shipengine.com/terms-of-service/", + "x-logo": { + "url": "https://shipengine.github.io/img/shipengine-logo-square.png", + "backgroundColor": "#FFFFFF", + "altText": "ShipEngine logo" + }, + "contact": { + "name": "ShipEngine Sales & Support", + "email": "sales@shipengine.com", + "url": "https://www.shipengine.com/contact/", + "x-phone": "1-512-856-5379" + }, + "description": "ShipEngine's easy-to-use REST API lets you manage all of your shipping needs without worrying about the complexities of different carrier APIs and protocols. We handle all the heavy lifting so you can focus on providing a first-class shipping experience for your customers at the best possible prices.\n\nEach of ShipEngine's features can be used by itself or in conjunction with each other to build powerful shipping functionality into your application or service.\n\n## Getting Started\nIf you're new to REST APIs then be sure to read our [introduction to REST](https://www.shipengine.com/docs/rest/) to understand the basics. Learn how to [authenticate yourself to ShipEngine](https://www.shipengine.com/docs/auth/), and then use our [sandbox environment](https://www.shipengine.com/docs/sandbox/) to kick the tires and get familiar with our API. If you run into any problems, then be sure to check the [error handling guide](https://www.shipengine.com/docs/errors/) for tips.\n\nHere are some step-by-step **tutorials** to get you started:\n\n - [Learn how to create your first shipping label](https://www.shipengine.com/docs/labels/create-a-label/)\n - [Calculate shipping costs and compare rates across carriers](https://www.shipengine.com/docs/rates/)\n - [Track packages on-demand or in real time](https://www.shipengine.com/docs/tracking/)\n - [Validate mailing addresses anywhere on Earth](https://www.shipengine.com/docs/addresses/validation/)\n\n\n## Shipping Labels for Every Major Carrier\nShipEngine makes it easy to [create shipping labels for any carrier](https://www.shipengine.com/docs/labels/create-a-label/) and [download them](https://www.shipengine.com/docs/labels/downloading/) in a [variety of file formats](https://www.shipengine.com/docs/labels/formats/). You can even customize labels with your own [messages](https://www.shipengine.com/docs/labels/messages/) and [images](https://www.shipengine.com/docs/labels/branding/).\n\n\n## Real-Time Package Tracking\nWith ShipEngine you can [get the current status of a package](https://www.shipengine.com/docs/tracking/) or [subscribe to real-time tracking updates](https://www.shipengine.com/docs/tracking/webhooks/) via webhooks. You can also create [custimized tracking pages](https://www.shipengine.com/docs/tracking/branded-tracking-page/) with your own branding so your customers will always know where their package is.\n\n\n## Compare Shipping Costs Across Carriers\nMake sure you ship as cost-effectively as possible by [comparing rates across carriers](https://www.shipengine.com/docs/rates/get-shipment-rates/) using the ShipEngine Rates API. Or if you don't know the full shipment details yet, then you can [get rate estimates](https://www.shipengine.com/docs/rates/estimate/) with limited address info.\n\n\n## Worldwide Address Validation\nShipEngine supports [address validation](https://www.shipengine.com/docs/addresses/validation/) for virtually [every country on Earth](https://www.shipengine.com/docs/addresses/validation/countries/), including the United States, Canada, Great Britain, Australia, Germany, France, Norway, Spain, Sweden, Israel, Italy, and over 160 others.\n\n# Authentication\n\n" + }, + "paths": { + "/v1/account/settings": { + "summary": "Account settings", + "description": "ShipEngine Account settings", + "get": { + "summary": "List Account Settings", + "description": "List all account settings for the ShipEngine account", + "tags": [ + "account" + ], + "operationId": "list_account_settings", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_account_settings_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/account/settings/images": { + "summary": "Account settings images", + "description": "ShipEngine Account images", + "get": { + "summary": "List Account Images", + "description": "List all account images for the ShipEngine account", + "tags": [ + "account" + ], + "operationId": "list_account_images", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_account_settings_images_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Create an Account Image", + "description": "Create an Account Image", + "tags": [ + "account" + ], + "operationId": "create_account_image", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_account_settings_image_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_account_settings_images_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/account/settings/images/{label_image_id}": { + "summary": "Account settings images", + "description": "ShipEngine Account images", + "get": { + "summary": "Get Account Image By ID", + "description": "Retrieve information for an account image.", + "tags": [ + "account" + ], + "operationId": "get_account_settings_images_by_id", + "parameters": [ + { + "name": "label_image_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/image_id" + }, + "description": "Label Image Id" + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_account_settings_images_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "put": { + "summary": "Update Account Image By ID", + "description": "Update information for an account image.", + "tags": [ + "account" + ], + "operationId": "update_account_settings_images_by_id", + "parameters": [ + { + "name": "label_image_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/image_id" + }, + "description": "Label Image Id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_account_settings_image_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Delete Account Image By Id", + "description": "Delete Account Image By Id", + "tags": [ + "account" + ], + "operationId": "delete_account_image_by_id", + "parameters": [ + { + "name": "label_image_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/image_id" + }, + "description": "Label Image Id" + } + ], + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/addresses/recognize": { + "summary": "Parse an address", + "description": "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 address data (e.g. recipient name, address line 1, line 2, city, postal code) from this unstructured text.\n", + "put": { + "summary": "Parse an address", + "description": "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.\n\nData 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.\n\n> **Note:** Address recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.\n", + "tags": [ + "addresses" + ], + "operationId": "parse_address", + "requestBody": { + "required": true, + "description": "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.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/parse_address_request_body" + }, + "examples": { + "text_only": { + "summary": "Text only", + "description": "This is the simplest way to call the address-recognition API. Just pass the text to be parsed and nothing else.\n", + "value": { + "text": "Margie McMiller at 3800 North Lamar suite 200 in austin, tx. The zip code there is 78652." + } + }, + "some_known_fields": { + "summary": "Some known fields", + "description": "You can optionally provide an `address` object containing any 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.\n", + "value": { + "text": "Margie McMiller at 3800 North Lamar suite 200 in austin, tx. The zip code there is 78652.", + "address": { + "country_code": "US", + "address_residential_indicator": "yes" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Returns the parsed address, as well as a confidence score and a list of all the entities that were recognized in the text.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/parse_address_response_body" + }, + "examples": { + "text_only": { + "description": "This response shows that the address-recognition API was able to recognize all the address entities in the text. Notice that the `country_code` is not populated and the `address_residential_indicator` is \"unknown\", since neither of these fields was included in the text.\n", + "value": { + "score": 0.9122137426845613, + "address": { + "name": "Margie McMiller", + "address_line1": "3800 North Lamar", + "address_line2": "Suite 200", + "city_locality": "Austin", + "state_province": "TX", + "postal_code": 78652, + "address_residential_indicator": "unknown" + }, + "entities": [ + { + "type": "person", + "score": 0.9519646137063122, + "text": "Margie McMiller", + "start_index": 0, + "end_index": 14, + "result": { + "value": "Margie McMiller" + } + }, + { + "type": "address_line", + "score": 0.9805313966503588, + "text": "3800 North Lamar", + "start_index": 19, + "end_index": 34, + "result": { + "line": 1, + "value": "3800 North Lamar" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": 3800, + "start_index": 19, + "end_index": 22, + "result": { + "type": "cardinal", + "value": 3800 + } + }, + { + "type": "address_line", + "score": 1, + "text": "suite 200", + "start_index": 36, + "end_index": 44, + "result": { + "line": 2, + "value": "Suite 200" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": 200, + "start_index": 42, + "end_index": 44, + "result": { + "type": "cardinal", + "value": 200 + } + }, + { + "type": "city_locality", + "score": 0.9805313966503588, + "text": "austin", + "start_index": 49, + "end_index": 54, + "result": { + "value": "Austin" + } + }, + { + "type": "state_province", + "score": 0.6082904353940255, + "text": "tx", + "start_index": 57, + "end_index": 58, + "result": { + "name": "Texas", + "value": "TX" + } + }, + { + "type": "postal_code", + "score": 0.9519646137063122, + "text": 78652, + "start_index": 84, + "end_index": 88, + "result": { + "value": 78652 + } + } + ] + } + }, + "some_known_fields": { + "description": "This response is shows that the address-recognition API was able to recognize all the address entities in the text. Notice that the `country_code` and `address_residential_indicator` fields are populated with the values that were provided in the request.\n", + "value": { + "score": 0.9122137426845613, + "address": { + "name": "Margie McMiller", + "address_line1": "3800 North Lamar", + "address_line2": "Suite 200", + "city_locality": "Austin", + "state_province": "TX", + "postal_code": 78652, + "country_code": "US", + "address_residential_indicator": "yes" + }, + "entities": [ + { + "type": "person", + "score": 0.9519646137063122, + "text": "Margie McMiller", + "start_index": 0, + "end_index": 14, + "result": { + "value": "Margie McMiller" + } + }, + { + "type": "address_line", + "score": 0.9805313966503588, + "text": "3800 North Lamar", + "start_index": 19, + "end_index": 34, + "result": { + "line": 1, + "value": "3800 North Lamar" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": 3800, + "start_index": 19, + "end_index": 22, + "result": { + "type": "cardinal", + "value": 3800 + } + }, + { + "type": "address_line", + "score": 1, + "text": "suite 200", + "start_index": 36, + "end_index": 44, + "result": { + "line": 2, + "value": "Suite 200" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": 200, + "start_index": 42, + "end_index": 44, + "result": { + "type": "cardinal", + "value": 200 + } + }, + { + "type": "city_locality", + "score": 0.9805313966503588, + "text": "austin", + "start_index": 49, + "end_index": 54, + "result": { + "value": "Austin" + } + }, + { + "type": "state_province", + "score": 0.6082904353940255, + "text": "tx", + "start_index": 57, + "end_index": 58, + "result": { + "name": "Texas", + "value": "TX" + } + }, + { + "type": "postal_code", + "score": 0.9519646137063122, + "text": 78652, + "start_index": 84, + "end_index": 88, + "result": { + "value": 78652 + } + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/addresses/validate": { + "summary": "Address Validation", + "description": "Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges.\nShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.\n", + "post": { + "summary": "Validate An Address", + "description": "Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges.\nShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.\n", + "tags": [ + "addresses" + ], + "operationId": "validate_address", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/validate_address_request_body" + }, + "examples": { + "all_known_fields_request": { + "summary": "All Known Fields", + "description": "A call that returns a status of `verified`.", + "value": [ + { + "name": "Mickey and Minnie Mouse", + "phone": "714-781-4565", + "company_name": "The Walt Disney Company", + "address_line1": "500 South Buena Vista Street", + "city_locality": "Burbank", + "state_province": "CA", + "postal_code": 91521, + "country_code": "US" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/validate_address_response_body" + }, + "examples": { + "all_known_fields": { + "summary": "All Known Fields", + "description": "A response for a `verified` status call.", + "value": [ + { + "status": "verified", + "original_address": { + "name": "Mickey and Minnie Mouse", + "phone": "714-781-4565", + "company_name": "The Walt Disney Company", + "address_line1": "500 South Buena Vista Street", + "address_line2": null, + "address_line3": null, + "city_locality": "Burbank", + "state_province": "CA", + "postal_code": 91521, + "country_code": "US", + "address_residential_indicator": "unknown" + }, + "matched_address": { + "name": "MICKEY AND MINNIE MOUSE", + "phone": "714-781-4565", + "company_name": "THE WALT DISNEY COMPANY", + "address_line1": "500 S BUENA VISTA ST", + "address_line2": null, + "address_line3": null, + "city_locality": "BURBANK", + "state_province": "CA", + "postal_code": "91521-0007", + "country_code": "US", + "address_residential_indicator": "no" + }, + "messages": [] + } + ] + }, + "empty_fields": { + "summary": "Empty Fields", + "description": "A response for an `unverified` API Call with error message", + "value": [ + { + "status": "unverified", + "original_address": { + "name": null, + "phone": null, + "company_name": null, + "address_line1": null, + "address_line2": null, + "address_line3": null, + "city_locality": null, + "state_province": null, + "postal_code": null, + "country_code": null, + "address_residential_indicator": "unknown" + }, + "matched_address": null, + "messages": [ + { + "code": "a1001", + "message": "country_code is not currently a supported country please check the documentation for acceptable 2-letter country codes.", + "type": "error", + "detail_code": "unsupported_country" + } + ] + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/batches": { + "summary": "Batches", + "description": "Batches are an advanced feature of ShipEngine designed for users who need to generate hundreds or thousands of labels at a time.\nWhen ShipEngine generates labels it relies on many carriers, their services, their dependencies, and a number of other variables\nto fulfill your requests; those requests can take a few minutes for us to get back to you.\n", + "get": { + "summary": "List Batches", + "description": "List Batches associated with your Shipengine account", + "operationId": "list_batches", + "tags": [ + "batches" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/batch_status" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1 + }, + "example": 2, + "description": "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.\n" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 25 + }, + "example": 50, + "description": "The number of results to return per response." + }, + { + "name": "sort_dir", + "in": "query", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/sort_dir" + } + ], + "default": "desc" + }, + "description": "Controls the sort order of the query." + }, + { + "name": "batch_number", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Batch Number" + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/batches_sort_by" + } + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_batches_response_body" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Create A Batch", + "description": "Create a Batch", + "tags": [ + "batches" + ], + "operationId": "create_batch", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_batch_request" + } + } + } + }, + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_batch_response_body" + } + } + } + }, + "207": { + "description": "The request was a partial success. It contains results, as well as processing errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_batch_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/batches/external_batch_id/{external_batch_id}": { + "summary": "External Batch ID", + "description": "Retrive a batch from an external batch ID", + "parameters": [ + { + "name": "external_batch_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "13553d7f-3c87-4771-bae1-c49bacef11cb" + } + ], + "get": { + "summary": "Get Batch By External ID", + "description": "Get Batch By External ID", + "tags": [ + "batches" + ], + "operationId": "get_batch_by_external_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_batch_by_external_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/batches/{batch_id}": { + "summary": "Batch By ID", + "description": "Check the status of your batch by retrieving it with a Batch ID.", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Batch ID" + } + ], + "delete": { + "summary": "Delete Batch By Id", + "description": "Delete Batch By Id", + "operationId": "delete_batch", + "tags": [ + "batches" + ], + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "get": { + "summary": "Get Batch By ID", + "description": "Get Batch By ID", + "tags": [ + "batches" + ], + "operationId": "get_batch_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_batch_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "put": { + "summary": "Update Batch By Id", + "description": "Update Batch By Id", + "operationId": "update_batch", + "tags": [ + "batches" + ], + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/batches/{batch_id}/add": { + "summary": "Add Funds to a Carrier", + "description": "You can check your balance for a particular carrier by calling [List Carriers](https://www.shipengine.com/docs/reference/list-carriers/) endpoint.\nFor any carrier account where requires_funded_amount is true, you can add funds.\n", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Batch ID" + } + ], + "post": { + "summary": "Add to a Batch", + "description": "Add a Shipment or Rate to a Batch", + "tags": [ + "batches" + ], + "operationId": "add_to_batch", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/add_to_batch_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/batches/{batch_id}/errors": { + "summary": "Batch Errors", + "description": "Error handling in batches are handled differently than in a single synchronous request.\nYou 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.\n", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Batch ID" + } + ], + "get": { + "summary": "Get Batch Errors", + "description": "Error handling in batches are handled differently than in a single synchronous request.\nYou 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.\n", + "tags": [ + "batches" + ], + "operationId": "list_batch_errors", + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1 + }, + "example": 2, + "description": "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.\n" + }, + { + "name": "pagesize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_batch_errors_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/batches/{batch_id}/process/labels": { + "summary": "Process Batch ID Labels", + "description": "Process Batch ID Labels", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Batch ID" + } + ], + "post": { + "summary": "Process Batch ID Labels", + "description": "Process Batch ID Labels", + "tags": [ + "batches" + ], + "operationId": "process_batch", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/process_batch_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/batches/{batch_id}/remove": { + "summary": "Remove Batch By ID", + "description": "Remove a list of shipments from a batch", + "parameters": [ + { + "name": "batch_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Batch ID" + } + ], + "post": { + "summary": "Remove From Batch", + "description": "Remove a shipment or rate from a batch", + "tags": [ + "batches" + ], + "operationId": "remove_from_batch", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/remove_from_batch_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/carriers": { + "summary": "Carriers", + "description": "Carriers are a company or individual that specializes in transporting freight from one destination to another.\nShipengine allows you to easily integrate with multiple carriers so you can chose the shipping option that is right for you.\n", + "get": { + "summary": "List Carriers", + "description": "List all carriers that have been added to this account", + "tags": [ + "carriers" + ], + "operationId": "list_carriers", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_carriers_response_body" + } + } + } + }, + "207": { + "description": "The request was a partial success. It contains results, as well as errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_carriers_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/carriers/{carrier_id}": { + "summary": "Individual carriers", + "description": "Perform actions and get information on individual carriers connected with your account.", + "parameters": [ + { + "name": "carrier_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "example": "se-28529731", + "description": "Carrier ID" + } + ], + "get": { + "summary": "Get Carrier By ID", + "description": "Retrive carrier info by ID", + "tags": [ + "carriers" + ], + "operationId": "get_carrier_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_carrier_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Disconnect Carrier by ID", + "description": "Disconnect a Carrier of the given ID from the account", + "tags": [ + "carriers" + ], + "operationId": "disconnect_carrier_by_id", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/carriers/{carrier_id}/add_funds": { + "summary": "Carrier Funds", + "description": "All carriers require that funds to be attached to an account to ensure payment for the various services they provide to their customers.", + "parameters": [ + { + "name": "carrier_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "example": "se-28529731", + "description": "Carrier ID" + } + ], + "put": { + "summary": "Add Funds To Carrier", + "description": "Add Funds To A Carrier", + "tags": [ + "carriers" + ], + "operationId": "add_funds_to_carrier", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/add_funds_to_carrier_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/add_funds_to_carrier_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/carriers/{carrier_id}/options": { + "summary": "Carrier Options", + "description": "Carriers support various options for particular shipments. Ex. (non-machinable, is_alcohol, fragile, etc)", + "parameters": [ + { + "name": "carrier_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "example": "se-28529731", + "description": "Carrier ID" + } + ], + "get": { + "summary": "Get Carrier Options", + "description": "Get a list of the options available for the carrier", + "tags": [ + "carriers" + ], + "operationId": "get_carrier_options", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_carrier_options_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/carriers/{carrier_id}/packages": { + "summary": "Carrier Packages", + "description": "Carriers support many different package types, Shipengine supports retrieving all available package so that\nyou can best determine what is right for your particular shipment.\n", + "parameters": [ + { + "name": "carrier_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "example": "se-28529731", + "description": "Carrier ID" + } + ], + "get": { + "summary": "List Carrier Package Types", + "description": "List the package types associated with the carrier", + "tags": [ + "carriers" + ], + "operationId": "list_carrier_package_types", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_carrier_package_types_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/carriers/{carrier_id}/services": { + "summary": "Carrier Services", + "description": "Carrier services usually refer to the various shipping options that a carrier provides to its customers.\nEx. Priority mail, overnight, international\n", + "parameters": [ + { + "name": "carrier_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "example": "se-28529731", + "description": "Carrier ID" + } + ], + "get": { + "summary": "List Carrier Services", + "description": "List the services associated with the carrier ID", + "tags": [ + "carriers" + ], + "operationId": "list_carrier_services", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_carrier_services_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/connections/carriers/{carrier_name}": { + "summary": "Carrier connections", + "description": "Carrier connections", + "parameters": [ + { + "name": "carrier_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/carrier_name" + }, + "example": "dhl_express", + "description": "The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`." + } + ], + "post": { + "summary": "Connect a carrier account", + "description": "Connect a carrier account", + "tags": [ + "carrier_accounts" + ], + "operationId": "connect_carrier", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connect_carrier_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connect_carrier_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/connections/carriers/{carrier_name}/{carrier_id}": { + "summary": "Disconnect a carrier", + "description": "Disconnect a carrier", + "parameters": [ + { + "name": "carrier_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/carrier_name" + }, + "example": "dhl_express", + "description": "The carrier name, such as `stamps_com`, `ups`, `fedex`, or `dhl_express`." + }, + { + "name": "carrier_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "example": "se-28529731", + "description": "Carrier ID" + } + ], + "delete": { + "summary": "Disconnect a carrier", + "description": "Disconnect a carrier", + "tags": [ + "carrier_accounts" + ], + "operationId": "disconnect_carrier", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/connections/carriers/{carrier_name}/{carrier_id}/settings": { + "summary": "Carrier settings", + "description": "Carrier settings", + "parameters": [ + { + "name": "carrier_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/carrier_name_with_settings" + }, + "example": "dhl_express", + "description": "The carrier name, such as `ups`, `fedex`, or `dhl_express`." + }, + { + "name": "carrier_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "example": "se-28529731", + "description": "Carrier ID" + } + ], + "get": { + "summary": "Get carrier settings", + "description": "Get carrier settings", + "tags": [ + "carrier_accounts" + ], + "operationId": "get_carrier_settings", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_carrier_settings_response_body" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "put": { + "summary": "Update carrier settings", + "description": "Update carrier settings", + "tags": [ + "carrier_accounts" + ], + "operationId": "update_carrier_settings", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_carrier_settings_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/connections/insurance/shipsurance": { + "summary": "Shipsurance Connection", + "description": "Shipsurance Connection", + "delete": { + "summary": "Disconnect a Shipsurance Account", + "description": "Disconnect a Shipsurance Account", + "operationId": "disconnect_insurer", + "tags": [ + "insurance" + ], + "responses": { + "200": { + "description": "The request was a success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/disconnect_insurer_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Connect a Shipsurance Account", + "description": "Connect a Shipsurance Account", + "operationId": "connect_insurer", + "tags": [ + "insurance" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connect_insurer_request_body" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The request was a success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connect_insurer_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/downloads/{dir}/{subdir}/{filename}": { + "summary": "File Download", + "description": "This endpoint is used to download forms that are generated in the various pdf, png, zpl formats\nsuch as labels and batches\n", + "parameters": [ + { + "name": "subdir", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filename", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "dir", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "summary": "Download File", + "description": "Get File", + "operationId": "download_file", + "tags": [ + "downloads" + ], + "parameters": [ + { + "name": "download", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "rotation", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "The request was a success", + "content": { + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/download_file_pdf_response_body" + } + }, + "image/png": { + "schema": { + "$ref": "#/components/schemas/download_file_png_response_body" + } + }, + "application/zpl": { + "schema": { + "$ref": "#/components/schemas/download_file_zpl_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/environment/webhooks": { + "summary": "Webhooks", + "description": "ShipEngine exposes asynchronous operations for long running operations such as batch labels and rates.\nWebhooks allow the ShipEngine servers to contact your servers when an operation changes state, such as a batch label creation completion.\n", + "get": { + "summary": "List Webhooks", + "description": "List all webhooks currently enabled for the account.", + "tags": [ + "webhooks" + ], + "operationId": "list_webhooks", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_webhooks_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Create a Webhook", + "description": "Create a webook for specific events in the environment.", + "tags": [ + "webhooks" + ], + "operationId": "create_webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_webhook_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_webhook_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "409": { + "$ref": "#/components/responses/409_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/environment/webhooks/{webhook_id}": { + "summary": "Webhook", + "description": "Retrieve, update, and delete information for individual webhooks", + "parameters": [ + { + "name": "webhook_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Webhook ID" + } + ], + "get": { + "summary": "Get Webhook By ID", + "description": "Retrieve individual webhook by an ID", + "tags": [ + "webhooks" + ], + "operationId": "get_webhook_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_webhook_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "put": { + "summary": "Update a Webhook", + "description": "Update the webhook url property", + "tags": [ + "webhooks" + ], + "operationId": "update_webhook", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_webhook_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Delete Webhook By ID", + "description": "Delete a webhook", + "tags": [ + "webhooks" + ], + "operationId": "delete_webhook", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/insurance/shipsurance/add_funds": { + "summary": "Shipsurance", + "description": "[Shipsurance](https://www.shipsurance.com/) is a shipping insurance company offering coverage for shipments sent via the major shipping carriers worldwide.\n", + "patch": { + "summary": "Add Funds To Insurance", + "description": "You may need to auto fund your account from time to time. For example, if you don't normally ship items over $100,\nand may want to add funds to insurance rather than keeping the account funded.\n", + "tags": [ + "insurance" + ], + "operationId": "add_funds_to_insurance", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/add_funds_to_insurance_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/add_funds_to_insurance_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/insurance/shipsurance/balance": { + "summary": "Shipsurance", + "description": "[Shipsurance](https://www.shipsurance.com/) is a shipping insurance company offering coverage for shipments sent via the major shipping carriers worldwide.\n", + "get": { + "summary": "Get Insurance Funds Balance", + "description": "Retrieve the balance of your Shipsurance account.", + "tags": [ + "insurance" + ], + "operationId": "get_insurance_balance", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_insurance_balance_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/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", + "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", + "tags": [ + "labels" + ], + "operationId": "list_labels", + "parameters": [ + { + "name": "label_status", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/label_status" + }, + "description": "Only return labels that are currently in the specified status" + }, + { + "name": "service_code", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/service_code" + }, + "example": "usps_first_class_mail", + "description": "Only return labels for a specific [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/)" + }, + { + "description": "Only return labels for a specific [carrier account](https://www.shipengine.com/docs/carriers/setup/)", + "name": "carrier_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + } + }, + { + "description": "Only return labels with a specific tracking number", + "name": "tracking_number", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "9405511899223197428490" + }, + { + "description": "Only return labels that were created in a specific [batch](https://www.shipengine.com/docs/labels/bulk/)", + "name": "batch_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + } + }, + { + "name": "rate_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Rate ID" + }, + { + "name": "shipment_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Shipment ID" + }, + { + "description": "Only return labels that originate from a specific [warehouse](https://www.shipengine.com/docs/shipping/ship-from-a-warehouse/)", + "name": "warehouse_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + } + }, + { + "description": "Only return labels that were created on or after a specific date/time", + "name": "created_at_start", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z" + }, + { + "description": "Only return labels that were created on or before a specific date/time", + "name": "created_at_end", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1 + }, + "example": 2, + "description": "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.\n" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 25 + }, + "example": 50, + "description": "The number of results to return per response." + }, + { + "name": "sort_dir", + "in": "query", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/sort_dir" + } + ], + "default": "desc" + }, + "description": "Controls the sort order of the query." + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "modified_at", + "created_at" + ], + "default": "created_at" + }, + "description": "Controls which field the query is sorted by." + } + ], + "responses": { + "200": { + "description": "The response includes a `labels` array containing a page of results (as determined by the `page_size` query parameter). It also includes other useful information, such as the total number of labels that match the query criteria, the number of pages of results, and the URLs of the first, last, next, and previous pages of results.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_labels_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Purchase Label", + "description": "Purchase and print a label for shipment", + "tags": [ + "labels" + ], + "operationId": "create_label", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_label_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_label_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/labels/external_shipment_id/{external_shipment_id}": { + "summary": "Get Label By External Shipment ID", + "description": "Find a label using the external shipment id", + "parameters": [ + { + "name": "external_shipment_id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "example": "0bcb569d-1727-4ff9-ab49-b2fec0cee5ae" + } + ], + "get": { + "summary": "Get Label By External Shipment ID", + "description": "Find a label by using the external shipment id that was used during label creation\n", + "tags": [ + "labels" + ], + "operationId": "get_label_by_external_shipment_id", + "parameters": [ + { + "name": "label_download_type", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/label_download_type" + }, + "example": "url" + } + ], + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_label_by_external_shipment_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/labels/rates/{rate_id}": { + "summary": "Use a rate to purchase a label", + "description": "Purchase a label using a `rate_id` that has been previously generated while looking at various rates for a particular shipment.", + "parameters": [ + { + "name": "rate_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Rate ID" + } + ], + "post": { + "summary": "Purchase Label with Rate ID", + "description": "When retrieving rates for shipments using the `/rates` endpoint, the returned information contains a `rate_id` property that can be used\nto generate a label without having to refill in the shipment information repeatedly.\n", + "tags": [ + "labels" + ], + "operationId": "create_label_from_rate", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_label_from_rate_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_label_from_rate_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/labels/shipment/{shipment_id}": { + "summary": "Purchase label using shipment ID", + "description": "Purchase a label using a shipment ID that has already been created with the desired address and\npackage info.\n", + "parameters": [ + { + "name": "shipment_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Shipment ID" + } + ], + "post": { + "summary": "Purchase Label with Shipment ID", + "description": "Purchase a label using a shipment ID that has already been created with the desired address and\npackage info.\n", + "tags": [ + "labels" + ], + "operationId": "create_label_from_shipment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_label_from_shipment_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_label_from_shipment_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/labels/{label_id}": { + "summary": "Label", + "description": "Retrieve information for individual labels.", + "parameters": [ + { + "name": "label_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Label ID" + } + ], + "get": { + "summary": "Get Label By ID", + "description": "Retrieve information for individual labels.", + "tags": [ + "labels" + ], + "operationId": "get_label_by_id", + "parameters": [ + { + "name": "label_download_type", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/label_download_type" + }, + "example": "url" + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_label_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/labels/{label_id}/return": { + "summary": "Return labels", + "parameters": [ + { + "name": "label_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Label ID" + } + ], + "post": { + "summary": "Create a return label", + "description": "Create a return label", + "tags": [ + "labels" + ], + "operationId": "create_return_label", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_return_label_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_return_label_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/labels/{label_id}/track": { + "summary": "Tracking a Label", + "description": "Carriers will provide tracking information so the status of your shipment can be monitored", + "parameters": [ + { + "name": "label_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Label ID" + } + ], + "get": { + "summary": "Get Label Tracking Information", + "description": "Retrieve the label's tracking information", + "tags": [ + "labels" + ], + "operationId": "get_tracking_log_from_label", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_tracking_log_from_label_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/labels/{label_id}/void": { + "summary": "Label Voiding", + "description": "Some carriers charge for creating a label upon purchase vs upon use. The Shipengine API allows you\nto void a label to get a refund.\n", + "parameters": [ + { + "name": "label_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Label ID" + } + ], + "put": { + "summary": "Void a Label By ID", + "description": "Void a label by ID to get a refund.", + "tags": [ + "labels" + ], + "operationId": "void_label", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/void_label_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/manifests": { + "summary": "Manifests", + "description": "Many manifests are sent electronically to the carrier when you create a label, and\noften physical manifests are not necessary. Carriers receive the package details, shipping date,\nand other information that help them plan your package's delivery when you create a label.\n\nHowever, some providers, like USPS require manifests when shipping large numbers of packages. Think about how long it would take for a delivery driver to arrive, pick up 100 packages, and individually scan each of them.\n\nA manifest exists so the carrier can scan the manifest and check in all the packages being shipped.\n", + "get": { + "summary": "List Manifests", + "description": "Similar to querying shipments, we allow you to query manifests since there will likely be a large number over a long period of time.", + "tags": [ + "manifests" + ], + "operationId": "list_manifests", + "parameters": [ + { + "name": "warehouse_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Warehouse ID" + }, + { + "name": "ship_date_start", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2018-09-23T15:00:00.000Z", + "description": "ship date start range" + }, + { + "name": "ship_date_end", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2018-09-23T15:00:00.000Z", + "description": "ship date end range" + }, + { + "name": "created_at_start", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z", + "description": "Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time)" + }, + { + "name": "created_at_end", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z", + "description": "Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time)" + }, + { + "name": "carrier_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Carrier ID" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1 + }, + "example": 2, + "description": "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.\n" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 25 + }, + "example": 50, + "description": "The number of results to return per response." + }, + { + "name": "label_ids", + "in": "query", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "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." + }, + "description": "Array of label ids" + } + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_manifests_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Create Manifest", + "description": "Each ShipEngine manifest is created for a specific warehouse, so you'll need to provide the warehouse_id\nrather than the ship_from address. You can create a warehouse for each location that you want to create manifests for.\n", + "tags": [ + "manifests" + ], + "operationId": "create_manifest", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_manifest_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_manifest_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/manifests/{manifest_id}": { + "summary": "Manifest ID", + "description": "Manifest ID", + "parameters": [ + { + "name": "manifest_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "The Manifest Id" + } + ], + "get": { + "summary": "Get Manifest By Id", + "description": "Get Manifest By Id", + "tags": [ + "manifests" + ], + "operationId": "get_manifest_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_manifest_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/manifests/requests/{manifest_request_id}": { + "summary": "Manifest Request ID", + "description": "Manifest Request ID", + "parameters": [ + { + "name": "manifest_request_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "The Manifest Request Id" + } + ], + "get": { + "summary": "Get Manifest Request By Id", + "description": "Get Manifest Request By Id", + "tags": [ + "manifests" + ], + "operationId": "get_manifest_request_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_manifest_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/packages": { + "summary": "Packages", + "description": "Sometimes the default package types that carriers provide aren't enough and you need to create your own. That's where\nthe `/packages` endpoint becomes useful. Create, manage, and delete custom package types to suit your specific needs.\n", + "get": { + "summary": "List Custom Package Types", + "description": "List the custom package types associated with the account", + "tags": [ + "package_types" + ], + "operationId": "list_package_types", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_package_types_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Create Custom Package Type", + "description": "Create a custom package type to better assist in getting accurate rate estimates", + "tags": [ + "package_types" + ], + "operationId": "create_package_type", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_package_type_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_package_type_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/packages/{package_id}": { + "summary": "Package", + "description": "Create, edit, and delete individual custom packages.", + "parameters": [ + { + "name": "package_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Package ID" + } + ], + "get": { + "summary": "Get Custom Package Type By ID", + "description": "Get Custom Package Type by ID", + "tags": [ + "package_types" + ], + "operationId": "get_package_type_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_package_type_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "put": { + "summary": "Update Custom Package Type By ID", + "description": "Update the custom package type object by ID", + "tags": [ + "package_types" + ], + "operationId": "update_package_type", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_package_type_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Delete A Custom Package By ID", + "description": "Delete a custom package using the ID", + "tags": [ + "package_types" + ], + "operationId": "delete_package_type", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/pickups": { + "summary": "Scheduled Pickups", + "description": "Scheduled package pickups\n", + "get": { + "summary": "List Scheduled Pickups", + "description": "List all pickups that have been scheduled for this carrier", + "tags": [ + "package_pickups" + ], + "operationId": "list_scheduled_pickups", + "parameters": [ + { + "name": "carrier_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Carrier ID" + }, + { + "name": "warehouse_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Warehouse ID" + }, + { + "description": "Only return scheduled pickups that were created on or after a specific date/time", + "name": "created_at_start", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z" + }, + { + "description": "Only return scheduled pickups that were created on or before a specific date/time", + "name": "created_at_end", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1 + }, + "example": 2, + "description": "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.\n" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 25 + }, + "example": 50, + "description": "The number of results to return per response." + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_pickups_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Schedule a Pickup", + "description": "Schedule a package pickup with a carrier", + "tags": [ + "package_pickups" + ], + "operationId": "schedule_pickup", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/schedule_pickup_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/schedule_pickup_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/pickups/{pickup_id}": { + "summary": "Scheduled Pickup", + "description": "A package pickup that has been scheduled with a carrier\n", + "parameters": [ + { + "name": "pickup_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/pickup_resource_id" + } + } + ], + "get": { + "summary": "Get Pickup By ID", + "description": "Get Pickup By ID", + "tags": [ + "package_pickups" + ], + "operationId": "get_pickup_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_pickup_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Delete a Scheduled Pickup", + "description": "Delete a previously-scheduled pickup by ID", + "tags": [ + "package_pickups" + ], + "operationId": "delete_scheduled_pickup", + "responses": { + "200": { + "description": "Return the `pickup_id` of the scheduled pickup that was successfully deleted\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/delete_pickup_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/rates": { + "summary": "Rates", + "description": "Get the various rates for a set of carriers", + "post": { + "summary": "Get Shipping Rates", + "description": "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;\nso we provide functionality to show you all your options!\n", + "tags": [ + "rates" + ], + "operationId": "calculate_rates", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calculate_rates_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calculate_rates_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/rates/bulk": { + "summary": "Bulk Rates", + "description": "Get specific rates for large groups of shipments", + "post": { + "summary": "Get Bulk Rates", + "description": "Get Bulk Shipment Rates", + "tags": [ + "rates" + ], + "operationId": "compare_bulk_rates", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/compare_bulk_rates_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/compare_bulk_rates_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/rates/estimate": { + "summary": "Rate Estimates", + "description": "Show rate estimations between carriers with basic information.", + "post": { + "summary": "Estimate Rates", + "description": "Get Rate Estimates", + "tags": [ + "rates" + ], + "operationId": "estimate_rates", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/estimate_rates_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/estimate_rates_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/rates/{rate_id}": { + "summary": "Rate", + "description": "Get Individual rate information.", + "parameters": [ + { + "name": "rate_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Rate ID" + } + ], + "get": { + "summary": "Get Rate By ID", + "description": "Retrieve a previously queried rate by its ID", + "tags": [ + "rates" + ], + "operationId": "get_rate_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_rate_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/service_points/list": { + "summary": "Service Points", + "post": { + "summary": "List Service Points", + "description": "List carrier service points by location", + "operationId": "service_points_list", + "tags": [ + "service_points" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_service_points_request" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_service_points_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/service_points/{carrier_code}/{country_code}/{service_point_id}": { + "summary": "Service Points", + "parameters": [ + { + "name": "carrier_code", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "stamps_com", + "description": "Carrier code" + }, + { + "name": "country_code", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "example": "CA", + "description": "A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1)\n" + }, + { + "name": "service_point_id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "example": "614940" + } + ], + "get": { + "summary": "Get Service Point By ID", + "description": "Returns a carrier service point by using the service_point_id", + "operationId": "service_points_get_by_id", + "tags": [ + "service_points" + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_service_point_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments": { + "summary": "Shipments", + "description": "Shipments are the gatekeeper to more advanced functionality inside ShipEngine. When you create a shipment, we respond with a shipment_id that is a unique identifier inside of ShipEngine.\nAdditionally, we realize that you may have your own identifier, you can set this by setting the `external_shipment_id` field in the request body.\n", + "get": { + "summary": "List Shipments", + "description": "Get list of Shipments", + "tags": [ + "shipments" + ], + "operationId": "list_shipments", + "parameters": [ + { + "name": "shipment_status", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/shipment_status" + } + }, + { + "name": "batch_id", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Batch ID" + }, + { + "name": "tag", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "Letters_to_santa", + "description": "Search for shipments based on the custom tag added to the shipment object" + }, + { + "name": "created_at_start", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z", + "description": "Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time)" + }, + { + "name": "created_at_end", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z", + "description": "Used to create a filter for when a resource was created, (ex. A shipment that was created before a certain time)" + }, + { + "name": "modified_at_start", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z", + "description": "Used to create a filter for when a resource was modified (ex. A shipment that was modified after a certain time)" + }, + { + "name": "modified_at_end", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z", + "description": "Used to create a filter for when a resource was modified (ex. A shipment that was modified before a certain time)" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1 + }, + "example": 2, + "description": "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.\n" + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 25 + }, + "example": 50, + "description": "The number of results to return per response." + }, + { + "name": "sales_order_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Sales Order ID" + }, + { + "name": "sort_dir", + "in": "query", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/sort_dir" + } + ], + "default": "desc" + }, + "description": "Controls the sort order of the query." + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/shipments_sort_by" + }, + "example": "modified_at" + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_shipments_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Create Shipments", + "description": "Create one or multiple shipments.", + "tags": [ + "shipments" + ], + "operationId": "create_shipments", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_shipments_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_shipments_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/external_shipment_id/{external_shipment_id}": { + "summary": "External Shipment ID", + "description": "When a shipment object is created with a custom shipment ID, you can query it using this endpoint\n", + "parameters": [ + { + "name": "external_shipment_id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "example": "0bcb569d-1727-4ff9-ab49-b2fec0cee5ae" + } + ], + "get": { + "summary": "Get Shipment By External ID", + "description": "Query Shipments created using your own custom ID convention using this endpint", + "tags": [ + "shipments" + ], + "operationId": "get_shipment_by_external_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_shipment_by_external_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/recognize": { + "summary": "Parse shipping info", + "description": "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 shipping data (people's names, addresses, package weights and dimensions, insurance and delivery requirements, etc.) from this unstructured text.\n", + "put": { + "summary": "Parse shipping info", + "description": "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.\n\nData 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.\n\n> **Note:** Shipment recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.\n", + "tags": [ + "shipments" + ], + "operationId": "parse_shipment", + "requestBody": { + "required": true, + "description": "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.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/parse_shipment_request_body" + }, + "examples": { + "text_only": { + "summary": "Text only", + "description": "This is the simplest way to call the shipment-recognition API. Just pass the text to be parsed and nothing else.\n", + "value": { + "text": "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.\n" + } + }, + "some_known_fields": { + "summary": "Some known fields", + "description": "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.\n", + "value": { + "text": "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.\n", + "shipment": { + "service_code": "usps_first_class_mail", + "ship_from": { + "company_name": "My Awesome Store", + "phone": "555-555-5555", + "address_line1": "587 Shotwell St.", + "address_line2": "Suite 201", + "city_locality": "San Francisco", + "state_province": "CA", + "postal_code": 94110, + "country_code": "US", + "address_residential_indicator": "yes" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Returns the parsed shipment, as well as a confidence score and a list of all the shipping entities that were recognized in the text.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/parse_shipment_response_body" + }, + "examples": { + "text_only": { + "description": "This response shows that the shipment-recognition API was able to recognize all the shipping entities in the text. Notice that the `ship_from` field is not populated, since it wasn't included in the request or in the parsed text.\n", + "value": { + "score": 0.9031369611169101, + "shipment": { + "carrier_id": "se-118608", + "service_code": "usps_first_class_mail", + "confirmation": "adult_signature", + "ship_to": { + "name": "Margie McMiller", + "company_name": "Adult Signature", + "address_line1": "3800 North Lamar", + "address_line2": "Suite 200", + "city_locality": "Austin", + "state_province": "TX", + "postal_code": 78652, + "address_residential_indicator": "unknown" + }, + "packages": [ + { + "weight": { + "value": 4, + "unit": "ounce" + }, + "dimensions": { + "length": 5, + "width": 10, + "height": 14, + "unit": "inch" + }, + "insured_value": { + "amount": 400, + "currency": "USD" + } + } + ] + }, + "entities": [ + { + "type": "weight", + "score": 0.9805313966503588, + "text": "4oz", + "start_index": 9, + "end_index": 11, + "result": { + "value": 4, + "unit": "ounce" + } + }, + { + "type": "dimensions", + "score": 1, + "text": "5x10x14in", + "start_index": 28, + "end_index": 36, + "result": { + "length": 5, + "width": 10, + "height": 14, + "unit": "inch" + } + }, + { + "type": "dimension", + "score": 0.9805313966503588, + "text": "14in", + "start_index": 33, + "end_index": 36, + "result": { + "unit": "inch", + "value": 14 + } + }, + { + "type": "address", + "score": 0.9281558837267101, + "text": "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", + "start_index": 61, + "end_index": 196, + "result": { + "direction": "to", + "name": "Margie McMiller", + "company_name": "Adult Signature", + "address_line1": "3800 North Lamar", + "address_line2": "Suite 200", + "city_locality": "Austin", + "state_province": "TX", + "postal_code": 78652 + } + }, + { + "type": "person", + "score": 0.9519646137063122, + "text": "Margie McMiller", + "start_index": 64, + "end_index": 78, + "result": { + "value": "Margie McMiller" + } + }, + { + "type": "address_line", + "score": 0.9805313966503588, + "text": "3800 North Lamar", + "start_index": 83, + "end_index": 98, + "result": { + "line": 1, + "value": "3800 North Lamar" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": 3800, + "start_index": 83, + "end_index": 86, + "result": { + "type": "cardinal", + "value": 3800 + } + }, + { + "type": "address_line", + "score": 1, + "text": "suite 200", + "start_index": 100, + "end_index": 108, + "result": { + "line": 2, + "value": "Suite 200" + } + }, + { + "type": "dimension", + "score": 0.4792571878834418, + "text": "200 in", + "start_index": 106, + "end_index": 111, + "result": { + "unit": "inch", + "value": 200 + } + }, + { + "type": "city_locality", + "score": 0.9805313966503588, + "text": "austin", + "start_index": 113, + "end_index": 118, + "result": { + "value": "Austin" + } + }, + { + "type": "state_province", + "score": 0.6082904353940255, + "text": "tx", + "start_index": 121, + "end_index": 122, + "result": { + "name": "Texas", + "value": "TX" + } + }, + { + "type": "postal_code", + "score": 0.9519646137063122, + "text": 78652, + "start_index": 124, + "end_index": 128, + "result": { + "value": 78652 + } + }, + { + "type": "carrier", + "score": 0.9519646137063122, + "text": "USPS", + "start_index": 150, + "end_index": 153, + "result": { + "name": "Stamps.com", + "value": "se-118608" + } + }, + { + "type": "service", + "score": 0.6082904353940255, + "text": "first class", + "start_index": 155, + "end_index": 165, + "result": { + "name": "USPS First Class Mail", + "value": "usps_first_class_mail" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": "first", + "start_index": 155, + "end_index": 159, + "result": { + "type": "ordinal", + "value": 1 + } + }, + { + "type": "company", + "score": 0.9519646137063122, + "text": "adult signature", + "start_index": 182, + "end_index": 196, + "result": { + "value": "Adult Signature" + } + }, + { + "type": "delivery_confirmation", + "score": 0.8530163983409642, + "text": "adult signature", + "start_index": 182, + "end_index": 196, + "result": { + "name": "Adult Signature", + "value": "adult_signature" + } + }, + { + "type": "insurance", + "score": 0.8530163983409642, + "text": "insured for $400", + "start_index": 219, + "end_index": 234, + "result": { + "value": 400, + "unit": "USD" + } + }, + { + "type": "insured_value", + "score": 1, + "text": "$400", + "start_index": 231, + "end_index": 234, + "result": { + "unit": "USD", + "value": 400 + } + } + ] + } + }, + "some_known_fields": { + "description": "This response is shows that the shipment-recognition API was able to recognize all the shipping entities in the text. Notice that the `ship_from` and `service_code` fields are populated with the values that were provided in the request.\n", + "value": { + "score": 0.9031369611169101, + "shipment": { + "carrier_id": "se-118608", + "service_code": "usps_first_class_mail", + "confirmation": "adult_signature", + "ship_to": { + "name": "Margie McMiller", + "company_name": "Adult Signature", + "address_line1": "3800 North Lamar", + "address_line2": "Suite 200", + "city_locality": "Austin", + "state_province": "TX", + "postal_code": 78652, + "address_residential_indicator": "unknown" + }, + "ship_from": { + "company_name": "My Awesome Store", + "phone": "555-555-5555", + "address_line1": "587 Shotwell St.", + "address_line2": "Suite 201", + "city_locality": "San Francisco", + "state_province": "CA", + "postal_code": 94110, + "country_code": "US", + "address_residential_indicator": "yes" + }, + "packages": [ + { + "weight": { + "value": 4, + "unit": "ounce" + }, + "dimensions": { + "length": 5, + "width": 10, + "height": 14, + "unit": "inch" + }, + "insured_value": { + "amount": 400, + "currency": "USD" + } + } + ] + }, + "entities": [ + { + "type": "weight", + "score": 0.9805313966503588, + "text": "4oz", + "start_index": 9, + "end_index": 11, + "result": { + "value": 4, + "unit": "ounce" + } + }, + { + "type": "dimensions", + "score": 1, + "text": "5x10x14in", + "start_index": 28, + "end_index": 36, + "result": { + "length": 5, + "width": 10, + "height": 14, + "unit": "inch" + } + }, + { + "type": "dimension", + "score": 0.9805313966503588, + "text": "14in", + "start_index": 33, + "end_index": 36, + "result": { + "unit": "inch", + "value": 14 + } + }, + { + "type": "address", + "score": 0.9281558837267101, + "text": "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", + "start_index": 61, + "end_index": 196, + "result": { + "direction": "to", + "name": "Margie McMiller", + "company_name": "Adult Signature", + "address_line1": "3800 North Lamar", + "address_line2": "Suite 200", + "city_locality": "Austin", + "state_province": "TX", + "postal_code": 78652 + } + }, + { + "type": "person", + "score": 0.9519646137063122, + "text": "Margie McMiller", + "start_index": 64, + "end_index": 78, + "result": { + "value": "Margie McMiller" + } + }, + { + "type": "address_line", + "score": 0.9805313966503588, + "text": "3800 North Lamar", + "start_index": 83, + "end_index": 98, + "result": { + "line": 1, + "value": "3800 North Lamar" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": 3800, + "start_index": 83, + "end_index": 86, + "result": { + "type": "cardinal", + "value": 3800 + } + }, + { + "type": "address_line", + "score": 1, + "text": "suite 200", + "start_index": 100, + "end_index": 108, + "result": { + "line": 2, + "value": "Suite 200" + } + }, + { + "type": "dimension", + "score": 0.4792571878834418, + "text": "200 in", + "start_index": 106, + "end_index": 111, + "result": { + "unit": "inch", + "value": 200 + } + }, + { + "type": "city_locality", + "score": 0.9805313966503588, + "text": "austin", + "start_index": 113, + "end_index": 118, + "result": { + "value": "Austin" + } + }, + { + "type": "state_province", + "score": 0.6082904353940255, + "text": "tx", + "start_index": 121, + "end_index": 122, + "result": { + "name": "Texas", + "value": "TX" + } + }, + { + "type": "postal_code", + "score": 0.9519646137063122, + "text": 78652, + "start_index": 124, + "end_index": 128, + "result": { + "value": 78652 + } + }, + { + "type": "carrier", + "score": 0.9519646137063122, + "text": "USPS", + "start_index": 150, + "end_index": 153, + "result": { + "name": "Stamps.com", + "value": "se-118608" + } + }, + { + "type": "service", + "score": 0.6082904353940255, + "text": "first class", + "start_index": 155, + "end_index": 165, + "result": { + "name": "USPS First Class Mail", + "value": "usps_first_class_mail" + } + }, + { + "type": "number", + "score": 0.9805313966503588, + "text": "first", + "start_index": 155, + "end_index": 159, + "result": { + "type": "ordinal", + "value": 1 + } + }, + { + "type": "company", + "score": 0.9519646137063122, + "text": "adult signature", + "start_index": 182, + "end_index": 196, + "result": { + "value": "Adult Signature" + } + }, + { + "type": "delivery_confirmation", + "score": 0.8530163983409642, + "text": "adult signature", + "start_index": 182, + "end_index": 196, + "result": { + "name": "Adult Signature", + "value": "adult_signature" + } + }, + { + "type": "insurance", + "score": 0.8530163983409642, + "text": "insured for $400", + "start_index": 219, + "end_index": 234, + "result": { + "value": 400, + "unit": "USD" + } + }, + { + "type": "insured_value", + "score": 1, + "text": "$400", + "start_index": 231, + "end_index": 234, + "result": { + "unit": "USD", + "value": 400 + } + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/{shipment_id}": { + "summary": "Get and Update Shipment", + "description": "Retrieve and Update and individual shipment based on its ID", + "parameters": [ + { + "name": "shipment_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Shipment ID" + } + ], + "get": { + "summary": "Get Shipment By ID", + "description": "Get an individual shipment based on its ID", + "tags": [ + "shipments" + ], + "operationId": "get_shipment_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_shipment_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "put": { + "summary": "Update Shipment By ID", + "description": "Update a shipment object based on its ID", + "tags": [ + "shipments" + ], + "operationId": "update_shipment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_shipment_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_shipment_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/{shipment_id}/cancel": { + "summary": "Cancel Shipment", + "description": "Cancel a Shipment", + "parameters": [ + { + "name": "shipment_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Shipment ID" + } + ], + "put": { + "summary": "Cancel a Shipment", + "description": "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\nAn 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\nwould remove it from this process\n", + "tags": [ + "shipments" + ], + "operationId": "cancel_shipments", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/{shipment_id}/rates": { + "summary": "Shipment Rates", + "description": "Once a shipment is complete with the desired shipping information, you can then search for rates available\nbased on the carriers associated with your account\n", + "parameters": [ + { + "name": "shipment_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Shipment ID" + } + ], + "get": { + "summary": "Get Shipment Rates", + "description": "Get Rates for the shipment information associated with the shipment ID", + "tags": [ + "shipments" + ], + "operationId": "list_shipment_rates", + "parameters": [ + { + "name": "created_at_start", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "example": "2019-03-12T19:24:13.657Z", + "description": "Used to create a filter for when a resource was created (ex. A shipment that was created after a certain time)" + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_shipment_rates_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/tags": { + "summary": "Shipment Tags", + "description": "Tags associated with the shipment object to be used to organize and query shipment items.\n", + "put": { + "summary": "Update Shipments Tags", + "description": "Update Shipments Tags", + "tags": [ + "shipments" + ], + "operationId": "shipments_update_tags", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_shipments_tags_request_body" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "NoContent" + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/{shipment_id}/tags": { + "summary": "Shipment Tags", + "description": "Tags associated with the shipment object to be used to organize and query shipment items.\n", + "parameters": [ + { + "name": "shipment_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Shipment ID" + } + ], + "get": { + "summary": "Get Shipment Tags", + "description": "Get Shipment tags based on its ID", + "tags": [ + "shipments" + ], + "operationId": "shipments_list_tags", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag_shipment_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/shipments/{shipment_id}/tags/{tag_name}": { + "summary": "Shipment Tags", + "description": "Tags associated with the shipment object to be used to organize and query shipment items.\n", + "parameters": [ + { + "name": "shipment_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Shipment ID" + }, + { + "name": "tag_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/tag_name" + } + } + ], + "post": { + "summary": "Add Tag to Shipment", + "description": "Add a tag to the shipment object", + "tags": [ + "shipments" + ], + "operationId": "tag_shipment", + "responses": { + "200": { + "description": "The requested object creation was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag_shipment_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Remove Tag from Shipment", + "description": "Remove an existing tag from the Shipment object", + "tags": [ + "shipments" + ], + "operationId": "untag_shipment", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/tags": { + "summary": "Tags", + "description": "Tags are simple text-based flags or identifiers. Tags can be used as a simple label,\nsuch as Guaranteed_Overnight or Fragile so shipments can be easily [queried later](https://www.shipengine.com/docs/reference/list-shipments/).\n", + "get": { + "summary": "Get Tags", + "description": "Get a list of all tags associated with an account.", + "tags": [ + "tags" + ], + "operationId": "list_tags", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_tags_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/tags/{tag_name}": { + "summary": "Tag", + "description": "Create and delete tags", + "parameters": [ + { + "name": "tag_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/tag_name" + } + } + ], + "post": { + "summary": "Create a New Tag", + "description": "Create a new Tag for customizing how you track your shipments", + "tags": [ + "tags" + ], + "operationId": "create_tag", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_tag_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Delete Tag", + "description": "Delete a tag that is no longer needed", + "tags": [ + "tags" + ], + "operationId": "delete_tag", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/tags/{tag_name}/{new_tag_name}": { + "summary": "Tag", + "description": "Update tag name", + "parameters": [ + { + "name": "tag_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/tag_name" + } + }, + { + "name": "new_tag_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/tag_name" + } + } + ], + "put": { + "summary": "Update Tag Name", + "description": "Change a tag name while still keeping the relevant shipments attached to it", + "tags": [ + "tags" + ], + "operationId": "rename_tag", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/tokens/ephemeral": { + "post": { + "summary": "Get Ephemeral Token", + "description": "This endpoint returns a token that can be passed to an application for authorized access. The lifetime of this token is 10 seconds.", + "operationId": "tokens_get_ephemeral_token", + "parameters": [ + { + "name": "redirect", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/redirect" + }, + "description": "Include a redirect url to the application formatted with the ephemeral token." + } + ], + "tags": [ + "tokens" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tokens_get_ephemeral_token_response_body.yaml" + } + } + } + } + } + } + }, + "/v1/tracking": { + "summary": "Tracking a Package", + "description": "If you generate your labels through ShipEngine, then you can subscribe to real-time tracking events for free!", + "get": { + "summary": "Get Tracking Information", + "description": "Retrieve package tracking information", + "tags": [ + "tracking" + ], + "operationId": "get_tracking_log", + "parameters": [ + { + "name": "carrier_code", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "stamps_com", + "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" + }, + { + "name": "tracking_number", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "9405511899223197428490", + "description": "The tracking number associated with a shipment" + } + ], + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_tracking_log_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/tracking/start": { + "summary": "Start Tracking a Package", + "description": "Allows you to subscribe to tracking updates for a package. You specify the carrier_code and tracking_number of the package,\nand receive notifications via webhooks whenever the shipping status changes.\n", + "post": { + "summary": "Start Tracking a Package", + "description": "Allows you to subscribe to tracking updates for a package. You specify the carrier_code and tracking_number of the package,\nand receive notifications via webhooks whenever the shipping status changes.\n", + "tags": [ + "tracking" + ], + "operationId": "start_tracking", + "parameters": [ + { + "name": "carrier_code", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "stamps_com", + "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" + }, + { + "name": "tracking_number", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "9405511899223197428490", + "description": "The tracking number associated with a shipment" + } + ], + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/tracking/stop": { + "summary": "Stop Tracking a Package", + "description": "Unsubscribe from tracking updates for a package.", + "post": { + "summary": "Stop Tracking a Package", + "description": "Unsubscribe from tracking updates for a package.", + "tags": [ + "tracking" + ], + "operationId": "stop_tracking", + "parameters": [ + { + "name": "carrier_code", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "stamps_com", + "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc.\n" + }, + { + "name": "tracking_number", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + }, + "example": "9405511899223197428490", + "description": "The tracking number associated with a shipment" + } + ], + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/warehouses": { + "summary": "Warehouses", + "description": "You likely have one or more warehouse locations that you frequently ship from, in which case it would be annoying to have to specify the\nship_from and return_to addresses on every shipment. The solution is to [Create a Warehouse](https://www.shipengine.com/docs/reference/create-warehouse/), then you can simply pass the warehouse_id instead.\n", + "get": { + "summary": "List Warehouses", + "description": "Retrieve a list of warehouses associated with this account.", + "tags": [ + "warehouses" + ], + "operationId": "list_warehouses", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/list_warehouses_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "post": { + "summary": "Create Warehouse", + "description": "Create a warehouse location that you can use to create shipping items by simply passing in the generated warehouse id.\nIf the return address is not supplied in the request body then it is assumed that the origin address is the return address as well\n", + "tags": [ + "warehouses" + ], + "operationId": "create_warehouse", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_warehouse_request_body" + } + } + } + }, + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_warehouse_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/warehouses/{warehouse_id}": { + "summary": "Warehouse", + "description": "You likely have one or more warehouse locations that you frequently ship from, in which case it would be annoying to have to specify the\nship_from and return_to addresses on every shipment. The solution is to [Create a Warehouse](https://www.shipengine.com/docs/reference/create-warehouse/), then you can simply pass the warehouse_id instead.\n", + "parameters": [ + { + "name": "warehouse_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Warehouse ID" + } + ], + "get": { + "summary": "Get Warehouse By Id", + "description": "Retrieve warehouse data based on the warehouse ID", + "tags": [ + "warehouses" + ], + "operationId": "get_warehouse_by_id", + "responses": { + "200": { + "description": "The request was a success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_warehouse_by_id_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "put": { + "summary": "Update Warehouse By Id", + "description": "Update Warehouse object information", + "tags": [ + "warehouses" + ], + "operationId": "update_warehouse", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_warehouse_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + }, + "delete": { + "summary": "Delete Warehouse By ID", + "description": "Delete a warehouse by ID", + "tags": [ + "warehouses" + ], + "operationId": "delete_warehouse", + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + }, + "/v1/warehouses/{warehouse_id}/settings": { + "summary": "Warehouse settings", + "description": "Warehouse settings", + "parameters": [ + { + "name": "warehouse_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/se_id" + }, + "description": "Warehouse ID" + } + ], + "put": { + "summary": "Update Warehouse Settings", + "description": "Update Warehouse settings object information", + "tags": [ + "warehouses" + ], + "operationId": "update_warehouse_settings", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_warehouse_settings_request_body" + } + } + } + }, + "responses": { + "204": { + "description": "The request was successful.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/empty_response_body" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400_error_response" + }, + "404": { + "$ref": "#/components/responses/404_error_response" + }, + "500": { + "$ref": "#/components/responses/500_error_response" + } + } + } + } + }, + "servers": [ + { + "url": "https://api.shipengine.com" + } + ], + "components": { + "schemas": { + "get_account_settings_response_body": { + "title": "get_account_settings_response_body", + "allOf": [ + { + "$ref": "#/components/schemas/list_account_settings_body" + } + ] + }, + "list_account_settings_body": { + "title": "list_account_settings_body", + "type": "object", + "description": "An account settings list response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/account_settings" + } + ] + }, + "account_settings": { + "title": "account_settings", + "type": "object", + "description": "A ShipEngine account settings response body", + "additionalProperties": false, + "properties": { + "default_label_layout": { + "allOf": [ + { + "$ref": "#/components/schemas/default_label_layout" + } + ] + } + } + }, + "default_label_layout": { + "title": "default_label_layout", + "type": "string", + "enum": [ + "4x6", + "Letter" + ], + "description": "The possible default label layout values" + }, + "error_response_body": { + "title": "error_response_body", + "type": "object", + "description": "An error response body", + "required": [ + "request_id", + "errors" + ], + "additionalProperties": false, + "properties": { + "request_id": { + "allOf": [ + { + "$ref": "#/components/schemas/uuid" + } + ], + "description": "A UUID that uniquely identifies the request id.\nThis can be given to the support team to help debug non-trivial issues that may occur\n" + }, + "errors": { + "type": "array", + "readOnly": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/error" + } + ] + }, + "description": "The errors associated with the failed API call" + } + } + }, + "uuid": { + "title": "uuid", + "type": "string", + "format": "uuid", + "minLength": 36, + "maxLength": 36, + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", + "example": "aa3d8e8e-462b-4476-9618-72db7f7b7009", + "description": "A UUID (a.k.a. GUID) that uniquely identifies a resource" + }, + "error": { + "title": "error", + "type": "object", + "description": "The error structure that gets returned with almost all failed API calls\n", + "required": [ + "error_source", + "error_type", + "error_code", + "message" + ], + "additionalProperties": false, + "properties": { + "error_source": { + "allOf": [ + { + "$ref": "#/components/schemas/error_source" + } + ] + }, + "error_type": { + "allOf": [ + { + "$ref": "#/components/schemas/error_type" + } + ] + }, + "error_code": { + "allOf": [ + { + "$ref": "#/components/schemas/error_code" + } + ] + }, + "message": { + "type": "string", + "readOnly": true, + "example": "Body of request cannot be null.", + "minLength": 1, + "description": "An error message associated with the failed API call" + } + } + }, + "error_source": { + "title": "error_source", + "type": "string", + "enum": [ + "carrier", + "order_source", + "shipengine" + ], + "description": "The source of the error, as indicated by the name this informs us if the API call failed because of the\ncarrier, the order source, or the ShipEngine API itself.\n" + }, + "error_type": { + "title": "error_type", + "type": "string", + "enum": [ + "account_status", + "business_rules", + "validation", + "security", + "system", + "integrations" + ], + "description": "The type of error\n" + }, + "error_code": { + "title": "error_code", + "type": "string", + "enum": [ + "auto_fund_not_supported", + "batch_cannot_be_modified", + "carrier_conflict", + "carrier_disconnected", + "carrier_not_connected", + "carrier_not_supported", + "confirmation_not_supported", + "default_warehouse_cannot_be_deleted", + "field_conflict", + "field_value_required", + "forbidden", + "identifier_conflict", + "identifiers_must_match", + "insufficient_funds", + "invalid_address", + "invalid_billing_plan", + "invalid_field_value", + "invalid_identifier", + "invalid_status", + "invalid_string_length", + "label_images_not_supported", + "meter_failure", + "order_source_not_active", + "rate_limit_exceeded", + "refresh_not_supported", + "request_body_required", + "return_label_not_supported", + "settings_not_supported", + "subscription_inactive", + "terms_not_accepted", + "tracking_not_supported", + "trial_expired", + "unauthorized", + "unknown", + "unspecified", + "verification_failure", + "warehouse_conflict", + "webhook_event_type_conflict", + "customs_items_required", + "incompatible_paired_labels", + "invalid_charge_event", + "invalid_object", + "no_rates_returned" + ], + "description": "The error code specified for the failed API Call" + }, + "list_account_settings_images_response_body": { + "title": "list_account_settings_images_response_body", + "allOf": [ + { + "$ref": "#/components/schemas/list_account_images_response_body" + } + ] + }, + "list_account_images_response_body": { + "title": "list_account_images_response_body", + "type": "object", + "description": "A list account images response body", + "required": [ + "images" + ], + "additionalProperties": false, + "properties": { + "images": { + "type": "array", + "readOnly": true, + "minItems": 0, + "items": { + "allOf": [ + { + "title": "account_settings_images", + "type": "object", + "description": "A ShipEngine account images body", + "additionalProperties": false, + "properties": { + "label_image_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/image_id" + } + ], + "description": "A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded.\n" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "example": "My logo", + "description": "A human readable name for the image.\n" + }, + "is_default": { + "type": "boolean", + "example": false, + "description": "Indicates whether this image is set as default.\n" + }, + "image_content_type": { + "allOf": [ + { + "type": "string", + "enum": [ + "image/png", + "image/jpeg" + ], + "description": "The image type" + } + ], + "description": "The file type of the image. \n" + }, + "image_data": { + "type": "string", + "example": "iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg==", + "description": "A base64 encoded string representation of the image.\n" + }, + "created_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the image was created in ShipEngine." + }, + "modified_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the image was modified in ShipEngine." + } + } + } + ], + "description": "Image" + }, + "description": "Image List" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/paged_list_response_body" + } + ] + }, + "paged_list_response_body": { + "title": "paged_list_response_body", + "type": "object", + "required": [ + "total", + "page", + "pages", + "links" + ], + "additionalProperties": true, + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "example": 2750, + "description": "The total number of items across all pages of results" + }, + "page": { + "type": "integer", + "minimum": 1, + "example": 1, + "description": "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": { + "type": "integer", + "minimum": 0, + "example": 4, + "description": "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." + }, + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination_link" + } + ] + } + }, + "description": "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.\n" + }, + "pagination_link": { + "title": "pagination_link", + "type": "object", + "description": "Helpful links to other pages of results", + "required": [ + "first", + "last", + "prev", + "next" + ], + "additionalProperties": false, + "properties": { + "first": { + "allOf": [ + { + "$ref": "#/components/schemas/link" + } + ], + "description": "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.\n" + }, + "last": { + "allOf": [ + { + "$ref": "#/components/schemas/link" + } + ], + "description": "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.\n" + }, + "prev": { + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "The link to the previous page of results. The `href` field will only be set when the `page` is 2 or greater.\n" + }, + "next": { + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "The link to the next page of results. The `href` field will only be set when the `page` is less than `pages`.\n" + } + } + }, + "link": { + "title": "link", + "type": "object", + "description": "A link to a related resource", + "additionalProperties": false, + "required": [ + "href" + ], + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ] + }, + "optional_link": { + "title": "optional_link", + "type": "object", + "description": "A link to a related resource, or an empty object if there is no resource to link to", + "additionalProperties": false, + "properties": { + "href": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "description": "The URL of the linked resource, if any" + }, + "type": { + "type": "string", + "minLength": 1, + "description": "The type of resource, or the type of relationship to the parent resource" + } + } + }, + "url": { + "title": "url", + "type": "string", + "format": "url", + "minLength": 1, + "example": "http://api.shipengine.com/v1/labels/se-28529731", + "description": "A URL" + }, + "create_account_settings_image_request_body": { + "title": "create_account_settings_image_request_body", + "type": "object", + "description": "A ShipEngine account settings images request body", + "required": [ + "name", + "image_content_type", + "image_data" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/account_settings_images" + } + ] + }, + "account_settings_images": { + "title": "account_settings_images", + "type": "object", + "description": "A ShipEngine account images body", + "additionalProperties": false, + "properties": { + "label_image_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/image_id" + } + ], + "description": "A string that uniquely identifies the image. This ID is generated by ShipEngine when the image is uploaded.\n" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "example": "My logo", + "description": "A human readable name for the image.\n" + }, + "is_default": { + "type": "boolean", + "example": false, + "description": "Indicates whether this image is set as default.\n" + }, + "image_content_type": { + "allOf": [ + { + "type": "string", + "enum": [ + "image/png", + "image/jpeg" + ], + "description": "The image type" + } + ], + "description": "The file type of the image. \n" + }, + "image_data": { + "type": "string", + "example": "iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAiVJREFUSEu91j3IeVEcB/CvSTIoBrFSikEZMdjsjExeUspgUEp5SUpeshrIgEFJJmWwMZHJQGHDhJSXTPfpnH/8ebzd56HnN93u7ZzP/f1+55x7Ob1ejxEKheByufh0HI9HrFYrcKbTKUMu5HI5BALBx5zNZoPxeAySAGc2mzF8Pp/e+BR0Ash8u93uHyKVSnH54J2Mvs8zn8//I6RO70L3xt8g70CPXvAu8hvoWQUeIj+BXpX4KcIGegWQOV4izyA2AGvkHsQW+BFyCUkkEiwWC9Ybl1W5Ls8ZMoAABCIbmE3cINFoFMFgEEajEeVyGSKRCJ1OB3q9ns5nMpmQTCaxXq9/l8loNEKj0YDX66UACYvFQq9brRYcDgdUKhU9RD/SEwLm83lEIhGUSiX0+33E4/GrU5otRMs1mUyYbDYLu90OhUJBMzhlZbPZ4Pf7odFo4HQ6b1rABqJIvV5nttstLc0pSIn2+z0tTy6XQ6FQoI/a7TZ0Ot0V9gqiiMFgYKrVKm0yieVyCZ/PB6vVSpF0Ok2zJHEqIY/HYw1RxOfzMYlE4jwoEAhAJpPBbDZf9eBwOCCVSsHtdp9f6FJ6egorlUqmVqvRfjSbTXS7XXg8nptP8Svk0RF01ROtVguSUTgchlgsPpeOZBaLxTAcDlEsFpHJZPC9XM8yoshgMGBCoRBdQWTCU7hcLjohWb5kM6rValQqlfMKfLbbb77xf/K38hf/XV9ilOpnLqvnogAAAABJRU5ErkJggg==", + "description": "A base64 encoded string representation of the image.\n" + }, + "created_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the image was created in ShipEngine." + }, + "modified_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the image was modified in ShipEngine." + } + } + }, + "image_id": { + "title": "image_id", + "type": "string", + "minLength": 4, + "example": "img_DtBXupDBxREpHnwEXhTfgK", + "description": "Used to identify an image resource." + }, + "date_time": { + "title": "date_time", + "type": "string", + "format": "date-time", + "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[-+]\\d{2}:\\d{2})$", + "example": "2018-09-23T15:00:00.000Z", + "description": "An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string that represents a date and time.\n" + }, + "get_account_settings_images_response_body": { + "title": "get_account_settings_images_response_body", + "type": "object", + "description": "A get account images by id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/account_settings_images" + } + ] + }, + "empty_response_body": { + "title": "empty_response_body", + "type": "string", + "minLength": 0, + "maxLength": 0 + }, + "update_account_settings_image_request_body": { + "title": "update_account_settings_image_request_body", + "type": "object", + "description": "A ShipEngine account settings images request body", + "required": [ + "is_default" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/account_settings_images" + } + ] + }, + "parse_address_request_body": { + "title": "parse_address_request_body", + "type": "object", + "description": "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.\n", + "required": [ + "text" + ], + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "minLength": 1, + "example": "Margie McMiller at 3800 North Lamar suite 200 in austin, tx. The zip code there is 78652.", + "description": "The unstructured text that contains address-related entities" + }, + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/partial_address" + } + ], + "description": "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.\n" + } + } + }, + "partial_address": { + "title": "partial_address", + "type": "object", + "description": "A complete or partial mailing address.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "minLength": 1, + "example": "John Doe", + "description": "The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field.\n" + }, + "phone": { + "type": "string", + "minLength": 1, + "example": "+1 204-253-9411 ext. 123", + "description": "The phone number of a contact person at this address. The format of this phone number varies depending on the country.\n" + }, + "email": { + "type": "string", + "nullable": true, + "example": "example@example.com", + "description": "Email for the address owner.\n" + }, + "company_name": { + "type": "string", + "minLength": 1, + "nullable": true, + "example": "The Home Depot", + "description": "If this is a business address, then the company name should be specified here.\n" + }, + "address_line1": { + "type": "string", + "minLength": 1, + "example": "1999 Bishop Grandin Blvd.", + "description": "The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.\n" + }, + "address_line2": { + "type": "string", + "minLength": 1, + "nullable": true, + "example": "Unit 408", + "description": "The second line of the street address. For some addresses, this line may not be needed.\n" + }, + "address_line3": { + "type": "string", + "minLength": 1, + "nullable": true, + "example": "Building #7", + "description": "The third line of the street address. For some addresses, this line may not be needed.\n" + }, + "city_locality": { + "type": "string", + "minLength": 1, + "example": "Winnipeg", + "description": "The name of the city or locality" + }, + "state_province": { + "type": "string", + "minLength": 1, + "example": "Manitoba", + "description": "The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.\n" + }, + "postal_code": { + "allOf": [ + { + "$ref": "#/components/schemas/postal_code" + } + ] + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ], + "description": "The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1)\n" + }, + "address_residential_indicator": { + "default": "unknown", + "example": "no", + "description": "Indicates whether this is a residential address.", + "allOf": [ + { + "$ref": "#/components/schemas/address_residential_indicator" + } + ] + } + } + }, + "postal_code": { + "title": "postal_code", + "minLength": 1, + "type": "string", + "example": "78756-3717", + "description": "postal code" + }, + "country_code": { + "title": "country_code", + "type": "string", + "minLength": 2, + "maxLength": 2, + "example": "CA", + "description": "A two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1)\n" + }, + "address_residential_indicator": { + "title": "address_residential_indicator", + "type": "string", + "enum": [ + "unknown", + "yes", + "no" + ], + "description": "Indicates whether an address is residential." + }, + "parse_address_response_body": { + "title": "parse_address_response_body", + "type": "object", + "description": "The parsed address, as well as a confidence score and a list of all the entities that were recognized in the text.\n", + "required": [ + "score", + "address", + "entities" + ], + "additionalProperties": false, + "properties": { + "score": { + "type": "number", + "format": "double", + "minimum": 0, + "maximum": 1, + "description": "A confidence score between zero and one that indicates how certain the API is that it understood the text.\n" + }, + "address": { + "allOf": [ + { + "$ref": "#/components/schemas/partial_address" + } + ], + "description": "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.\n\n> **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.\n" + }, + "entities": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/recognized_entity" + }, + "description": "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.\n" + } + } + }, + "recognized_entity": { + "title": "recognized_entity", + "type": "object", + "description": "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.\n", + "required": [ + "type", + "score", + "text", + "start_index", + "end_index" + ], + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "minLength": 1, + "description": "The Entity type (e.g. \"weight\", \"person\", \"address_line1\", etc.)" + }, + "score": { + "format": "double", + "minimum": 0, + "maximum": 1, + "type": "number", + "description": "A confidence score between zero and one that indicates how certain the API is that it correctly recognized this entity\n" + }, + "text": { + "type": "string", + "minLength": 1, + "description": "The substring from the original text that was recognized as this entity" + }, + "start_index": { + "type": "integer", + "minimum": 0, + "description": "The index of the first character of this entity within the original text" + }, + "end_index": { + "type": "integer", + "minimum": 0, + "description": "The index of the last character of this entity within the original text" + }, + "result": { + "$ref": "#/components/schemas/normalized_entity" + } + } + }, + "normalized_entity": { + "title": "normalized_entity", + "type": "object", + "additionalProperties": true, + "properties": {}, + "description": "The normalized value of the entity.\n\nMost 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\".\n\nSome 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`.\n" + }, + "validate_address_request_body": { + "title": "validate_address_request_body", + "type": "array", + "description": "An address validation request body", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/address_to_validate" + } + ], + "description": "An array of addresses to validate." + } + }, + "address_to_validate": { + "title": "address_to_validate", + "type": "object", + "description": "Any residential or business mailing address, anywhere in the world.\n", + "required": [ + "address_line1", + "city_locality", + "state_province", + "country_code" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/partial_address" + } + ] + }, + "validate_address_response_body": { + "title": "validate_address_response_body", + "type": "array", + "description": "An address validation response body", + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/address_validation_result" + } + ], + "description": "The address validation response body" + } + }, + "address_validation_result": { + "title": "address_validation_result", + "type": "object", + "description": "An address validation result", + "required": [ + "status", + "original_address", + "matched_address", + "messages" + ], + "additionalProperties": false, + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/address_validation_status" + } + ] + }, + "original_address": { + "allOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The original address that was sent for validation" + }, + "matched_address": { + "nullable": true, + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The matched address found by the Shipengine API" + }, + "messages": { + "type": "array", + "readOnly": true, + "default": [], + "items": { + "$ref": "#/components/schemas/response_message" + }, + "description": "The list of messages that were generated during the address validation request." + } + } + }, + "address_validation_status": { + "title": "address_validation_status", + "type": "string", + "enum": [ + "unverified", + "verified", + "warning", + "error" + ], + "description": "The possible address validation status values" + }, + "address": { + "title": "address", + "type": "object", + "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" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/partial_address" + } + ] + }, + "response_message": { + "title": "response_message", + "type": "object", + "description": "A response message that displays when additional info is needed for an address validation request.", + "additionalProperties": false, + "required": [ + "code", + "message", + "type", + "detail_code" + ], + "properties": { + "code": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/address_validation_code" + } + ] + }, + "message": { + "type": "string", + "readOnly": true, + "example": "Invalid Postal Code", + "minLength": 1, + "description": "Message explaining the address validation error" + }, + "type": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/address_validation_message_type" + } + ] + }, + "detail_code": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/address_validation_detail_code" + } + ] + } + } + }, + "address_validation_code": { + "title": "address_validation_code", + "type": "string", + "enum": [ + "a1000", + "a1001", + "a1002", + "a1003", + "a1004", + "a1005", + "a1006", + "a1007", + "a1008", + "r1000", + "r1001", + "r1002", + "r1003" + ], + "description": "The error codes that can be returned by the address validation API" + }, + "address_validation_message_type": { + "title": "address_validation_message_type", + "type": "string", + "enum": [ + "error", + "warning", + "info" + ], + "description": "The different types of messages that can be returned by the address validation API" + }, + "address_validation_detail_code": { + "title": "address_validation_detail_code", + "type": "string", + "enum": [ + "unsupported_country", + "non_supported_country", + "minimum_postal_code_verification_failed", + "street_does_not_match_unique_street_name", + "multiple_directionals", + "multiple_matches", + "suite_not_valid", + "suite_missing", + "incompatible_paired_labels", + "invalid_house_number", + "missing_house_number", + "invalid_box_number", + "invalid_charge_event", + "missing_box_number", + "missing_cmra_or_private_mail_box_number", + "suite_has_no_secondaries", + "postal_code_changed_or_added", + "state_province_changed_or_added", + "city_locality_changed_or_added", + "urbanization_changed", + "street_name_spelling_changed_or_added", + "street_name_type_changed_or_added", + "street_direction_changed_or_added", + "suite_type_changed_or_added", + "suite_unit_number_changed_or_added", + "double_dependent_locality_changed_or_added", + "subadministrative_area_changed_or_added", + "subnational_area_changed_or_added", + "po_box_changed_or_added", + "premise_type_changed_or_added", + "house_number_changed", + "organization_changed_or_added", + "partially_verified_to_state_level", + "partially_verified_to_city_level", + "partially_verified_to_street_level", + "partially_verified_to_premise_level", + "verified_to_state_level", + "verified_to_city_level", + "verified_to_street_level", + "verified_to_premise_level", + "verified_to_suite_level", + "coded_to_street_lavel", + "coded_to_neighborhood_level", + "coded_to_community_level", + "coded_to_state_level", + "coded_to_rooftop_level", + "coded_to_rooftop_interpolation_level", + "name_max_length_exceeded", + "phone_max_length_exceeded", + "company_name_max_length_exceeded", + "line1_min_max_length", + "line2_max_length_exceeded", + "line3_max_length_exceeded", + "city_locality_max_length_exceeded", + "state_province_max_length_exceeded", + "invalid_postal_code", + "country_invalid_length", + "address_not_found" + ], + "description": "The detailed error codes that can be returned by the address validation API" + }, + "batch_status": { + "title": "batch_status", + "type": "string", + "enum": [ + "open", + "queued", + "processing", + "completed", + "completed_with_errors", + "archived", + "notifying", + "invalid" + ], + "description": "The possible batch status values" + }, + "sort_dir": { + "title": "sort_dir", + "type": "string", + "enum": [ + "asc", + "desc" + ], + "description": "Controls the sort order of queries\n\n|Value |Description\n|:---------|:-----------------------------------------------------\n|`asc` |Return results in ascending order\n|`desc` |Return results in descending order\n" + }, + "batches_sort_by": { + "title": "batches_sort_by", + "type": "string", + "enum": [ + "ship_date", + "processed_at", + "created_at" + ], + "description": "The possible batches sort by values" + }, + "list_batches_response_body": { + "title": "list_batches_response_body", + "type": "object", + "description": "A list batch response body", + "required": [ + "batches", + "total", + "page", + "pages", + "links" + ], + "additionalProperties": false, + "properties": { + "batches": { + "type": "array", + "readOnly": true, + "minItems": 0, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/batch" + } + ], + "description": "Batch" + }, + "description": "Batch List" + }, + "total": { + "type": "integer", + "format": "int64", + "readOnly": true, + "minimum": 0, + "example": 10, + "description": "The total number of batches the API call returned" + }, + "page": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 1, + "description": "The page that is currently being read" + }, + "pages": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 10, + "description": "The total number of batch pages the API call returned" + }, + "links": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/pagination_link" + } + ] + } + } + }, + "batch": { + "title": "batch", + "type": "object", + "description": "Batches are an advanced feature of ShipEngine designed for users who need to generate hundreds or\nthousands of labels at a time.\n", + "required": [ + "label_layout", + "label_format", + "batch_id", + "batch_number", + "external_batch_id", + "batch_notes", + "created_at", + "processed_at", + "errors", + "process_errors", + "warnings", + "completed", + "forms", + "count", + "batch_shipments_url", + "batch_labels_url", + "batch_errors_url", + "label_download", + "form_download", + "paperless_download", + "status" + ], + "additionalProperties": false, + "properties": { + "label_layout": { + "readOnly": true, + "default": "4x6", + "description": "label layout", + "allOf": [ + { + "$ref": "#/components/schemas/label_layout" + } + ] + }, + "label_format": { + "readOnly": true, + "default": "pdf", + "allOf": [ + { + "$ref": "#/components/schemas/label_format" + } + ] + }, + "batch_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the batch" + }, + "batch_number": { + "readOnly": true, + "type": "string", + "minLength": 0, + "description": "The batch number." + }, + "external_batch_id": { + "type": "string", + "readOnly": true, + "nullable": true, + "minLength": 0, + "description": "A string that uniquely identifies the external batch" + }, + "batch_notes": { + "type": "string", + "readOnly": true, + "nullable": true, + "default": "", + "example": "Batch for morning shipment", + "description": "Custom notes you can add for each created batch" + }, + "created_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time the batch was created in ShipEngine" + }, + "processed_at": { + "nullable": true, + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time the batch was processed in ShipEngine" + }, + "errors": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 0, + "example": 2, + "description": "The number of errors that occurred while generating the batch" + }, + "process_errors": { + "errors": null, + "type": "array", + "readOnly": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/error" + } + ] + }, + "description": "The errors associated with the failed API call" + }, + "warnings": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 0, + "example": 1, + "description": "The number of warnings that occurred while generating the batch" + }, + "completed": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 0, + "example": 1, + "description": "The number of labels generated in the batch" + }, + "forms": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 0, + "example": 3, + "description": "The number of forms for customs that are available for download" + }, + "count": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 0, + "example": 2, + "description": "The total of errors, warnings, and completed properties" + }, + "batch_shipments_url": { + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "The batch shipments endpoint" + }, + "batch_labels_url": { + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "Link to batch labels query" + }, + "batch_errors_url": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "Link to batch errors endpoint" + }, + "label_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/label_download" + } + ], + "description": "The label download for the batch" + }, + "form_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/optional_link" + } + ], + "description": "The form download for any customs that are needed" + }, + "paperless_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/paperless_download" + } + ], + "description": "The paperless details which may contain elements like `href`, `instructions` and `handoff_code`." + }, + "status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/batch_status" + } + ] + } + } + }, + "label_layout": { + "title": "label_layout", + "type": "string", + "enum": [ + "4x6", + "letter" + ], + "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" + }, + "label_format": { + "title": "label_format", + "type": "string", + "enum": [ + "pdf", + "png", + "zpl" + ], + "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", + "description": "Reference to the various downloadable file formats for the generated label\n", + "additionalProperties": false, + "properties": { + "href": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "description": "The URL of the linked resource, if any" + }, + "pdf": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "description": "The URL for the pdf generated label" + }, + "png": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "description": "The URL for the png generated label" + }, + "zpl": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "description": "The URL for the zpl generated label" + } + } + }, + "paperless_download": { + "title": "paperless_download", + "type": "object", + "description": "The paperless details which may contain elements like `href`, `instructions` and `handoff_code`.\n", + "additionalProperties": false, + "properties": { + "href": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "description": "The URL of the linked resource, if any" + }, + "instructions": { + "type": "string", + "nullable": true, + "default": null, + "description": "The instructions for the paperless download.\n" + }, + "handoff_code": { + "type": "string", + "nullable": true, + "default": null, + "description": "The handoff code for the paperless download.\n" + } + } + }, + "create_batch_request": { + "title": "create_batch_request", + "oneOf": [ + { + "$ref": "#/components/schemas/create_batch_request_body" + }, + { + "$ref": "#/components/schemas/create_and_process_batch_request_body" + } + ] + }, + "create_batch_request_body": { + "title": "create_batch_request_body", + "type": "object", + "description": "A create batch request body", + "additionalProperties": false, + "properties": { + "external_batch_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the external batch" + }, + "batch_notes": { + "type": "string", + "minLength": 1, + "example": "This is my batch", + "description": "Add custom messages for a particular batch" + }, + "shipment_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "description": "Array of shipment IDs used in the batch" + }, + "rate_ids": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "description": "Array of rate IDs used in the batch" + } + } + }, + "create_and_process_batch_request_body": { + "title": "create_and_process_batch_request_body", + "type": "object", + "description": "A create and process batch request body", + "additionalProperties": false, + "properties": { + "external_batch_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the external batch" + }, + "batch_notes": { + "type": "string", + "minLength": 1, + "example": "This is my batch", + "description": "Add custom messages for a particular batch" + }, + "shipment_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "description": "Array of shipment IDs used in the batch" + }, + "rate_ids": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "description": "Array of rate IDs used in the batch" + }, + "process_labels": { + "type": "object", + "description": "The information used to process the batch", + "properties": { + "create_batch_and_process_labels": { + "type": "boolean", + "description": "When 'true', the batch will be enqueued for processing" + }, + "ship_date": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The Ship date the batch is being processed for" + }, + "label_layout": { + "type": "string", + "default": "4x6", + "allOf": [ + { + "$ref": "#/components/schemas/label_layout" + } + ] + }, + "label_format": { + "default": "pdf", + "allOf": [ + { + "$ref": "#/components/schemas/label_format" + } + ] + }, + "display_scheme": { + "default": "label", + "allOf": [ + { + "$ref": "#/components/schemas/display_scheme" + } + ], + "description": "The display format that the label should be shown in." + } + } + } + } + }, + "display_scheme": { + "title": "display_scheme", + "type": "string", + "enum": [ + "label", + "qr_code", + "label_and_qr_code", + "paperless", + "label_and_paperless" + ], + "description": "The display format that the label should be shown in." + }, + "create_batch_response_body": { + "title": "create_batch_response_body", + "type": "object", + "description": "A create batch response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/batch" + } + ] + }, + "get_batch_by_external_id_response_body": { + "title": "get_batch_by_external_id_response_body", + "type": "object", + "description": "A get batch by external id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/batch" + } + ] + }, + "get_batch_by_id_response_body": { + "title": "get_batch_by_id_response_body", + "type": "object", + "description": "A get batch by id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/batch" + } + ] + }, + "add_to_batch_request_body": { + "title": "add_to_batch_request_body", + "type": "object", + "description": "An add to batch request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/modify_batch" + } + ] + }, + "modify_batch": { + "title": "modify_batch", + "type": "object", + "description": "A modify batch object", + "additionalProperties": false, + "properties": { + "shipment_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The Shipment ID to be modified on the batch" + }, + "description": "The Shipment Ids to be modified on the batch" + }, + "rate_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The Rate ID to be modified on the batch" + }, + "description": "Array of Rate IDs to be modifed on the batch" + } + } + }, + "list_batch_errors_response_body": { + "title": "list_batch_errors_response_body", + "type": "object", + "description": "A batch errors response body", + "required": [ + "errors", + "links" + ], + "additionalProperties": false, + "properties": { + "errors": { + "type": "array", + "readOnly": true, + "default": [], + "items": { + "$ref": "#/components/schemas/batch_response_error" + }, + "description": "The errors currently associated with the batch" + }, + "links": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/pagination_link" + } + ] + } + } + }, + "batch_response_error": { + "title": "batch_response_error", + "type": "object", + "description": "A batch response error", + "additionalProperties": false, + "properties": { + "error": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": "Recipient address has not been verified.", + "description": "Error message associated with the shipment." + }, + "shipment_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the shipment" + }, + "external_shipment_id": { + "readOnly": true, + "type": "string", + "description": "An external shipment id associated with the shipment" + } + } + }, + "process_batch_request_body": { + "title": "process_batch_request_body", + "type": "object", + "description": "A process batch request body", + "additionalProperties": false, + "properties": { + "ship_date": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The Ship date the batch is being processed for" + }, + "label_layout": { + "type": "string", + "default": "4x6", + "allOf": [ + { + "$ref": "#/components/schemas/label_layout" + } + ] + }, + "label_format": { + "default": "pdf", + "allOf": [ + { + "$ref": "#/components/schemas/label_format" + } + ] + }, + "display_scheme": { + "default": "label", + "allOf": [ + { + "$ref": "#/components/schemas/display_scheme" + } + ], + "description": "The display format that the label should be shown in." + } + } + }, + "remove_from_batch_request_body": { + "title": "remove_from_batch_request_body", + "type": "object", + "description": "A modify batch request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/modify_batch" + } + ] + }, + "get_carriers_response_body": { + "title": "get_carriers_response_body", + "allOf": [ + { + "$ref": "#/components/schemas/list_carriers_response_body" + }, + { + "$ref": "#/components/schemas/error_response_body" + } + ] + }, + "list_carriers_response_body": { + "title": "list_carriers_response_body", + "type": "object", + "description": "A carrier list response body", + "additionalProperties": false, + "required": [ + "carriers" + ], + "properties": { + "carriers": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/carrier" + } + ] + }, + "description": "The carrier response body" + } + } + }, + "carrier": { + "title": "carrier", + "type": "object", + "description": "A carrier object that represents a provider such as UPS, USPS, DHL, etc\nthat has been tied to the current account.\n", + "additionalProperties": false, + "properties": { + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier." + }, + "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" + }, + "account_number": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": "account_570827", + "description": "The account number that the carrier is connected to." + }, + "requires_funded_amount": { + "type": "boolean", + "readOnly": true, + "description": "Indicates whether the carrier requires funding to use its services" + }, + "balance": { + "type": "number", + "format": "double", + "readOnly": true, + "example": 3799.52, + "minimum": 0, + "description": "Current available balance" + }, + "nickname": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": "ShipEngine Account - Stamps.com", + "description": "Nickname given to the account when initially setting up the carrier." + }, + "friendly_name": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": "Stamps.com", + "description": "Screen readable name" + }, + "primary": { + "type": "boolean", + "readOnly": true, + "description": "Is this the primary carrier that is used by default when no carrier is specified in label/shipment creation" + }, + "has_multi_package_supporting_services": { + "type": "boolean", + "readOnly": true, + "description": "Carrier supports multiple packages per shipment" + }, + "supports_label_messages": { + "type": "boolean", + "readOnly": true, + "description": "The carrier supports adding custom label messages to an order." + }, + "disabled_by_billing_plan": { + "type": "boolean", + "readOnly": true, + "description": "The carrier is disabled by the current ShipEngine account's billing plan." + }, + "services": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/service" + } + ] + }, + "description": "A list of services that are offered by the carrier" + }, + "packages": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/package_type" + } + ] + }, + "description": "A list of package types that are supported by the carrier" + }, + "options": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/carrier_advanced_option" + } + ] + }, + "description": "A list of options that are available to that carrier" + } + } + }, + "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", + "description": "A service offered by the carrier", + "additionalProperties": false, + "properties": { + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + }, + "carrier_code": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "service_code": { + "type": "string", + "minLength": 1, + "readOnly": true, + "example": "usps_media_mail", + "description": "service code" + }, + "name": { + "type": "string", + "minLength": 1, + "readOnly": true, + "example": "USPS First Class Mail", + "description": "User friendly service name" + }, + "domestic": { + "type": "boolean", + "readOnly": true, + "description": "Supports domestic shipping" + }, + "international": { + "type": "boolean", + "readOnly": true, + "description": "Supports international shipping." + }, + "is_multi_package_supported": { + "type": "boolean", + "readOnly": true, + "description": "Carrier supports multiple packages per shipment" + } + } + }, + "package_type": { + "title": "package_type", + "type": "object", + "description": "A package type that a carrier supports for shipment.", + "required": [ + "name", + "package_code" + ], + "additionalProperties": false, + "properties": { + "package_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the package." + }, + "package_code": { + "allOf": [ + { + "$ref": "#/components/schemas/package_code" + } + ] + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "example": "laptop_box" + }, + "dimensions": { + "allOf": [ + { + "$ref": "#/components/schemas/dimensions" + } + ], + "description": "The custom dimensions for the package." + }, + "description": { + "type": "string", + "maxLength": 500, + "example": "Packaging for laptops", + "nullable": true, + "description": "Provides a helpful description for the custom package." + } + } + }, + "package_code": { + "title": "package_code", + "type": "string", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$", + "example": "small_flat_rate_box", + "description": "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.\n" + }, + "dimensions": { + "title": "dimensions", + "type": "object", + "description": "The dimensions of a package", + "required": [ + "unit", + "length", + "width", + "height" + ], + "additionalProperties": false, + "properties": { + "unit": { + "default": "inch", + "allOf": [ + { + "$ref": "#/components/schemas/dimension_unit" + } + ] + }, + "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" + } + } + }, + "dimension_unit": { + "title": "dimension_unit", + "type": "string", + "enum": [ + "inch", + "centimeter" + ], + "description": "The dimension units that are supported by ShipEngine." + }, + "carrier_advanced_option": { + "title": "carrier_advanced_option", + "type": "object", + "description": "Advanced options that are specific to the carrier", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "minLength": 1, + "readOnly": true, + "example": "contains_alcohol", + "description": "Name of advanced option" + }, + "default_value": { + "type": "string", + "minLength": 1, + "readOnly": true, + "example": false, + "description": "Default value of option" + }, + "description": { + "type": "string", + "minLength": 0, + "readOnly": true, + "description": "Description of option" + } + } + }, + "get_carrier_by_id_response_body": { + "title": "get_carrier_by_id_response_body", + "type": "object", + "description": "A get carrier by id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/carrier" + } + ] + }, + "add_funds_to_carrier_request_body": { + "title": "add_funds_to_carrier_request_body", + "type": "object", + "description": "An add funds to carrier request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ] + }, + "monetary_value": { + "title": "monetary_value", + "type": "object", + "description": "A monetary value, such as the price of a shipping label, the insured value of a package, or an account balance.\n", + "required": [ + "currency", + "amount" + ], + "additionalProperties": false, + "properties": { + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/currency" + } + ] + }, + "amount": { + "type": "number", + "format": "double", + "minimum": 0, + "description": "The monetary amount, in the specified currency." + } + } + }, + "currency": { + "title": "currency", + "type": "string", + "description": "The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html\n" + }, + "add_funds_to_carrier_response_body": { + "title": "add_funds_to_carrier_response_body", + "type": "object", + "description": "The current balance of the requested carrier account", + "required": [ + "balance" + ], + "additionalProperties": false, + "properties": { + "balance": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The current balance of the account" + } + } + }, + "get_carrier_options_response_body": { + "title": "get_carrier_options_response_body", + "type": "object", + "description": "A carrier list options response body", + "additionalProperties": false, + "properties": { + "options": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/carrier_advanced_option" + } + ], + "description": "Carrer options" + }, + "description": "AN array of carrier options" + } + } + }, + "list_carrier_package_types_response_body": { + "title": "list_carrier_package_types_response_body", + "type": "object", + "description": "A list carrier package types response body", + "additionalProperties": false, + "properties": { + "packages": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/package_type" + } + ], + "description": "Custom Package Type items" + }, + "description": "An array of custom package types" + } + } + }, + "list_carrier_services_response_body": { + "title": "list_carrier_services_response_body", + "type": "object", + "description": "A carrier list services response body", + "additionalProperties": false, + "properties": { + "services": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/service" + } + ], + "description": "A carrier service" + }, + "description": "An array of services associated with the carrier" + } + } + }, + "carrier_name": { + "title": "carrier_name", + "type": "string", + "enum": [ + "access_worldwide", + "amazon_buy_shipping", + "amazon_shipping_uk", + "apc", + "asendia", + "australia_post", + "canada_post", + "dhl_ecommerce", + "dhl_express", + "dhl_express_au", + "dhl_express_ca", + "dhl_express_uk", + "dpd", + "endicia", + "fedex", + "fedex_uk", + "firstmile", + "imex", + "newgistics", + "ontrac", + "purolator_canada", + "royal_mail", + "rr_donnelley", + "seko", + "sendle", + "stamps_com", + "ups", + "lasership" + ], + "description": "The shipping carriers that are supported by ShipEngine" + }, + "connect_carrier_request_body": { + "title": "connect_carrier_request_body", + "oneOf": [ + { + "$ref": "#/components/schemas/connect_access_worldwide_request_body" + }, + { + "$ref": "#/components/schemas/connect_amazon_buy_shipping_request_body" + }, + { + "$ref": "#/components/schemas/connect_amazon_shipping_uk" + }, + { + "$ref": "#/components/schemas/connect_apc_request_body" + }, + { + "$ref": "#/components/schemas/connect_asendia_request_body" + }, + { + "$ref": "#/components/schemas/connect_australia_post_request_body" + }, + { + "$ref": "#/components/schemas/connect_canada_post_request_body" + }, + { + "$ref": "#/components/schemas/connect_dhl_ecommerce_request_body" + }, + { + "$ref": "#/components/schemas/connect_dhl_express_request_body" + }, + { + "$ref": "#/components/schemas/connect_dhl_express_au_request_body" + }, + { + "$ref": "#/components/schemas/connect_dhl_express_ca_request_body" + }, + { + "$ref": "#/components/schemas/connect_dhl_express_uk_request_body" + }, + { + "$ref": "#/components/schemas/connect_dpd_request_body" + }, + { + "$ref": "#/components/schemas/connect_endicia_request_body" + }, + { + "$ref": "#/components/schemas/connect_fedex_request_body" + }, + { + "$ref": "#/components/schemas/connect_fedex_uk_request_body" + }, + { + "$ref": "#/components/schemas/connect_firstmile_request_body" + }, + { + "$ref": "#/components/schemas/connect_imex_request_body" + }, + { + "$ref": "#/components/schemas/connect_lasership_request_body" + }, + { + "$ref": "#/components/schemas/connect_newgistics_request_body" + }, + { + "$ref": "#/components/schemas/connect_ontrac_request_body" + }, + { + "$ref": "#/components/schemas/connect_purolator_request_body" + }, + { + "$ref": "#/components/schemas/connect_royal_mail_request_body" + }, + { + "$ref": "#/components/schemas/connect_rr_donnelley_request_body" + }, + { + "$ref": "#/components/schemas/connect_seko_request_body" + }, + { + "$ref": "#/components/schemas/connect_sendle_request_body" + }, + { + "$ref": "#/components/schemas/connect_stamps_request_body" + }, + { + "$ref": "#/components/schemas/connect_ups_request_body" + } + ] + }, + "connect_access_worldwide_request_body": { + "title": "connect_access_worldwide_request_body", + "type": "object", + "description": "An Access Worldwide account information request body", + "required": [ + "nickname", + "username", + "password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "example": "Stamps.com", + "description": "The nickname associated with the carrier connection" + }, + "username": { + "type": "string", + "minLength": 1, + "description": "Access Worldwide Username" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Access Worldwide Password" + } + } + }, + "connect_amazon_buy_shipping_request_body": { + "title": "connect_amazon_buy_shipping_request_body", + "type": "object", + "description": "An Amazon account information request body", + "required": [ + "nickname", + "merchant_seller_id", + "email", + "mws_auth_token" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "example": "Test Amazon Buy Shipping", + "description": "Nickname to be associated with the account connection" + }, + "merchant_seller_id": { + "type": "string", + "minLength": 1 + }, + "mws_auth_token": { + "type": "string", + "minLength": 1 + }, + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/email" + } + ] + } + } + }, + "email": { + "title": "email", + "type": "string", + "format": "email", + "minLength": 1, + "example": "john.doe@example.com", + "description": "An email address." + }, + "connect_amazon_shipping_uk": { + "title": "connect_amazon_shipping_uk", + "type": "object", + "description": "An Amazon Shipping UK account information request body", + "required": [ + "nickname", + "auth_code" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "example": "Stamps.com", + "description": "The nickname associated with the carrier connection" + }, + "auth_code": { + "type": "string", + "minLength": 1, + "description": "Amazon UK Shipping auth code." + } + } + }, + "connect_apc_request_body": { + "title": "connect_apc_request_body", + "type": "object", + "description": "An APC account information request body", + "required": [ + "nickname", + "username", + "password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "example": "APC carrier account", + "description": "The nickname for the APC account" + }, + "username": { + "type": "string", + "minLength": 1, + "example": "john_doe", + "description": "The username for the APC account" + }, + "password": { + "type": "string", + "minLength": 1, + "example": 12345, + "description": "The password for the APC account" + } + } + }, + "connect_asendia_request_body": { + "title": "connect_asendia_request_body", + "type": "object", + "description": "An Asendia account information request body", + "required": [ + "nickname", + "account_number", + "ftp_username", + "ftp_password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "example": "Asendia account", + "description": "The nickname of the Asendia account" + }, + "account_number": { + "type": "string", + "minLength": 1, + "description": "Asendia account number" + }, + "ftp_username": { + "type": "string", + "minLength": 1, + "description": "FTP username" + }, + "ftp_password": { + "type": "string", + "minLength": 1, + "description": "FTP password" + } + } + }, + "connect_australia_post_request_body": { + "title": "connect_australia_post_request_body", + "type": "object", + "description": "An Australia Post account information request body", + "required": [ + "account_number", + "api_key", + "api_secret", + "nickname" + ], + "additionalProperties": false, + "properties": { + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "api_key": { + "type": "string", + "minLength": 1, + "description": "API key" + }, + "api_secret": { + "type": "string", + "minLength": 1, + "description": "API secret" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + } + } + }, + "connect_canada_post_request_body": { + "title": "connect_canada_post_request_body", + "type": "object", + "description": "A Canada Post account information request body", + "required": [ + "nickname", + "api_key", + "api_secret", + "account_number", + "contract_id" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "api_key": { + "type": "string", + "minLength": 1, + "description": "Canada Post Account API Key" + }, + "api_secret": { + "type": "string", + "minLength": 1, + "description": "Canada Post Account API Secret" + }, + "account_number": { + "type": "string", + "minLength": 1, + "description": "Canada Post Account Number" + }, + "contract_id": { + "type": "string", + "minLength": 1, + "description": "Canada Post Account Contract ID" + } + } + }, + "connect_dhl_ecommerce_request_body": { + "title": "connect_dhl_ecommerce_request_body", + "type": "object", + "description": "A DHL Ecommerce account information request body", + "required": [ + "nickname", + "client_id", + "username", + "password", + "pickup_number", + "distribution_center" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "A nickname to help you identify this account" + }, + "client_id": { + "type": "string", + "minLength": 1, + "description": "The client id" + }, + "username": { + "type": "string", + "minLength": 1, + "description": "The account username" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "The account password" + }, + "pickup_number": { + "type": "string", + "minLength": 1, + "description": "The pickup number" + }, + "distribution_center": { + "type": "string", + "minLength": 1, + "description": "The distribution center" + }, + "api_key": { + "type": "string", + "minLength": 1, + "description": "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.\n" + }, + "api_secret": { + "type": "string", + "minLength": 1, + "description": "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.\n" + }, + "ancillary_endorsement": { + "allOf": [ + { + "$ref": "#/components/schemas/ancillary_service_endorsement" + } + ] + }, + "account_number": { + "type": "string", + "minLength": 1, + "deprecated": true, + "description": "Account number" + }, + "ftp_username": { + "type": "string", + "minLength": 1, + "deprecated": true, + "description": "FTP username" + }, + "ftp_password": { + "type": "string", + "minLength": 1, + "deprecated": true, + "description": "FTP password" + }, + "sold_to": { + "type": "string", + "description": "Sold To field" + }, + "registration_id": { + "type": "string" + }, + "software_name": { + "type": "string" + } + } + }, + "ancillary_service_endorsement": { + "title": "ancillary_service_endorsement", + "type": "string", + "enum": [ + "none", + "return_service_requested", + "forwarding_service_requested", + "address_service_requested", + "change_service_requested", + "leave_if_no_response" + ], + "description": "[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.\n\n| Ancillary Service Endorsement | Description\n|--------------------------------|-----------------------------------------------------\n| `none` | No ancillary service is requested. Depending on the carrier servive, the package may be forwarded, returned, or discarded.\n| `return_service_requested` | The package is returned to the sender. If possible, notification of the new address is is included with the returned package.\n| `forwarding_service_requested` | Forward the package to the new address, if possible; otherwise, return it to the sender.\n| `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.\n| `change_service_requested` | The package is discarded. If possible, notification of the new address is sent to the sender.\n| `leave_if_no_response` |\n" + }, + "connect_dhl_express_request_body": { + "title": "connect_dhl_express_request_body", + "type": "object", + "description": "A DHL express account information request body", + "required": [ + "nickname", + "account_number" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "site_id": { + "type": "string", + "minLength": 1, + "description": "Required if password is provided" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Required if site id is provided" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ] + } + } + }, + "connect_dhl_express_au_request_body": { + "title": "connect_dhl_express_au_request_body", + "type": "object", + "description": "A DHL Express AU account information request body", + "required": [ + "nickname", + "account_number" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + } + } + }, + "connect_dhl_express_ca_request_body": { + "title": "connect_dhl_express_ca_request_body", + "type": "object", + "description": "A DHL Express CA account information request body", + "required": [ + "nickname", + "account_number" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + } + } + }, + "connect_dhl_express_uk_request_body": { + "title": "connect_dhl_express_uk_request_body", + "type": "object", + "description": "A DHL Express UK account information request body", + "required": [ + "account_number", + "site_id", + "password", + "nickname" + ], + "additionalProperties": false, + "properties": { + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "site_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the site" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Password" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + } + } + }, + "connect_dpd_request_body": { + "title": "connect_dpd_request_body", + "type": "object", + "description": "A DPD account information request body", + "required": [ + "account_number", + "password", + "nickname" + ], + "additionalProperties": false, + "properties": { + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Password" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + } + } + }, + "connect_endicia_request_body": { + "title": "connect_endicia_request_body", + "type": "object", + "description": "An Endicia account information request body", + "required": [ + "nickname", + "account", + "passphrase" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "account": { + "type": "string", + "minLength": 1, + "description": "Account" + }, + "passphrase": { + "type": "string", + "minLength": 1, + "description": "Passphrase" + } + } + }, + "connect_fedex_request_body": { + "title": "connect_fedex_request_body", + "type": "object", + "description": "A Fedex account information request body", + "required": [ + "account_number", + "address1", + "city", + "country_code", + "email", + "first_name", + "last_name", + "phone", + "postal_code", + "state", + "nickname", + "agree_to_eula" + ], + "additionalProperties": false, + "properties": { + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "address1": { + "type": "string", + "minLength": 1, + "description": "Address" + }, + "address2": { + "type": "string", + "minLength": 1, + "description": "Address" + }, + "city": { + "type": "string", + "minLength": 1, + "description": "The city" + }, + "company": { + "type": "string", + "minLength": 1, + "description": "The company" + }, + "country_code": { + "type": "string", + "minLength": 1, + "description": "Country code" + }, + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/email" + } + ], + "description": "The email address" + }, + "first_name": { + "type": "string", + "minLength": 1, + "description": "First name" + }, + "last_name": { + "type": "string", + "minLength": 1, + "description": "Last name" + }, + "phone": { + "type": "string", + "minLength": 1, + "description": "Phone number" + }, + "postal_code": { + "type": "string", + "minLength": 1, + "description": "Postal Code" + }, + "state": { + "type": "string", + "minLength": 1, + "description": "State" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "agree_to_eula": { + "type": "boolean", + "description": "Boolean signaling agreement to the Fedex End User License Agreement" + }, + "meter_number": { + "type": "string", + "minLength": 1, + "description": "Meter number" + } + } + }, + "connect_fedex_uk_request_body": { + "title": "connect_fedex_uk_request_body", + "type": "object", + "description": "A Fedex UK account information request body", + "required": [ + "account_number", + "address1", + "city", + "country_code", + "email", + "first_name", + "last_name", + "phone", + "postal_code", + "state", + "nickname", + "agree_to_eula" + ], + "additionalProperties": false, + "properties": { + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "address1": { + "type": "string", + "minLength": 1, + "description": "Address" + }, + "address2": { + "type": "string", + "minLength": 1, + "description": "Address" + }, + "city": { + "type": "string", + "minLength": 1, + "description": "The city" + }, + "company": { + "type": "string", + "minLength": 1, + "description": "The company" + }, + "country_code": { + "type": "string", + "minLength": 1, + "description": "Country code" + }, + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/email" + } + ], + "description": "The email address" + }, + "first_name": { + "type": "string", + "minLength": 1, + "description": "First name" + }, + "last_name": { + "type": "string", + "minLength": 1, + "description": "Last name" + }, + "phone": { + "type": "string", + "minLength": 1, + "description": "Phone number" + }, + "postal_code": { + "type": "string", + "minLength": 1, + "description": "Postal Code" + }, + "state": { + "type": "string", + "minLength": 1, + "description": "State" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "agree_to_eula": { + "type": "boolean", + "description": "Boolean signaling agreement to the Fedex End User License Agreement" + }, + "meter_number": { + "type": "string", + "minLength": 1, + "description": "Meter number" + } + } + }, + "connect_firstmile_request_body": { + "title": "connect_firstmile_request_body", + "type": "object", + "description": "A First Mile account information request body", + "required": [ + "nickname", + "mailer_id", + "password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "mailer_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the mailer" + }, + "profile_name": { + "type": "string", + "minLength": 1, + "description": "Profile name" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Password" + } + } + }, + "connect_imex_request_body": { + "title": "connect_imex_request_body", + "type": "object", + "description": "An Imex account information request body", + "required": [ + "nickname", + "username", + "password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "username": { + "type": "string", + "minLength": 1, + "description": "Username" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Password" + } + } + }, + "connect_lasership_request_body": { + "title": "connect_lasership_request_body", + "type": "object", + "description": "A Lasership account information request body", + "required": [ + "nickname", + "web_services_id", + "web_services_key", + "customer_branch", + "Address", + "PostalCode", + "City", + "State", + "lasership_critical_pull_time", + "lasership_critical_entry_time" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "web_services_id": { + "type": "string", + "minLength": 1, + "description": "Web Service ID (WSID)" + }, + "web_services_key": { + "type": "string", + "minLength": 1, + "description": "Web Service Key (WSKey)" + }, + "customer_branch": { + "type": "string", + "minLength": 1, + "description": "Customer Branch" + }, + "Address": { + "type": "string,", + "description": "Address" + }, + "Address2": { + "type": "string,", + "description": "Address2" + }, + "PostalCode": { + "type": "string,", + "description": "PostalCode" + }, + "City": { + "type": "string,", + "description": "City" + }, + "State": { + "type": "string,", + "description": "State" + }, + "country": { + "type": "string,", + "description": "Country" + }, + "Phone": { + "type": "string,", + "description": "Phone" + }, + "Email": { + "type": "string,", + "description": "Email" + }, + "instructions": { + "type": "string,", + "description": "Instructions" + }, + "facility_code": { + "type": "string,", + "description": "Facility Code" + }, + "lasership_critical_pull_time": { + "type": "string,", + "description": "Critical Pull Time (local time)" + }, + "lasership_critical_entry_time": { + "type": "string,", + "description": "Critical Entry Time (local time)" + }, + "declare_piece_attributes_separately_for_every_shipment": { + "type": "boolean,", + "description": "Declare piece attributes separately for every shipment, overrides individual attribute below.", + "default": false + }, + "AttrAlcohol": { + "type": "boolean,", + "description": "Set this to true if your shipments will always contain Alcohol" + }, + "AttrDryIce": { + "type": "boolean,", + "description": "Set this to true if your shipments will always contain DryIce" + }, + "AttrHazmat": { + "type": "boolean,", + "description": "Set this to true if your shipments will always contain Hazmat" + }, + "AttrTwoPersons": { + "type": "boolean,", + "description": "Set this to true if your shipments will always require Two Persons" + }, + "AttrExplosive": { + "type": "boolean,", + "description": "Set this to true if your shipments will always contain Explosives" + }, + "AttrControlledSubstance": { + "type": "boolean,", + "description": "Set this to true if your shipments will always contain Controlled Substances" + }, + "AttrRefrigerated": { + "type": "boolean,", + "description": "Set this to true if your shipments will always require Refrigeration" + }, + "AttrPerishable": { + "type": "boolean,", + "description": "Set this to true if your shipments will always be Perishable" + }, + "AttrNoRTS": { + "type": "boolean,", + "description": "Set this to true if your shipments will always use \"No Return To Sender\"" + } + } + }, + "connect_newgistics_request_body": { + "title": "connect_newgistics_request_body", + "type": "object", + "description": "A Newgistics account information request body", + "required": [ + "induction_site", + "nickname" + ], + "additionalProperties": false, + "properties": { + "merchant_id": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Merchant id" + }, + "mailer_id": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Mailer id" + }, + "induction_site": { + "type": "string", + "minLength": 1, + "description": "Induction site" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + } + } + }, + "connect_ontrac_request_body": { + "title": "connect_ontrac_request_body", + "type": "object", + "description": "An Ontrac account information request body", + "required": [ + "nickname", + "account_number", + "password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Password" + } + } + }, + "connect_purolator_request_body": { + "title": "connect_purolator_request_body", + "type": "object", + "description": "A Purolator account information request body", + "required": [ + "account_number", + "activation_key", + "nickname" + ], + "additionalProperties": false, + "properties": { + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "activation_key": { + "type": "string", + "minLength": 1, + "description": "Activation key" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + } + } + }, + "connect_royal_mail_request_body": { + "title": "connect_royal_mail_request_body", + "type": "object", + "description": "A Royal Mail account information request body", + "required": [ + "account_number", + "contact_name", + "city", + "postal_code", + "nickname" + ], + "additionalProperties": false, + "properties": { + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + }, + "oba_email": { + "allOf": [ + { + "$ref": "#/components/schemas/email" + } + ], + "description": "The oba email address" + }, + "contact_name": { + "type": "string", + "minLength": 1, + "description": "Contact name" + }, + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/email" + } + ], + "description": "The email address" + }, + "company_name": { + "type": "string", + "minLength": 1, + "description": "Company name" + }, + "street_line1": { + "type": "string", + "minLength": 1, + "description": "Street line1" + }, + "street_line2": { + "type": "string", + "minLength": 1, + "description": "Street line2" + }, + "street_line3": { + "type": "string", + "minLength": 1, + "description": "Street line3" + }, + "city": { + "type": "string", + "minLength": 1, + "description": "City" + }, + "postal_code": { + "type": "string", + "minLength": 1, + "description": "Postal code" + }, + "phone": { + "type": "string", + "minLength": 1, + "description": "Phone" + }, + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + } + } + }, + "connect_rr_donnelley_request_body": { + "title": "connect_rr_donnelley_request_body", + "type": "object", + "description": "A RR Donnelley account information request body", + "required": [ + "nickname", + "username", + "password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "username": { + "type": "string", + "minLength": 1, + "description": "Username" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Password" + } + } + }, + "connect_seko_request_body": { + "title": "connect_seko_request_body", + "type": "object", + "description": "A SEKO account information request body", + "required": [ + "nickname", + "access_key" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "access_key": { + "type": "string", + "minLength": 1, + "description": "Seko Account Access Key" + } + } + }, + "connect_sendle_request_body": { + "title": "connect_sendle_request_body", + "type": "object", + "description": "A Sendle account information request body", + "required": [ + "nickname", + "sendle_id", + "api_key" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "sendle_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the sendle" + }, + "api_key": { + "type": "string", + "minLength": 1, + "description": "API key" + } + } + }, + "connect_stamps_request_body": { + "title": "connect_stamps_request_body", + "type": "object", + "description": "A Stamps account information request body", + "required": [ + "nickname", + "username", + "password" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "username": { + "type": "string", + "minLength": 1, + "description": "Username" + }, + "password": { + "type": "string", + "minLength": 1, + "description": "Password" + } + } + }, + "connect_ups_request_body": { + "title": "connect_ups_request_body", + "type": "object", + "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" + ], + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Nickname" + }, + "account_number": { + "type": "string", + "minLength": 1, + "description": "Account number" + } + } + }, + "connect_carrier_response_body": { + "title": "connect_carrier_response_body", + "type": "object", + "description": "A connect account response body", + "required": [ + "carrier_id" + ], + "additionalProperties": false, + "properties": { + "carrier_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + } + } + }, + "carrier_name_with_settings": { + "title": "carrier_name_with_settings", + "type": "string", + "enum": [ + "dhl_express", + "fedex", + "newgistics", + "ups" + ], + "description": "The shipping carriers for which ShipEngine supports carrier settings" + }, + "get_carrier_settings_response_body": { + "title": "get_carrier_settings_response_body", + "oneOf": [ + { + "$ref": "#/components/schemas/dhl_express_settings_response_body" + }, + { + "$ref": "#/components/schemas/fedex_settings_response_body" + }, + { + "$ref": "#/components/schemas/ups_settings_response_body" + } + ] + }, + "dhl_express_settings_response_body": { + "title": "dhl_express_settings_response_body", + "type": "object", + "description": "A DHL Express response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/dhl_express_account_settings" + } + ] + }, + "dhl_express_account_settings": { + "title": "dhl_express_account_settings", + "type": "object", + "description": "A DHL Express account settings", + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Account nickname" + }, + "should_hide_account_number_on_archive_doc": { + "type": "boolean", + "description": "Indicates if the account number should be hidden on the archive documentation" + }, + "is_primary_account": { + "type": "boolean", + "description": "Indicates if this is primary account" + } + } + }, + "fedex_settings_response_body": { + "title": "fedex_settings_response_body", + "type": "object", + "description": "A Fedex settings response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/fedex_account_settings_request_body" + } + ] + }, + "fedex_account_settings_request_body": { + "title": "fedex_account_settings_request_body", + "type": "object", + "description": "A Fedex account settings request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/fedex_account_settings" + } + ] + }, + "fedex_account_settings": { + "title": "fedex_account_settings", + "type": "object", + "description": "A Fedex account settings request body", + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "Account nickname" + }, + "pickup_type": { + "allOf": [ + { + "$ref": "#/components/schemas/fedex_pickup_type" + } + ] + }, + "smart_post_hub": { + "allOf": [ + { + "$ref": "#/components/schemas/smart_post_hub" + } + ] + }, + "smart_post_endorsement": { + "allOf": [ + { + "$ref": "#/components/schemas/ancillary_service_endorsement" + } + ] + }, + "is_primary_account": { + "type": "boolean" + }, + "signature_image": { + "type": "string" + }, + "letterhead_image": { + "type": "string" + } + } + }, + "fedex_pickup_type": { + "title": "fedex_pickup_type", + "type": "string", + "enum": [ + "none", + "regular_pickup", + "request_courier", + "drop_box", + "business_service_center", + "station" + ], + "description": "Tax identifier type for customs declaration\n\n|Pickup Type |Description\n|--------------------------|-----------------------------------------\n|`none` | Not specified\n|`regular_pickup` | You already have a daily pickup scheduled with FedEx\n|`request_courier` | You will call FedEx to request a courier\n|`drop_box` | You will drop-off packages in a FedEx drop box\n|`business_service_center` | You will drop-off packages at an authorized FedEx business service center\n|`station` | You will drop-off the package at a FedEx Station\n" + }, + "smart_post_hub": { + "title": "smart_post_hub", + "type": "string", + "enum": [ + "none", + "allentown_pa", + "atlanta_ga", + "baltimore_md", + "charlotte_nc", + "chino_ca", + "dallas_tx", + "denver_co", + "detroit_mi", + "edison_nj", + "grove_city_oh", + "groveport_oh", + "houston_tx", + "indianapolis_in", + "kansas_city_ks", + "los_angeles_ca", + "martinsburg_wv", + "memphis_tn", + "minneapolis_mn", + "new_berlin_wi", + "northborough_ma", + "orlando_fl", + "phoneix_az", + "pittsburgh_pa", + "reno_nv", + "sacramento_ca", + "salt_lake_city_ut", + "seattle_wa", + "st_louis_mo", + "windsor_ct", + "newark_ny", + "south_brunswick_nj", + "scranton_pa", + "wheeling_il" + ], + "description": "The possible smart post hub values" + }, + "ups_settings_response_body": { + "title": "ups_settings_response_body", + "type": "object", + "description": "A UPS settings response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/ups_account_settings" + } + ] + }, + "ups_account_settings": { + "title": "ups_account_settings", + "type": "object", + "description": "UPS account settings", + "additionalProperties": false, + "properties": { + "nickname": { + "type": "string", + "minLength": 1, + "description": "nickname" + }, + "is_primary_account": { + "type": "boolean", + "description": "Indicates if this is the primary UPS account" + }, + "pickup_type": { + "allOf": [ + { + "$ref": "#/components/schemas/ups_pickup_type" + } + ] + }, + "use_carbon_neutral_shipping_program": { + "type": "boolean", + "description": "The use carbon neutral shipping program" + }, + "use_ground_freight_pricing": { + "type": "boolean", + "description": "The use ground freight pricing" + }, + "use_consolidation_services": { + "type": "boolean", + "description": "The use consolidation services" + }, + "use_order_number_on_mail_innovations_labels": { + "type": "boolean", + "description": "The use order number on mail innovations labels" + }, + "mail_innovations_endorsement": { + "allOf": [ + { + "$ref": "#/components/schemas/ancillary_service_endorsement" + } + ] + }, + "mail_innovations_cost_center": { + "type": "string", + "minLength": 0, + "description": "mail innovations cost center" + }, + "use_negotiated_rates": { + "type": "boolean", + "description": "The use negotiated rates" + }, + "account_postal_code": { + "type": "string", + "minLength": 5, + "description": "account postal code" + }, + "invoice": { + "allOf": [ + { + "$ref": "#/components/schemas/ups_invoice" + } + ], + "description": "The invoice" + } + } + }, + "ups_pickup_type": { + "title": "ups_pickup_type", + "type": "string", + "enum": [ + "daily_pickup", + "occasional_pickup", + "customer_counter" + ], + "description": "The possible ups pickup type values" + }, + "ups_invoice": { + "title": "ups_invoice", + "type": "object", + "description": "UPS invoice", + "additionalProperties": false, + "properties": { + "invoice_date": { + "type": "string", + "format": "date-time", + "minLength": 1, + "description": "invoice date" + }, + "invoice_number": { + "type": "string", + "minLength": 1, + "description": "invoice number" + }, + "control_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the control" + }, + "invoice_amount": { + "type": "number", + "format": "double", + "minimum": 0 + }, + "invoice_currency_code": { + "type": "string" + } + } + }, + "update_carrier_settings_request_body": { + "title": "update_carrier_settings_request_body", + "oneOf": [ + { + "$ref": "#/components/schemas/update_dhl_express_settings_request_body" + }, + { + "$ref": "#/components/schemas/update_fedex_settings_request_body" + }, + { + "$ref": "#/components/schemas/update_newgistics_settings_request_body" + }, + { + "$ref": "#/components/schemas/update_ups_settings_request_body" + }, + { + "$ref": "#/components/schemas/update_amazon_buy_shipping_request_body" + } + ] + }, + "update_dhl_express_settings_request_body": { + "title": "update_dhl_express_settings_request_body", + "type": "object", + "description": "An update dhl express settings request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/dhl_express_account_settings" + } + ] + }, + "update_fedex_settings_request_body": { + "title": "update_fedex_settings_request_body", + "type": "object", + "description": "An update Fedex settings request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/fedex_account_settings" + } + ] + }, + "update_newgistics_settings_request_body": { + "title": "update_newgistics_settings_request_body", + "type": "object", + "description": "A newgistics account settings request body", + "additionalProperties": false, + "properties": { + "include_barcode_with_order_number": { + "type": "boolean" + }, + "receive_email_on_manifest_processing": { + "type": "boolean" + } + } + }, + "update_ups_settings_request_body": { + "title": "update_ups_settings_request_body", + "type": "object", + "description": "An update UPS settings request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/ups_account_settings" + } + ] + }, + "update_amazon_buy_shipping_request_body": { + "title": "update_amazon_buy_shipping_request_body", + "type": "object", + "description": "An amazon buy shipping account settings request body", + "additionalProperties": false, + "properties": { + "email": { + "type": "string", + "minLength": 1, + "description": "Email" + } + } + }, + "disconnect_insurer_response_body": { + "title": "disconnect_insurer_response_body", + "type": "object" + }, + "connect_insurer_request_body": { + "title": "connect_insurer_request_body", + "type": "object", + "description": "A create shipsurance connection request body", + "required": [ + "email", + "policy_id" + ], + "additionalProperties": false, + "properties": { + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/email" + } + ] + }, + "policy_id": { + "type": "string", + "minLength": 1 + } + } + }, + "connect_insurer_response_body": { + "title": "connect_insurer_response_body", + "type": "object" + }, + "download_file_pdf_response_body": { + "title": "download_file_pdf_response_body", + "type": "string", + "format": "binary" + }, + "download_file_png_response_body": { + "title": "download_file_png_response_body", + "type": "string", + "format": "binary" + }, + "download_file_zpl_response_body": { + "title": "download_file_zpl_response_body", + "type": "string", + "format": "binary" + }, + "list_webhooks_response_body": { + "title": "list_webhooks_response_body", + "type": "array", + "description": "A webhook list response body", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/webhook" + } + ], + "description": "The webhook list response body" + } + }, + "webhook": { + "title": "webhook", + "type": "object", + "description": "A webhook", + "additionalProperties": false, + "properties": { + "webhook_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the webhook" + }, + "url": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "example": "https://[YOUR ENDPOINT ID].x.requestbin.com", + "description": "The url that the webhook sends the request to" + }, + "event": { + "allOf": [ + { + "$ref": "#/components/schemas/webhook_event" + } + ] + }, + "headers": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/webhook_header" + } + ] + }, + "description": "Array of custom webhook headers" + } + } + }, + "webhook_event": { + "title": "webhook_event", + "type": "string", + "enum": [ + "batch", + "carrier_connected", + "order_source_refresh_complete", + "rate", + "report_complete", + "sales_orders_imported", + "track" + ], + "description": "The possible webook event values" + }, + "webhook_header": { + "title": "webhook_header", + "type": "object", + "description": "Optional header to be specified in webhook", + "properties": { + "key": { + "$ref": "#/components/schemas/key" + }, + "value": { + "$ref": "#/components/schemas/value" + } + }, + "required": [ + "key", + "value" + ] + }, + "key": { + "title": "key", + "type": "string", + "min_length": 1, + "description": "Key/name of a header", + "example": "custom-key" + }, + "value": { + "title": "value", + "type": "string", + "description": "Value of a header", + "example": "custom-value" + }, + "create_webhook_request_body": { + "title": "create_webhook_request_body", + "type": "object", + "description": "A create webhook request body", + "required": [ + "event", + "url" + ], + "additionalProperties": false, + "properties": { + "event": { + "allOf": [ + { + "$ref": "#/components/schemas/webhook_event" + } + ] + }, + "url": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "example": "https://[YOUR ENDPOINT ID].x.requestbin.com", + "description": "The url that the webhook sends the request to" + }, + "headers": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/webhook_header" + } + ] + }, + "description": "Array of custom webhook headers" + } + } + }, + "create_webhook_response_body": { + "title": "create_webhook_response_body", + "type": "object", + "description": "A webhook response body", + "additionalProperties": false, + "required": [ + "webhook_id", + "url", + "event" + ], + "allOf": [ + { + "$ref": "#/components/schemas/webhook" + } + ] + }, + "get_webhook_by_id_response_body": { + "title": "get_webhook_by_id_response_body", + "type": "object", + "description": "A get webhook id response body", + "additionalProperties": false, + "required": [ + "webhook_id", + "url", + "event" + ], + "allOf": [ + { + "$ref": "#/components/schemas/webhook" + } + ] + }, + "update_webhook_request_body": { + "title": "update_webhook_request_body", + "type": "object", + "description": "An update webhook request body", + "additionalProperties": false, + "properties": { + "url": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "example": "https://[YOUR ENDPOINT ID].x.requestbin.com", + "description": "The url that the wehbook sends the request" + }, + "headers": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/webhook_header" + } + ] + }, + "description": "Array of custom webhook headers" + } + } + }, + "add_funds_to_insurance_request_body": { + "title": "add_funds_to_insurance_request_body", + "type": "object", + "description": "An add funds to insurance request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ] + }, + "add_funds_to_insurance_response_body": { + "title": "add_funds_to_insurance_response_body", + "type": "object", + "description": "Add funds to insurance response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ] + }, + "get_insurance_balance_response_body": { + "title": "get_insurance_balance_response_body", + "type": "object", + "description": "A get insurance balance response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ] + }, + "label_status": { + "title": "label_status", + "type": "string", + "enum": [ + "processing", + "completed", + "error", + "voided" + ], + "description": "The possible statuses that a [shipping label](https://www.shipengine.com/docs/labels/create-a-label/) can be in.\n\n|Status |Description\n|:------------|:-----------------------------------------------------\n|`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.\n|`completed` |The label was successfully created\n|`error` |The label could not be created due to an error, such as an invalid delivery address\n|`voided` |The label has been [voided](https://www.shipengine.com/docs/labels/voiding/)\n" + }, + "service_code": { + "title": "service_code", + "type": "string", + "pattern": "^[a-z0-9]+(_[a-z0-9-]+)* ?$", + "example": "usps_first_class_mail", + "description": "A [carrier service](https://www.shipengine.com/docs/shipping/use-a-carrier-service/), such as `fedex_ground`, `usps_first_class_mail`, `flat_rate_envelope`, etc.\n" + }, + "list_labels_response_body": { + "title": "list_labels_response_body", + "type": "object", + "description": "A list label response body", + "required": [ + "labels" + ], + "additionalProperties": false, + "properties": { + "labels": { + "type": "array", + "minItems": 0, + "description": "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`.\n", + "items": { + "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) 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" + }, + "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/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" + } + } + } + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/paged_list_response_body" + } + ] + }, + "create_label_request_body": { + "title": "create_label_request_body", + "type": "object", + "description": "A purchase label request body", + "required": [ + "shipment" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/label" + } + ], + "properties": { + "ship_to_service_point_id": { + "nullable": true, + "type": "string", + "description": "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.", + "example": "614940" + }, + "ship_from_service_point_id": { + "nullable": true, + "type": "string", + "description": "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.", + "example": "614940" + } + } + }, + "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) 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" + }, + "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/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) 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" + }, + "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_item": { + "title": "shipment_item", + "type": "object", + "description": "A shipment item", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "minLength": 0, + "description": "item name" + }, + "sales_order_id": { + "type": "string", + "nullable": true, + "description": "sales order id" + }, + "sales_order_item_id": { + "type": "string", + "nullable": true, + "description": "sales order item id" + }, + "quantity": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "The quantity of this item included in the shipment" + }, + "sku": { + "type": "string", + "nullable": true, + "description": "Item Stock Keeping Unit" + }, + "external_order_id": { + "type": "string", + "nullable": true, + "description": "external order id" + }, + "external_order_item_id": { + "type": "string", + "nullable": true, + "description": "external order item id" + }, + "asin": { + "type": "string", + "nullable": true, + "minLength": 10, + "maxLength": 10, + "example": "B00005N5PF", + "description": "Amazon Standard Identification Number" + }, + "order_source_code": { + "allOf": [ + { + "$ref": "#/components/schemas/order_source_name" + } + ] + } + } + }, + "order_source_name": { + "title": "order_source_name", + "type": "string", + "enum": [ + "amazon_ca", + "amazon_us", + "brightpearl", + "channel_advisor", + "cratejoy", + "ebay", + "etsy", + "jane", + "groupon_goods", + "magento", + "paypal", + "seller_active", + "shopify", + "stitch_labs", + "squarespace", + "three_dcart", + "tophatter", + "walmart", + "woo_commerce", + "volusion" + ], + "description": "The order sources that are supported by ShipEngine" + }, + "tax_identifier": { + "title": "tax_identifier", + "type": "object", + "description": "A tax identifier object", + "additionalProperties": false, + "required": [ + "taxable_entity_type", + "identifier_type", + "issuing_authority", + "value" + ], + "properties": { + "taxable_entity_type": { + "allOf": [ + { + "$ref": "#/components/schemas/taxable_entity_type" + } + ] + }, + "identifier_type": { + "allOf": [ + { + "$ref": "#/components/schemas/identifier_type" + } + ] + }, + "issuing_authority": { + "type": "string", + "description": "The authority that issued this tax. This must be a valid 2 character ISO 3166 Alpha 2 country code." + }, + "value": { + "type": "string", + "description": "The value of the identifier" + } + } + }, + "taxable_entity_type": { + "title": "taxable_entity_type", + "type": "string", + "enum": [ + "shipper", + "recipient", + "ior" + ], + "description": "The taxable entity type for this tax item. Valid values include the following\n\n|Value |Description\n|:--------- |:-----------------------------------------------------\n|`shipper` | The shipper is responsible for this tax.\n|`recipient` | The recipient of the shipment is responsible for this tax.\n|`ior` | The importer of records is responsible for tax.\n" + }, + "identifier_type": { + "title": "identifier_type", + "type": "string", + "enum": [ + "vat", + "eori", + "ssn", + "ein", + "tin", + "ioss", + "pan", + "voec", + "pccc", + "oss", + "passport", + "abn" + ], + "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" + }, + "date": { + "title": "date", + "type": "string", + "format": "date-time", + "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[-+]\\d{2}:\\d{2}))?$", + "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", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "$ref": "#/components/schemas/partial_shipping_address_to" + } + ] + }, + "partial_shipping_address_to": { + "title": "partial_shipping_address_to", + "type": "object", + "description": "A complete or partial mailing address.", + "additionalProperties": false, + "properties": { + "instructions": { + "type": "string", + "minLength": 1, + "nullable": true, + "description": "Additional text about how to handle the shipment at this address.\n" + }, + "geolocation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "example": "what3words", + "description": "Enum of available type of geolocation items:\n - '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.\n", + "enum": [ + "what3words" + ] + }, + "value": { + "type": "string", + "example": "cats.with.thumbs", + "description": "value of the geolocation item" + } + } + } + } + } + }, + "shipping_address": { + "title": "shipping_address", + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/address" + }, + { + "$ref": "#/components/schemas/partial_shipping_address" + } + ] + }, + "partial_shipping_address": { + "title": "partial_shipping_address", + "type": "object", + "description": "A complete or partial mailing address.", + "additionalProperties": false, + "properties": { + "instructions": { + "type": "string", + "minLength": 1, + "nullable": true, + "description": "Additional text about how to handle the shipment at this address.\n" + } + } + }, + "delivery_confirmation": { + "title": "delivery_confirmation", + "type": "string", + "enum": [ + "none", + "delivery", + "signature", + "adult_signature", + "direct_signature", + "delivery_mailed", + "verbal_confirmation" + ], + "description": "The possible delivery confirmation values" + }, + "international_shipment_options": { + "title": "international_shipment_options", + "type": "object", + "description": "Options for international shipments, such as customs declarations.", + "required": [ + "contents", + "non_delivery" + ], + "additionalProperties": false, + "properties": { + "contents": { + "default": "merchandise", + "allOf": [ + { + "$ref": "#/components/schemas/package_contents" + } + ], + "description": "The type of contents in this shipment. This may impact import duties or customs treatment." + }, + "contents_explanation": { + "type": "string", + "description": "Explanation for contents (required if the `contents` is provided as `other`)" + }, + "non_delivery": { + "default": "return_to_sender", + "allOf": [ + { + "$ref": "#/components/schemas/non_delivery" + } + ], + "description": "Indicates what to do if a package is unable to be delivered." + }, + "terms_of_trade_code": { + "type": "string", + "description": "Specifies the supported terms of trade code (incoterms)", + "allOf": [ + { + "$ref": "#/components/schemas/Allowed%20incoterms" + } + ] + }, + "declaration": { + "type": "string", + "description": "Declaration statement to be placed on the commercial invoice" + }, + "invoice_additional_details": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/invoice_additional_details" + } + ] + }, + "importer_of_record": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/importer_of_records" + } + ] + }, + "customs_items": { + "deprecated": true, + "type": "array", + "default": [], + "minItems": 0, + "description": "Customs declarations for each item in the shipment. (Please provide this information under `products` inside `packages`)", + "items": { + "$ref": "#/components/schemas/customs_item" + } + } + } + }, + "package_contents": { + "title": "package_contents", + "type": "string", + "enum": [ + "merchandise", + "documents", + "gift", + "returned_goods", + "sample", + "other" + ], + "description": "The possible package contents values" + }, + "non_delivery": { + "title": "non_delivery", + "type": "string", + "enum": [ + "return_to_sender", + "treat_as_abandoned" + ], + "description": "The possible non delivery values" + }, + "Allowed incoterms": { + "title": "Allowed incoterms", + "type": "string", + "enum": [ + "exw", + "fca", + "cpt", + "cip", + "dpu", + "dap", + "ddp", + "fas", + "fob", + "cfr", + "cif", + "ddu", + "daf", + "deq", + "des" + ] + }, + "invoice_additional_details": { + "title": "invoice_additional_details", + "type": "object", + "description": "The additional information to put on commercial invoice \n", + "properties": { + "freight_charge": { + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Freight Charge for shipment." + }, + "insurance_charge": { + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Insurance Charge for shipment." + }, + "discount": { + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Discount for shipment." + }, + "other_charge": { + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Other charge for shipment." + }, + "other_charge_description": { + "type": "string", + "description": "Description for the other charge (if provided)." + } + } + }, + "importer_of_records": { + "title": "importer_of_records", + "type": "object", + "description": "importer of records address, anywhere in the world.\n", + "required": [ + "name", + "address_line1", + "city_locality", + "postal_code", + "country_code" + ], + "properties": { + "name": { + "type": "string", + "minLength": 1, + "example": "John Doe", + "description": "The name of a contact person at this address. Either `name` or the `company_name` field should always be set.\n" + }, + "phone": { + "type": "string", + "minLength": 1, + "example": "+1 204-253-9411 ext. 123", + "description": "The phone number of a contact person at this address. The format of this phone number varies depending on the country.\n" + }, + "email": { + "type": "string", + "nullable": true, + "example": "example@example.com", + "description": "Email for the address owner.\n" + }, + "company_name": { + "type": "string", + "minLength": 1, + "nullable": true, + "example": "The Home Depot", + "description": "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.\n" + }, + "address_line1": { + "type": "string", + "minLength": 1, + "example": "1999 Bishop Grandin Blvd.", + "description": "The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.\n" + }, + "address_line2": { + "type": "string", + "minLength": 1, + "nullable": true, + "example": "Unit 408", + "description": "The second line of the street address. For some addresses, this line may not be needed.\n" + }, + "address_line3": { + "type": "string", + "minLength": 1, + "nullable": true, + "example": "Building #7", + "description": "The third line of the street address. For some addresses, this line may not be needed.\n" + }, + "city_locality": { + "type": "string", + "minLength": 1, + "example": "Winnipeg", + "description": "The name of the city or locality" + }, + "state_province": { + "type": "string", + "minLength": 1, + "example": "Manitoba", + "description": "The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.\n" + }, + "postal_code": { + "allOf": [ + { + "$ref": "#/components/schemas/postal_code" + } + ] + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ], + "description": "The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1)\n" + } + } + }, + "customs_item": { + "title": "customs_item", + "type": "object", + "description": "The customs declaration for a single item in the shipment.", + "required": [ + "customs_item_id" + ], + "additionalProperties": false, + "properties": { + "customs_item_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the customs item" + }, + "description": { + "type": "string", + "nullable": true, + "maxLength": 100, + "default": null, + "description": "A description of the item" + }, + "quantity": { + "type": "integer", + "format": "int32", + "minimum": 0, + "default": 0, + "description": "The quantity of this item in the shipment." + }, + "value": { + "type": "number", + "format": "double", + "minimum": 0, + "description": "The monetary amount, in the specified currency." + }, + "value_currency": { + "type": "string", + "description": "The currencies that are supported by ShipEngine are the ones that specified by ISO 4217: https://www.iso.org/iso-4217-currency-codes.html\n" + }, + "weight": { + "allOf": [ + { + "$ref": "#/components/schemas/weight" + } + ], + "description": "The item weight" + }, + "harmonized_tariff_code": { + "type": "string", + "nullable": true, + "default": null, + "example": 3926.1, + "description": "The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item." + }, + "country_of_origin": { + "nullable": true, + "default": null, + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ], + "description": "The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated\n" + }, + "unit_of_measure": { + "type": "string", + "nullable": true + }, + "sku": { + "type": "string", + "description": "The SKU (Stock Keeping Unit) of the customs item", + "nullable": true + }, + "sku_description": { + "type": "string", + "description": "Description of the Custom Item's SKU", + "nullable": true + } + } + }, + "weight": { + "title": "weight", + "type": "object", + "description": "The weight of a package", + "required": [ + "value", + "unit" + ], + "additionalProperties": false, + "properties": { + "value": { + "type": "number", + "format": "double", + "minimum": 0, + "exclusiveMinimum": true, + "description": "The weight, in the specified unit" + }, + "unit": { + "allOf": [ + { + "$ref": "#/components/schemas/weight_unit" + } + ] + } + } + }, + "weight_unit": { + "title": "weight_unit", + "type": "string", + "enum": [ + "pound", + "ounce", + "gram", + "kilogram" + ], + "description": "The possible weight unit values" + }, + "advanced_shipment_options": { + "title": "advanced_shipment_options", + "type": "object", + "description": "Advanced shipment options", + "additionalProperties": false, + "properties": { + "bill_to_account": { + "type": "string", + "nullable": true, + "default": null, + "description": "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.\n" + }, + "bill_to_country_code": { + "nullable": true, + "default": null, + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ], + "description": "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.\n" + }, + "bill_to_party": { + "nullable": true, + "default": null, + "allOf": [ + { + "$ref": "#/components/schemas/bill_to_party" + } + ], + "description": "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.\n" + }, + "bill_to_postal_code": { + "type": "string", + "nullable": true, + "default": null, + "description": "The postal code of the third-party that is responsible for shipping costs.\n" + }, + "contains_alcohol": { + "type": "boolean", + "default": false, + "description": "Indicates that the shipment contains alcohol." + }, + "delivered_duty_paid": { + "type": "boolean", + "default": false, + "description": "Indicates that the shipper is paying the international delivery duties for this shipment. This option is supported by UPS, FedEx, and DHL Express.\n" + }, + "dry_ice": { + "type": "boolean", + "default": false, + "description": "Indicates if the shipment contain dry ice" + }, + "dry_ice_weight": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/weight" + } + ], + "description": "The weight of the dry ice in the shipment" + }, + "non_machinable": { + "type": "boolean", + "default": false, + "description": "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.\n" + }, + "saturday_delivery": { + "type": "boolean", + "default": false, + "description": "Enables Saturday delivery, if supported by the carrier." + }, + "fedex_freight": { + "type": "object", + "description": "Provide details for the Fedex freight service", + "properties": { + "shipper_load_and_count": { + "type": "string" + }, + "booking_confirmation": { + "type": "string" + } + } + }, + "use_ups_ground_freight_pricing": { + "type": "boolean", + "nullable": true, + "default": null, + "description": "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.\n" + }, + "freight_class": { + "type": "string", + "nullable": true, + "default": null, + "example": 77.5, + "description": "The National Motor Freight Traffic Association [freight class](http://www.nmfta.org/pages/nmfc?AspxAutoDetectCookieSupport=1), such as \"77.5\", \"110\", or \"250\".\n" + }, + "custom_field1": { + "type": "string", + "nullable": true, + "default": null, + "maxLength": 100, + "description": "An arbitrary field that can be used to store information about the shipment.\n" + }, + "custom_field2": { + "type": "string", + "nullable": true, + "default": null, + "maxLength": 100, + "description": "An arbitrary field that can be used to store information about the shipment.\n" + }, + "custom_field3": { + "type": "string", + "nullable": true, + "default": null, + "maxLength": 100, + "description": "An arbitrary field that can be used to store information about the shipment.\n" + }, + "origin_type": { + "nullable": true, + "default": null, + "allOf": [ + { + "$ref": "#/components/schemas/origin_type" + } + ] + }, + "additional_handling": { + "type": "boolean", + "nullable": true, + "default": null, + "description": "Indicate to the carrier that this shipment requires additional handling.\n" + }, + "shipper_release": { + "type": "boolean", + "nullable": true, + "default": null + }, + "collect_on_delivery": { + "$ref": "#/components/schemas/collect_on_delivery" + }, + "third_party_consignee": { + "type": "boolean", + "default": false, + "description": "Third Party Consignee option is a value-added service that allows the shipper to supply goods without commercial invoices being attached" + }, + "dangerous_goods": { + "type": "boolean", + "default": false, + "description": "Indicates if the Dangerous goods are present in the shipment" + }, + "dangerous_goods_contact": { + "type": "object", + "description": "Contact information for Dangerous goods", + "properties": { + "name": { + "type": "string", + "description": "Name of the contact" + }, + "phone": { + "type": "string", + "description": "Phone number of the contact" + } + } + } + } + }, + "bill_to_party": { + "title": "bill_to_party", + "type": "string", + "enum": [ + "recipient", + "third_party" + ], + "description": "The possible bill to party values" + }, + "origin_type": { + "title": "origin_type", + "type": "string", + "enum": [ + "pickup", + "drop_off" + ], + "description": "Indicates if the package will be picked up or dropped off by the carrier" + }, + "collect_on_delivery": { + "title": "collect_on_delivery", + "type": "object", + "description": "Defer payment until package is delivered, instead of when it is ordered.", + "properties": { + "payment_type": { + "allOf": [ + { + "$ref": "#/components/schemas/collect_on_delivery_payment_type" + } + ] + }, + "payment_amount": { + "$ref": "#/components/schemas/payment_amount" + } + } + }, + "collect_on_delivery_payment_type": { + "title": "collect_on_delivery_payment_type", + "type": "string", + "enum": [ + "any", + "cash", + "cash_equivalent", + "none" + ], + "description": "Types of payment that are supported" + }, + "payment_amount": { + "title": "payment_amount", + "type": "object", + "properties": { + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/currency" + } + ] + }, + "amount": { + "minimum": 0, + "format": "double", + "type": "number" + } + } + }, + "insurance_provider": { + "title": "insurance_provider", + "type": "string", + "enum": [ + "none", + "shipsurance", + "carrier", + "third_party" + ], + "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", + "required": [ + "weight" + ], + "additionalProperties": false, + "properties": { + "package_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies this [package type](https://www.shipengine.com/docs/reference/list-carrier-packages/)" + }, + "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" + }, + "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 + }, + "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_messages": { + "allOf": [ + { + "$ref": "#/components/schemas/label_messages" + } + ] + }, + "external_package_id": { + "type": "string", + "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": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/paperless_download" + } + ], + "description": "The paperless details which may contain elements like `href`, `instructions` and `handoff_code`." + }, + "sequence": { + "readOnly": true, + "format": "int32", + "type": "integer", + "description": "Package sequence" + }, + "products": { + "type": "array", + "default": [], + "minItems": 0, + "description": "Details about products inside packages (Information provided would be used on custom documentation)", + "items": { + "$ref": "#/components/schemas/products" + } + } + } + }, + "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", + "description": "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.\n\n|Carrier |Max lines |Max line length\n|-------------------|----------|--------------------\n|USPS (Stamps.com) |3 |60\n|FedEx |3 |35 for the first line. 30 for additional lines.\n|UPS |2 |35\n|OnTrac |2 |25\n", + "required": [ + "reference1", + "reference2", + "reference3" + ], + "additionalProperties": false, + "properties": { + "reference1": { + "type": "string", + "nullable": true, + "default": null, + "description": "The first line of the custom label message. Some carriers may prefix this line with something like \"REF\", \"Reference\", \"Trx Ref No.\", etc.\n" + }, + "reference2": { + "type": "string", + "nullable": true, + "default": null, + "description": "The second line of the custom label message. Some carriers may prefix this line with something like \"INV\", \"Reference 2\", \"Trx Ref No.\", etc.\n" + }, + "reference3": { + "type": "string", + "nullable": true, + "default": null, + "description": "The third line of the custom label message. Some carriers may prefix this line with something like \"PO\", \"Reference 3\", etc.\n" + } + } + }, + "products": { + "title": "products", + "type": "object", + "description": "The customs declaration for a single item in the shipment.", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "nullable": true, + "maxLength": 100, + "default": null, + "description": "A description of the item" + }, + "quantity": { + "type": "integer", + "format": "int32", + "minimum": 0, + "default": 0, + "description": "The quantity of this item in the shipment." + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The declared value of each item" + }, + "weight": { + "allOf": [ + { + "$ref": "#/components/schemas/weight" + } + ], + "description": "The item weight" + }, + "harmonized_tariff_code": { + "type": "string", + "nullable": true, + "default": null, + "example": 3926.1, + "description": "The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item." + }, + "country_of_origin": { + "nullable": true, + "default": null, + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ], + "description": "The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) where this item originated\n" + }, + "unit_of_measure": { + "type": "string", + "nullable": true + }, + "sku": { + "type": "string", + "description": "The SKU (Stock Keeping Unit) of the item", + "nullable": true + }, + "sku_description": { + "type": "string", + "description": "Description of the Custom Item's SKU", + "nullable": true + }, + "mid_code": { + "type": "string", + "description": "Manufacturers Identification code", + "nullable": true + }, + "product_url": { + "type": "string", + "description": "link to the item on the seller website", + "nullable": true + }, + "vat_rate": { + "type": "number", + "format": "double", + "description": "VAT rate applicable to the item", + "nullable": true, + "example": 0.2 + }, + "dangerous_goods": { + "type": "array", + "default": [], + "minItems": 0, + "description": "Details about dangerous goods inside products", + "items": { + "$ref": "#/components/schemas/dangerous_goods" + } + } + } + }, + "dangerous_goods": { + "title": "dangerous_goods", + "type": "object", + "description": "Dangerous goods attribute associated with the product\n", + "additionalProperties": false, + "properties": { + "id_number": { + "type": "string", + "nullable": true, + "default": null, + "description": "UN number to identify the dangerous goods." + }, + "shipping_name": { + "type": "string", + "nullable": true, + "default": null, + "description": "Trade description of the dangerous goods." + }, + "technical_name": { + "type": "string", + "nullable": true, + "default": null, + "description": "Recognized Technical or chemical name of dangerous goods." + }, + "product_class": { + "type": "string", + "nullable": true, + "default": null, + "description": "Dangerous goods product class based on regulation." + }, + "product_class_subsidiary": { + "type": "string", + "nullable": true, + "default": null, + "description": "A secondary of product class for substances presenting more than one particular hazard" + }, + "packaging_group": { + "$ref": "#/components/schemas/packaging_group" + }, + "dangerous_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/dangerous_amount" + } + ], + "description": "This model represents the amount of the dangerous goods." + }, + "quantity": { + "type": "integer", + "format": "int32", + "minimum": 0, + "default": 0, + "description": "Quantity of dangerous goods." + }, + "packaging_instruction": { + "type": "string", + "nullable": true, + "default": null, + "description": "The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container." + }, + "packaging_instruction_section": { + "$ref": "#/components/schemas/packaging_instruction_section" + }, + "packaging_type": { + "type": "string", + "nullable": true, + "default": null, + "description": "The type of exterior packaging used to contain the dangerous good." + }, + "transport_mean": { + "$ref": "#/components/schemas/transport_mean" + }, + "transport_category": { + "type": "string", + "nullable": true, + "default": null, + "description": "Transport category assign to dangerous goods for the transport purpose." + }, + "regulation_authority": { + "type": "string", + "nullable": true, + "default": null, + "description": "Name of the regulatory authority." + }, + "regulation_level": { + "$ref": "#/components/schemas/regulation_level" + }, + "radioactive": { + "type": "boolean", + "nullable": true, + "example": false, + "description": "Indication if the substance is radioactive." + }, + "reportable_quantity": { + "type": "boolean", + "nullable": true, + "example": false, + "description": "Indication if the substance needs to be reported to regulatory authority based on the quantity." + }, + "tunnel_code": { + "type": "string", + "nullable": true, + "default": null, + "description": "Defines which types of tunnels the shipment is allowed to go through" + }, + "additional_description": { + "type": "string", + "nullable": true, + "default": null, + "description": "Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier" + } + } + }, + "packaging_group": { + "title": "packaging_group", + "type": "string", + "enum": [ + "i", + "ii", + "iii" + ] + }, + "dangerous_amount": { + "title": "dangerous_amount", + "type": "object", + "description": "This model represents the amount of the dangerous goods..", + "additionalProperties": false, + "properties": { + "amount": { + "type": "number", + "format": "double", + "minimum": 0, + "default": 0, + "description": "The amount of dangerous goods." + }, + "unit": { + "type": "string", + "nullable": true, + "default": null, + "description": "The unit of dangerous goods." + } + } + }, + "packaging_instruction_section": { + "title": "packaging_instruction_section", + "type": "string", + "enum": [ + "section_1", + "section_2", + "section_1a", + "section_1b" + ] + }, + "transport_mean": { + "title": "transport_mean", + "type": "string", + "enum": [ + "ground", + "water", + "cargo_aircraft_only", + "passenger_aircraft" + ] + }, + "regulation_level": { + "title": "regulation_level", + "type": "string", + "enum": [ + "lightly_regulated", + "fully_regulated", + "limited_quantities", + "excepted_quantity" + ] + }, + "label_charge_event": { + "title": "label_charge_event", + "type": "string", + "enum": [ + "carrier_default", + "on_creation", + "on_carrier_acceptance" + ], + "description": "Determines when the user's account will be charged for the label." + }, + "validate_address": { + "title": "validate_address", + "type": "string", + "enum": [ + "no_validation", + "validate_only", + "validate_and_clean" + ], + "description": "The possible validate address values" + }, + "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" + }, + "tracking_status": { + "title": "tracking_status", + "type": "string", + "enum": [ + "unknown", + "in_transit", + "error", + "delivered" + ], + "description": "The different statuses that can apply to a shipment." + }, + "alternative_identifiers": { + "title": "alternative_identifiers", + "type": "object", + "additionalProperties": false, + "properties": { + "alternative_identifiers": { + "type": "array", + "readOnly": true, + "nullable": true, + "description": "Alternative identifiers associated with this package.\n", + "items": { + "$ref": "#/components/schemas/alternative_identifier" + } + } + } + }, + "alternative_identifier": { + "title": "alternative_identifier", + "type": "object", + "description": "Additional information some carriers may provide by which to identify a given label in their system. \n", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "minLength": 1, + "example": "last_mile_tracking_number", + "description": "The type of alternative_identifier that corresponds to the value.\n" + }, + "value": { + "type": "string", + "minLength": 1, + "example": "12345678912345678912", + "description": "The value of the alternative_identifier.\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", + "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", + "description": "A get label by external shipment id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/label" + } + ] + }, + "create_label_from_rate_request_body": { + "title": "create_label_from_rate_request_body", + "type": "object", + "description": "A purchase label without shipment request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/purchase_label_without_shipment" + } + ] + }, + "purchase_label_without_shipment": { + "title": "purchase_label_without_shipment", + "type": "object", + "description": "A purchase label without shipment resource", + "additionalProperties": false, + "properties": { + "validate_address": { + "allOf": [ + { + "$ref": "#/components/schemas/validate_address" + } + ] + }, + "label_layout": { + "default": "4x6", + "allOf": [ + { + "$ref": "#/components/schemas/label_layout" + } + ] + }, + "label_format": { + "default": "pdf", + "allOf": [ + { + "$ref": "#/components/schemas/label_format" + } + ] + }, + "label_download_type": { + "allOf": [ + { + "$ref": "#/components/schemas/label_download_type" + } + ] + }, + "display_scheme": { + "default": "label", + "allOf": [ + { + "$ref": "#/components/schemas/display_scheme" + } + ], + "description": "The display format that the label should be shown in." + } + } + }, + "create_label_from_rate_response_body": { + "title": "create_label_from_rate_response_body", + "type": "object", + "description": "A create label from rate response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/label" + } + ] + }, + "create_label_from_shipment_request_body": { + "title": "create_label_from_shipment_request_body", + "type": "object", + "description": "A purchase label without shipment request body", + "additionalProperties": false, + "properties": { + "validate_address": { + "allOf": [ + { + "$ref": "#/components/schemas/validate_address" + } + ] + }, + "label_layout": { + "default": "4x6", + "allOf": [ + { + "$ref": "#/components/schemas/label_layout" + } + ] + }, + "label_format": { + "default": "pdf", + "allOf": [ + { + "$ref": "#/components/schemas/label_format" + } + ] + }, + "label_download_type": { + "allOf": [ + { + "$ref": "#/components/schemas/label_download_type" + } + ] + }, + "display_scheme": { + "default": "label", + "allOf": [ + { + "$ref": "#/components/schemas/display_scheme" + } + ], + "description": "The display format that the label should be shown in." + } + } + }, + "create_label_from_shipment_response_body": { + "title": "create_label_from_shipment_response_body", + "type": "object", + "description": "A create label from shipment response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/label" + } + ] + }, + "get_label_by_id_response_body": { + "title": "get_label_by_id_response_body", + "type": "object", + "description": "A get label by id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/label" + } + ] + }, + "create_return_label_request_body": { + "title": "create_return_label_request_body", + "type": "object", + "description": "A create return label request body", + "additionalProperties": false, + "properties": { + "charge_event": { + "allOf": [ + { + "$ref": "#/components/schemas/label_charge_event" + } + ], + "description": "The label charge event.\n" + }, + "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" + }, + "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" + }, + "label_download_type": { + "writeOnly": true, + "default": "url", + "allOf": [ + { + "$ref": "#/components/schemas/label_download_type" + } + ] + }, + "display_scheme": { + "default": "label", + "allOf": [ + { + "$ref": "#/components/schemas/display_scheme" + } + ], + "description": "The display format that the label should be shown in." + }, + "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." + } + } + }, + "create_return_label_response_body": { + "title": "create_return_label_response_body", + "type": "object", + "description": "A create return label response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/label" + } + ] + }, + "get_tracking_log_from_label_response_body": { + "title": "get_tracking_log_from_label_response_body", + "type": "object", + "description": "A get tracking log from label response body", + "required": [ + "tracking_number", + "status_code", + "carrier_status_code", + "estimated_delivery_date", + "events" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/tracking_information" + } + ] + }, + "tracking_information": { + "title": "tracking_information", + "type": "object", + "description": "A tracking information resource", + "additionalProperties": false, + "properties": { + "tracking_number": { + "allOf": [ + { + "$ref": "#/components/schemas/tracking_number" + } + ] + }, + "tracking_url": { + "type": "string", + "readOnly": true, + "example": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234", + "description": "Carrier Tracking Url, if available" + }, + "status_code": { + "allOf": [ + { + "$ref": "#/components/schemas/status_code" + } + ] + }, + "carrier_code": { + "allOf": [ + { + "$ref": "#/components/schemas/carrier_code" + } + ] + }, + "carrier_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "status_description": { + "type": "string", + "readOnly": true, + "example": "Delivered", + "minLength": 0, + "description": "Status description" + }, + "carrier_status_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": 1, + "description": "Carrier status code" + }, + "carrier_detail_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": "OT", + "description": "Carrier detail code" + }, + "carrier_status_description": { + "type": "string", + "minLength": 0, + "readOnly": true, + "example": "Your item was delivered in or at the mailbox at 9:10 am on March", + "description": "carrier status description" + }, + "ship_date": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + }, + "estimated_delivery_date": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + }, + "actual_delivery_date": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + }, + "exception_description": { + "type": "string", + "readOnly": true, + "minLength": 0, + "description": "Exception description" + }, + "events": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/track_event" + }, + "description": "The events that have occured during the lifetime of this tracking number." + } + } + }, + "status_code": { + "readOnly": true, + "title": "status_code", + "enum": [ + "un", + "ac", + "it", + "de", + "ex", + "at", + "ny" + ], + "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" + }, + "track_event": { + "title": "track_event", + "type": "object", + "description": "A track event", + "required": [ + "occurred_at", + "city_locality", + "state_province", + "postal_code", + "carrier_detail_code", + "status_code", + "status_description", + "carrier_status_code", + "carrier_status_description" + ], + "additionalProperties": false, + "properties": { + "occurred_at": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "Timestamp for carrier event" + }, + "carrier_occurred_at": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "Carrier timestamp for the event, it is assumed to be the local time of where the event occurred." + }, + "description": { + "type": "string", + "readOnly": true, + "minLength": 0, + "example": "Delivered, In/At Mailbox", + "description": "Event description" + }, + "city_locality": { + "type": "string", + "readOnly": true, + "example": "AUSTIN", + "minLength": 0, + "description": "City locality" + }, + "state_province": { + "type": "string", + "readOnly": true, + "example": "TX", + "minLength": 2, + "description": "State province" + }, + "postal_code": { + "type": "string", + "readOnly": true, + "example": 78756, + "minLength": 0, + "description": "Postal code" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ] + }, + "company_name": { + "type": "string", + "readOnly": true, + "example": "Stamps.com", + "minLength": 0, + "description": "Company Name" + }, + "signer": { + "type": "string", + "minLength": 0, + "readOnly": true, + "description": "Signer information" + }, + "event_code": { + "type": "string", + "minLength": 0, + "description": "Event Code" + }, + "carrier_detail_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": "OT", + "description": "Carrier detail code" + }, + "status_code": { + "allOf": [ + { + "$ref": "#/components/schemas/status_code" + } + ] + }, + "status_description": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": "In Transit", + "description": "Event Status Description" + }, + "carrier_status_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "example": 1, + "description": "Carrier status code" + }, + "carrier_status_description": { + "type": "string", + "minLength": 0, + "readOnly": true, + "example": "Your item was delivered in or at the mailbox at 9:10 am on March", + "description": "carrier status description" + }, + "latitude": { + "type": "number", + "format": "double", + "minimum": -90, + "maximum": 90, + "description": "Latitude coordinate of tracking event." + }, + "longitude": { + "type": "number", + "format": "double", + "minimum": -180, + "maximum": 180, + "description": "Longitude coordinate of tracking event." + } + } + }, + "void_label_response_body": { + "title": "void_label_response_body", + "type": "object", + "description": "A void label response body", + "required": [ + "approved", + "message" + ], + "additionalProperties": false, + "properties": { + "approved": { + "type": "boolean", + "readOnly": true, + "example": false, + "description": "Indicates whether the attempt to void the label was successful" + }, + "message": { + "type": "string", + "minLength": 0, + "readOnly": true, + "example": "Unable to delete FedEx shipment. Unable to retrieve record from database." + }, + "reason_code": { + "readOnly": true, + "type": "string", + "allOf": [ + { + "$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.", + "example": "label_not_found_within_void_period" + } + } + }, + "reason_code": { + "title": "reason_code", + "type": "string", + "enum": [ + "unknown", + "unspecified", + "validation_failed", + "label_not_found_within_void_period", + "label_already_used", + "label_already_voided", + "contact_carrier" + ], + "description": "The possible normalized reasons a label void request may not have been approved" + }, + "list_manifests_response_body": { + "title": "list_manifests_response_body", + "type": "object", + "description": "A list manifests response body", + "required": [ + "manifests", + "total", + "page", + "pages", + "links" + ], + "additionalProperties": false, + "properties": { + "manifests": { + "type": "array", + "readOnly": true, + "default": [], + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/manifest" + } + ], + "description": "A single manifest" + }, + "description": "The list of available manifests" + }, + "total": { + "type": "integer", + "format": "int64", + "readOnly": true, + "minimum": 0, + "example": 3, + "description": "The total number of manifests returned" + }, + "page": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 3, + "description": "Current page of the list manifests results" + }, + "pages": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 4, + "description": "Total number of pages for list manifests results" + }, + "links": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/pagination_link" + } + ], + "description": "Helpful links to other pages of results" + } + } + }, + "manifest": { + "title": "manifest", + "type": "object", + "description": "Used for combining packages into one scannable form that a carrier can use when picking up a large \nnumber of shipments\n", + "additionalProperties": false, + "properties": { + "manifest_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the manifest" + }, + "form_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the form" + }, + "created_at": { + "type": "string", + "format": "date-time", + "minLength": 1, + "readOnly": true, + "example": "2019-07-12T13:37:39.050Z", + "description": "The date-time that the manifest was created" + }, + "ship_date": { + "type": "string", + "format": "date-time", + "minLength": 1, + "readOnly": true, + "example": "2019-07-12T13:37:39.050Z", + "description": "The date-time that the manifests shipments will be picked up" + }, + "shipments": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 100, + "description": "The number of shipments that are included in this manifest" + }, + "label_ids": { + "type": "array", + "readOnly": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "description": "An array of the label ids used in this manifest." + }, + "warehouse_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the warehouse" + }, + "submission_id": { + "readOnly": true, + "type": "string", + "minLength": 1, + "example": "9475711899564878915476", + "description": "A string that uniquely identifies the submission" + }, + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + }, + "manifest_download": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/manifest_download" + } + ] + } + } + }, + "manifest_download": { + "title": "manifest_download", + "type": "object", + "description": "Object containing the href link to download the manifest file", + "additionalProperties": false, + "properties": { + "href": { + "allOf": [ + { + "$ref": "#/components/schemas/url" + } + ], + "description": "The URL of the linked resource, if any" + } + } + }, + "create_manifest_request_body": { + "title": "create_manifest_request_body", + "oneOf": [ + { + "$ref": "#/components/schemas/create_manifest_by_object_request_body" + }, + { + "$ref": "#/components/schemas/create_manifest_label_ids_request_body" + } + ] + }, + "create_manifest_by_object_request_body": { + "title": "create_manifest_by_object_request_body", + "type": "object", + "description": "A create manifest request body", + "required": [ + "carrier_id", + "warehouse_id", + "ship_date" + ], + "additionalProperties": false, + "properties": { + "carrier_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + }, + "excluded_label_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "Label Id that will be excluded from the manifest" + }, + "description": "The list of label ids to exclude from the manifest" + }, + "label_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "Label Id that will be included for the manifest" + }, + "description": "The list of label ids to include for the manifest" + }, + "warehouse_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the warehouse" + }, + "ship_date": { + "type": "string", + "format": "date-time", + "minLength": 1, + "example": "2018-09-23T15:00:00.000Z", + "description": "The ship date that the shipment will be sent out on" + } + } + }, + "create_manifest_label_ids_request_body": { + "title": "create_manifest_label_ids_request_body", + "type": "object", + "description": "A create manifest request body", + "required": [ + "label_ids" + ], + "additionalProperties": false, + "properties": { + "label_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "Label Id that will be included in the manifest" + }, + "description": "The list of label ids to include in the manifest" + } + } + }, + "create_manifest_response_body": { + "title": "create_manifest_response_body", + "type": "object", + "description": "A create manifest response body", + "required": [ + "manifest_id", + "form_id", + "created_at", + "ship_date", + "shipments", + "warehouse_id", + "submission_id", + "carrier_id", + "manifest_download" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/manifests" + }, + { + "$ref": "#/components/schemas/manifests_requests" + }, + { + "$ref": "#/components/schemas/deprecated_manifest" + }, + { + "$ref": "#/components/schemas/error_with_label_id_response_body" + } + ] + }, + "manifests": { + "title": "manifests", + "type": "object", + "description": "An array of manifest resources", + "additionalProperties": false, + "properties": { + "manifests": { + "description": "Resulting Manifests", + "type": "array", + "items": { + "$ref": "#/components/schemas/manifest" + } + } + } + }, + "manifests_requests": { + "title": "manifests_requests", + "type": "object", + "description": "An array of manifest requests", + "additionalProperties": false, + "properties": { + "manifest_requests": { + "description": "Resulting manifest requests with statuses", + "type": "array", + "items": { + "$ref": "#/components/schemas/manifest_request" + } + } + } + }, + "manifest_request": { + "title": "manifest_request", + "type": "object", + "description": "A reference to the manifest request", + "additionalProperties": false, + "properties": { + "manifest_request_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies a manifest request" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/manifest_request_status" + } + ] + } + } + }, + "manifest_request_status": { + "title": "manifest_request_status", + "type": "string", + "enum": [ + "in_progress", + "completed" + ], + "description": "The possible statuses of a manifest request" + }, + "deprecated_manifest": { + "title": "deprecated_manifest", + "type": "object", + "description": "Deprecated manifest resource", + "additionalProperties": false, + "properties": { + "manifest_id": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the manifest" + }, + "form_id": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the form" + }, + "created_at": { + "deprecated": true, + "type": "string", + "format": "date-time", + "minLength": 1, + "example": "2019-07-12T13:37:39.050Z", + "description": "The date-time that the manifest was created" + }, + "ship_date": { + "deprecated": true, + "type": "string", + "format": "date-time", + "minLength": 1, + "example": "2019-07-12T13:37:39.050Z", + "description": "The date-time that the manifests shipments will be picked up" + }, + "shipments": { + "deprecated": true, + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 100, + "description": "The number of shipments that are included in this manifest" + }, + "warehouse_id": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the warehouse" + }, + "submission_id": { + "deprecated": true, + "type": "string", + "minLength": 1, + "example": "9475711899564878915476", + "description": "A string that uniquely identifies the submission" + }, + "carrier_id": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + }, + "manifest_download": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/manifest_download" + } + ] + }, + "label_ids": { + "deprecated": true, + "type": "array", + "readOnly": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ] + }, + "description": "An array of the label ids used in this manifest." + } + } + }, + "error_with_label_id_response_body": { + "title": "error_with_label_id_response_body", + "type": "object", + "description": "An error response body", + "required": [ + "request_id", + "errors" + ], + "additionalProperties": false, + "properties": { + "request_id": { + "allOf": [ + { + "$ref": "#/components/schemas/uuid" + } + ], + "description": "A UUID that uniquely identifies the request id.\nThis can be given to the support team to help debug non-trivial issues that may occur\n" + }, + "errors": { + "type": "array", + "readOnly": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/error" + } + ] + }, + "description": "The errors associated with the failed API call" + } + } + }, + "get_manifest_by_id_response_body": { + "title": "get_manifest_by_id_response_body", + "type": "object", + "description": "A get manifest by id response body", + "required": [ + "manifest_id", + "form_id", + "created_at", + "ship_date", + "shipments", + "warehouse_id", + "submission_id", + "carrier_id", + "manifest_download", + "label_ids" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/manifest" + } + ] + }, + "list_package_types_response_body": { + "title": "list_package_types_response_body", + "type": "object", + "description": "A list package types response body", + "additionalProperties": false, + "properties": { + "packages": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/package_type" + } + ], + "description": "Custom Package Types items" + }, + "description": "An array of custom package types" + } + } + }, + "create_package_type_request_body": { + "title": "create_package_type_request_body", + "type": "object", + "description": "A create package type request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/package_type" + } + ] + }, + "create_package_type_response_body": { + "title": "create_package_type_response_body", + "type": "object", + "description": "A create package type response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/package_type" + } + ] + }, + "get_package_type_by_id_response_body": { + "title": "get_package_type_by_id_response_body", + "type": "object", + "description": "A get package type by id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/package_type" + } + ] + }, + "update_package_type_request_body": { + "title": "update_package_type_request_body", + "type": "object", + "description": "An update package type request body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/package_type" + } + ] + }, + "get_pickups_response_body": { + "title": "get_pickups_response_body", + "allOf": [ + { + "$ref": "#/components/schemas/list_pickup_response_body" + }, + { + "$ref": "#/components/schemas/error_response_body" + } + ] + }, + "list_pickup_response_body": { + "title": "list_pickup_response_body", + "type": "object", + "description": "A list pickup response body", + "required": [ + "pickups", + "total", + "page", + "pages", + "links" + ], + "additionalProperties": false, + "properties": { + "pickups": { + "type": "array", + "description": "An array of pickups associated with the user's account.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/pickup" + } + ] + } + }, + "total": { + "type": "integer", + "format": "int64", + "readOnly": true, + "minimum": 0, + "example": 3, + "description": "The total number of pickups returned" + }, + "page": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 3, + "description": "Current page of the list pickups results" + }, + "pages": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 4, + "description": "Total number of pages for list pickups results" + }, + "links": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/pagination_link" + } + ], + "description": "Helpful links to other pages of results" + } + } + }, + "pickup": { + "title": "pickup", + "type": "object", + "description": "The information necessary to schedule a package pickup\n", + "additionalProperties": false, + "properties": { + "pickup_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/pickup_resource_id" + } + ] + }, + "label_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "Label ID that will be included in the pickup request" + }, + "description": "Label IDs that will be included in the pickup request" + }, + "created_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the pickup was created in ShipEngine." + }, + "cancelled_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "The date and time that the pickup was cancelled in ShipEngine." + }, + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The carrier_id associated with the pickup" + }, + "confirmation_number": { + "readOnly": true, + "type": "string", + "nullable": true, + "description": "The carrier confirmation number for the scheduled pickup.", + "example": "292513CL4A3" + }, + "warehouse_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "The warehouse_id associated with the pickup" + }, + "pickup_address": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/address" + } + ] + }, + "contact_details": { + "$ref": "#/components/schemas/contact_details" + }, + "pickup_notes": { + "type": "string", + "minLength": 0, + "description": "Used by some carriers to give special instructions for a package pickup" + }, + "pickup_window": { + "$ref": "#/components/schemas/pickup_window" + }, + "pickup_windows": { + "readOnly": true, + "type": "array", + "description": "An array of available pickup windows. Carriers can return multiple times that they will pickup packages.\n", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/pickup_windows" + } + ] + } + } + } + }, + "pickup_resource_id": { + "title": "pickup_resource_id", + "type": "string", + "minLength": 4, + "example": "pik_3YcKU5zdtJuCqoeNwyqqbW", + "description": "Pickup Resource ID" + }, + "contact_details": { + "title": "contact_details", + "type": "object", + "required": [ + "name", + "email", + "phone" + ], + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "email": { + "allOf": [ + { + "$ref": "#/components/schemas/email" + } + ] + }, + "phone": { + "type": "string", + "minLength": 7, + "description": "Phone number associated" + } + } + }, + "pickup_window": { + "title": "pickup_window", + "writeOnly": true, + "type": "object", + "description": "The desired time range for the package pickup.", + "required": [ + "start_at", + "end_at" + ], + "properties": { + "start_at": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + }, + "end_at": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + } + } + }, + "pickup_windows": { + "title": "pickup_windows", + "type": "object", + "properties": { + "start_at": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + }, + "end_at": { + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + } + } + }, + "schedule_pickup_request_body": { + "title": "schedule_pickup_request_body", + "type": "object", + "description": "A schedule pickup request body", + "required": [ + "contact_details", + "label_ids", + "pickup_window" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/pickup" + } + ] + }, + "schedule_pickup_response_body": { + "title": "schedule_pickup_response_body", + "allOf": [ + { + "$ref": "#/components/schemas/pickup" + }, + { + "$ref": "#/components/schemas/error_response_body" + } + ] + }, + "get_pickup_by_id_response_body": { + "title": "get_pickup_by_id_response_body", + "allOf": [ + { + "$ref": "#/components/schemas/pickup_response_body" + }, + { + "$ref": "#/components/schemas/error_response_body" + } + ] + }, + "pickup_response_body": { + "title": "pickup_response_body", + "type": "object", + "description": "A pickup response body", + "required": [ + "pickup", + "pickup_id", + "label_ids", + "created_at", + "carrier_id", + "warehouse_id", + "pickup_address", + "contact_details", + "notes", + "pickup_window", + "confirmation_number" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/pickup" + } + ] + }, + "delete_pickup_by_id_response_body": { + "title": "delete_pickup_by_id_response_body", + "allOf": [ + { + "$ref": "#/components/schemas/error_response_body" + }, + { + "$ref": "#/components/schemas/delete_scheduled_pickup_response_body" + } + ] + }, + "delete_scheduled_pickup_response_body": { + "title": "delete_scheduled_pickup_response_body", + "type": "object", + "description": "A delete scheduled pickup response body", + "additionalProperties": false, + "required": [ + "pickup_id" + ], + "properties": { + "pickup_id": { + "allOf": [ + { + "$ref": "#/components/schemas/pickup_resource_id" + } + ] + } + } + }, + "calculate_rates_request_body": { + "title": "calculate_rates_request_body", + "type": "object", + "description": "A rate shipment request body", + "required": [ + "shipment_id", + "shipment" + ], + "additionalProperties": false, + "oneOf": [ + { + "$ref": "#/components/schemas/shipment_id_request" + }, + { + "$ref": "#/components/schemas/shipment_request" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/rate_request_options" + } + ] + }, + "shipment_id_request": { + "title": "shipment_id_request", + "type": "object", + "properties": { + "shipment_id": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the shipment" + } + } + }, + "shipment_request": { + "title": "shipment_request", + "type": "object", + "properties": { + "shipment": { + "allOf": [ + { + "$ref": "#/components/schemas/address_validating_shipment" + } + ], + "description": "The shipment object" + } + } + }, + "address_validating_shipment": { + "title": "address_validating_shipment", + "type": "object", + "description": "An address validating shipment", + "required": [ + "shipment_id", + "carrier_id", + "service_code", + "ship_to", + "ship_from" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/validate_shipment_fields" + }, + { + "$ref": "#/components/schemas/partial_shipment" + } + ] + }, + "validate_shipment_fields": { + "title": "validate_shipment_fields", + "type": "object", + "properties": { + "validate_address": { + "default": "no_validation", + "allOf": [ + { + "$ref": "#/components/schemas/validate_address" + } + ] + } + } + }, + "rate_request_options": { + "title": "rate_request_options", + "type": "object", + "properties": { + "rate_options": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_request_body" + } + ], + "description": "The rate options" + } + } + }, + "rate_request_body": { + "title": "rate_request_body", + "type": "object", + "description": "A rate request body", + "required": [ + "carrier_ids" + ], + "additionalProperties": false, + "properties": { + "carrier_ids": { + "type": "array", + "minItems": 1, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "carrier ids" + }, + "description": "Array of carrier ids to get rates for" + }, + "package_types": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "service_codes": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "description": "Item Service Codes" + } + }, + "calculate_tax_amount": { + "type": "boolean", + "description": "Calculate the duties and tariffs for cross border shipments." + }, + "preferred_currency": { + "allOf": [ + { + "$ref": "#/components/schemas/currency" + } + ] + }, + "is_return": { + "type": "boolean", + "description": "Indicate if it's a return shipment" + } + } + }, + "calculate_rates_response_body": { + "title": "calculate_rates_response_body", + "type": "object", + "description": "A rate shipment response body", + "required": [ + "rate_response", + "shipment_id", + "ship_date", + "created_at", + "modified_at", + "shipment_status", + "return_to", + "confirmation", + "customs", + "advanced_options", + "insurance_provider", + "tags", + "packages", + "total_weight" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/partial_shipment" + }, + { + "$ref": "#/components/schemas/rate_response" + } + ] + }, + "rate_response": { + "title": "rate_response", + "type": "object", + "additionalProperties": false, + "properties": { + "rate_response": { + "allOf": [ + { + "$ref": "#/components/schemas/rates_information" + } + ], + "description": "The rates response" + } + } + }, + "rates_information": { + "title": "rates_information", + "type": "object", + "description": "A rates information resource", + "additionalProperties": false, + "properties": { + "rates": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/rate" + } + ], + "description": "Shipment Rates" + }, + "description": "An array of shipment rates" + }, + "invalid_rates": { + "type": "array", + "readOnly": true, + "default": [], + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/rate" + } + ], + "description": "Invalid Shipment Rate" + }, + "description": "An array of invalid shipment rates" + }, + "rate_request_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the rate request" + }, + "shipment_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the shipment" + }, + "created_at": { + "type": "string", + "format": "date-time", + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "When the rate was created" + }, + "status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/rate_response_status" + } + ] + }, + "errors": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/error" + } + ] + } + } + } + }, + "rate": { + "title": "rate", + "type": "object", + "description": "A rate", + "required": [ + "rate_id", + "rate_type", + "carrier_id", + "shipping_amount", + "insurance_amount", + "confirmation_amount", + "other_amount", + "zone", + "package_type", + "guaranteed_service", + "negotiated_rate", + "service_type", + "service_code", + "trackable", + "carrier_code", + "carrier_nickname", + "carrier_friendly_name", + "validation_status", + "warning_messages", + "error_messages" + ], + "additionalProperties": false, + "properties": { + "rate_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the rate" + }, + "rate_type": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/rate_type" + } + ] + }, + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + }, + "shipping_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The shipping amount. Should be added with confirmation_amount, insurance_amount and other_amount to calculate the total purchase price." + }, + "insurance_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The insurance amount. Should be added with shipping_amount, confirmation_amount and other_amount to calculate the total purchase price." + }, + "confirmation_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The confirmation amount. Should be added with shipping_amount, insurance_amount and other_amount to calculate the total purchase price." + }, + "other_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Any other charges associated with this rate. Should be added with shipping_amount, insurance_amount and confirmation_amount to calculate the total purchase price." + }, + "requested_comparison_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The total shipping cost for the specified comparison_rate_type." + }, + "tax_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Tariff and additional taxes associated with an international shipment." + }, + "zone": { + "type": "integer", + "format": "int32", + "nullable": true, + "readOnly": true, + "minimum": 0, + "example": 6, + "description": "Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of\ncustom zones that vary depending upon the ship_to and ship_from location\n" + }, + "package_type": { + "type": "string", + "nullable": true, + "readOnly": true, + "minLength": 1, + "example": "package", + "description": "package type that this rate was estimated for" + }, + "delivery_days": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 5, + "description": "The number of days estimated for delivery, this will show the _actual_ delivery\ntime if for example, the package gets shipped on a Friday\n" + }, + "guaranteed_service": { + "type": "boolean", + "readOnly": true, + "description": "Indicates if the rate is guaranteed." + }, + "estimated_delivery_date": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date" + } + ] + }, + "carrier_delivery_days": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "The carrier delivery days" + }, + "ship_date": { + "type": "string", + "format": "date-time", + "readOnly": true, + "minLength": 1, + "description": "ship date" + }, + "negotiated_rate": { + "type": "boolean", + "readOnly": true, + "description": "Indicates if the rates been negotiated" + }, + "service_type": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "service type" + }, + "service_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "service code for the rate" + }, + "trackable": { + "type": "boolean", + "readOnly": true, + "description": "Indicates if rate is trackable" + }, + "carrier_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "carrier code" + }, + "carrier_nickname": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "carrier nickname" + }, + "carrier_friendly_name": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "carrier friendly name" + }, + "validation_status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/validation_status" + } + ] + }, + "warning_messages": { + "type": "array", + "readOnly": true, + "minItems": 0, + "items": { + "type": "string", + "readOnly": true, + "minLength": 0, + "description": "warning message" + }, + "description": "The warning messages" + }, + "error_messages": { + "type": "array", + "readOnly": true, + "minItems": 0, + "items": { + "type": "string", + "readOnly": true, + "minLength": 0, + "description": "error message" + }, + "description": "The error messages" + } + } + }, + "rate_type": { + "title": "rate_type", + "type": "string", + "enum": [ + "check", + "shipment" + ], + "description": "The possible rate type values" + }, + "validation_status": { + "title": "validation_status", + "type": "string", + "enum": [ + "valid", + "invalid", + "has_warnings", + "unknown" + ], + "description": "The possible validation status values" + }, + "rate_response_status": { + "title": "rate_response_status", + "type": "string", + "enum": [ + "working", + "completed", + "partial", + "error" + ], + "description": "The possible rate response status values" + }, + "compare_bulk_rates_request_body": { + "title": "compare_bulk_rates_request_body", + "type": "object", + "description": "A rate shipments request body", + "required": [ + "rate_options" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/rate_request_rate_options" + } + ], + "oneOf": [ + { + "$ref": "#/components/schemas/rate_request_by_shipment_ids" + }, + { + "$ref": "#/components/schemas/rate_request_by_shipments" + } + ] + }, + "rate_request_rate_options": { + "title": "rate_request_rate_options", + "type": "object", + "properties": { + "rate_options": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_request_body" + } + ], + "description": "The rate options" + } + } + }, + "rate_request_by_shipment_ids": { + "title": "rate_request_by_shipment_ids", + "type": "object", + "required": [ + "shipment_ids" + ], + "properties": { + "shipment_ids": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "shipment ids" + }, + "description": "The array of shipment IDs" + } + } + }, + "rate_request_by_shipments": { + "title": "rate_request_by_shipments", + "type": "object", + "required": [ + "shipments" + ], + "properties": { + "shipments": { + "type": "array", + "minItems": 1, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/address_validating_shipment" + } + ], + "description": "The shipment to get a bulk rate estimate for" + }, + "description": "The array of shipments to get bulk rate estimates for" + } + } + }, + "compare_bulk_rates_response_body": { + "title": "compare_bulk_rates_response_body", + "type": "array", + "description": "A bulk rate response body", + "items": { + "$ref": "#/components/schemas/bulk_rate" + } + }, + "bulk_rate": { + "title": "bulk_rate", + "type": "object", + "description": "A bulk rate", + "required": [ + "rate_request_id", + "shipment_id", + "created_at", + "status", + "errors" + ], + "additionalProperties": false, + "properties": { + "rate_request_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the rate request" + }, + "shipment_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the shipment" + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ] + }, + "status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/rate_response_status" + } + ] + }, + "errors": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/error" + } + ], + "description": "An error that occurred while retrieving the bulk rate" + }, + "description": "An array of errors that were returned while retrieving the bulk rate" + } + } + }, + "estimate_rates_request_body": { + "title": "estimate_rates_request_body", + "type": "object", + "description": "A rate estimate request body", + "required": [ + "from_country_code", + "from_postal_code", + "from_city_locality", + "from_state_province", + "to_country_code", + "to_postal_code", + "to_city_locality", + "to_state_province", + "weight", + "ship_date" + ], + "additionalProperties": false, + "oneOf": [ + { + "$ref": "#/components/schemas/rate_estimate_by_carrier_id" + }, + { + "$ref": "#/components/schemas/rate_estimate_by_carrier_ids" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/rate_estimate_options" + } + ] + }, + "rate_estimate_by_carrier_id": { + "title": "rate_estimate_by_carrier_id", + "type": "object", + "properties": { + "carrier_id": { + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + } + } + }, + "rate_estimate_by_carrier_ids": { + "title": "rate_estimate_by_carrier_ids", + "type": "object", + "properties": { + "carrier_ids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "carrier id" + }, + "description": "Array of Carrier Ids" + } + } + }, + "rate_estimate_options": { + "title": "rate_estimate_options", + "type": "object", + "properties": { + "from_country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ] + }, + "from_postal_code": { + "allOf": [ + { + "$ref": "#/components/schemas/postal_code" + } + ] + }, + "from_city_locality": { + "type": "string", + "minLength": 1, + "example": "Austin", + "description": "from postal code" + }, + "from_state_province": { + "type": "string", + "minLength": 1, + "example": "Austin", + "description": "From state province" + }, + "to_country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ] + }, + "to_postal_code": { + "allOf": [ + { + "$ref": "#/components/schemas/postal_code" + } + ] + }, + "to_city_locality": { + "type": "string", + "minLength": 1, + "example": "Austin", + "description": "The city locality the package is being shipped to" + }, + "to_state_province": { + "type": "string", + "minLength": 1, + "example": "Houston", + "description": "To state province" + }, + "weight": { + "allOf": [ + { + "$ref": "#/components/schemas/weight" + } + ], + "description": "The weight of the package" + }, + "dimensions": { + "allOf": [ + { + "$ref": "#/components/schemas/dimensions" + } + ], + "description": "The dimensions of the package" + }, + "confirmation": { + "allOf": [ + { + "$ref": "#/components/schemas/delivery_confirmation" + } + ] + }, + "address_residential_indicator": { + "allOf": [ + { + "$ref": "#/components/schemas/address_residential_indicator" + } + ] + }, + "ship_date": { + "type": "string", + "allOf": [ + { + "$ref": "#/components/schemas/date_time" + } + ], + "description": "ship date" + } + } + }, + "estimate_rates_response_body": { + "title": "estimate_rates_response_body", + "type": "array", + "description": "A rate estimate response body", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/rate_estimate" + } + ] + } + }, + "rate_estimate": { + "title": "rate_estimate", + "type": "object", + "description": "A rate estimate", + "required": [ + "rate_type", + "carrier_id", + "shipping_amount", + "insurance_amount", + "confirmation_amount", + "other_amount", + "zone", + "package_type", + "guaranteed_service", + "negotiated_rate", + "service_type", + "service_code", + "trackable", + "carrier_code", + "carrier_nickname", + "carrier_friendly_name", + "validation_status", + "warning_messages", + "error_messages" + ], + "additionalProperties": false, + "properties": { + "rate_type": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/rate_type" + } + ] + }, + "carrier_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the carrier" + }, + "shipping_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The shipping amount" + }, + "insurance_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The insurance amount" + }, + "confirmation_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "The confirmation amount" + }, + "other_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Any other charges associated with this rate" + }, + "tax_amount": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/monetary_value" + } + ], + "description": "Tariff and additional taxes associated with an international shipment." + }, + "zone": { + "type": "integer", + "format": "int32", + "nullable": true, + "readOnly": true, + "minimum": 0, + "example": 6, + "description": "Certain carriers base [their rates](https://blog.stamps.com/2017/09/08/usps-postal-zones/) off of\ncustom zones that vary depending upon the ship_to and ship_from location\n" + }, + "package_type": { + "type": "string", + "nullable": true, + "readOnly": true, + "minLength": 1, + "example": "package", + "description": "package type that this rate was estimated for" + }, + "delivery_days": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": 5, + "description": "The number of days estimated for delivery, this will show the _actual_ delivery\ntime if for example, the package gets shipped on a Friday\n" + }, + "guaranteed_service": { + "type": "boolean", + "readOnly": true, + "description": "Indicates if the rate is guaranteed." + }, + "estimated_delivery_date": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/date" + } + ] + }, + "carrier_delivery_days": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "The carrier delivery days" + }, + "ship_date": { + "type": "string", + "format": "date-time", + "readOnly": true, + "minLength": 1, + "description": "ship date" + }, + "negotiated_rate": { + "type": "boolean", + "readOnly": true, + "description": "Indicates if the rates been negotiated" + }, + "service_type": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "service type" + }, + "service_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "service code for the rate" + }, + "trackable": { + "type": "boolean", + "readOnly": true, + "description": "Indicates if rate is trackable" + }, + "carrier_code": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/), such as `fedex`, `dhl_express`, `stamps_com`, etc." + }, + "carrier_nickname": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "carrier nickname" + }, + "carrier_friendly_name": { + "type": "string", + "readOnly": true, + "minLength": 1, + "description": "carrier friendly name" + }, + "validation_status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/validation_status" + } + ] + }, + "warning_messages": { + "type": "array", + "readOnly": true, + "minItems": 0, + "items": { + "type": "string", + "readOnly": true, + "minLength": 0, + "description": "warning message" + }, + "description": "The warning messages" + }, + "error_messages": { + "type": "array", + "readOnly": true, + "minItems": 0, + "items": { + "type": "string", + "readOnly": true, + "minLength": 0, + "description": "error message" + }, + "description": "The error messages" + } + } + }, + "get_rate_by_id_response_body": { + "title": "get_rate_by_id_response_body", + "type": "object", + "description": "A rate response body", + "required": [ + "rates", + "invalid_rates", + "rate_request_id", + "shipment_id", + "created_at", + "status", + "errors" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/rate" + } + ] + }, + "get_service_points_request": { + "title": "get_service_points_request", + "oneOf": [ + { + "$ref": "#/components/schemas/get_service_points_request_body" + } + ] + }, + "get_service_points_request_body": { + "title": "get_service_points_request_body", + "type": "object", + "description": "A get service points request body. Caller must provide exactly one of address_query, address, or lat / long pair.", + "required": [ + "providers" + ], + "properties": { + "address_query": { + "type": "string", + "description": "Unstructured text to search for service points by.", + "example": "177A Bleecker Street New York" + }, + "address": { + "type": "object", + "description": "Structured address to search by.", + "required": [ + "country_code" + ], + "properties": { + "address_line1": { + "type": "string", + "example": "1999 Bishop Grandin Blvd.", + "description": "The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines." + }, + "address_line2": { + "type": "string" + }, + "address_line3": { + "type": "string" + }, + "city_locality": { + "type": "string", + "description": "The name of the city or locality" + }, + "state_province": { + "type": "string", + "description": "The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation." + }, + "postal_code": { + "type": "string", + "allOf": [ + { + "$ref": "#/components/schemas/postal_code" + } + ] + }, + "country_code": { + "type": "string", + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ] + } + } + }, + "providers": { + "type": "array", + "description": "An array of shipping service providers and service codes", + "items": { + "type": "object", + "properties": { + "carrier_id": { + "type": "string", + "example": "se-123456", + "description": "Uniquely identifies a carrier connection" + }, + "service_code": { + "type": "array", + "items": { + "type": "string", + "example": "chronoclassic", + "description": "Uniquely identifies a shipping service" + } + } + } + } + }, + "lat": { + "format": "double", + "type": "number", + "example": 48.874518928233094, + "description": "The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html" + }, + "long": { + "format": "double", + "type": "number", + "example": 2.3591775711639404, + "description": "The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html" + }, + "radius": { + "format": "int32", + "type": "integer", + "example": 500, + "description": "Search radius in kilometers" + }, + "max_results": { + "format": "int32", + "type": "integer", + "example": 25, + "description": "The maximum number of service points to return" + }, + "shipment": { + "type": "object", + "description": "Shipment information to be used for service point selection", + "properties": { + "total_weight": { + "allOf": [ + { + "$ref": "#/components/schemas/weight" + } + ], + "description": "Shipment total weight" + } + } + } + } + }, + "list_service_points_response_body": { + "title": "list_service_points_response_body", + "type": "object", + "description": "A list service points response body", + "properties": { + "lat": { + "format": "double", + "type": "number", + "example": 48.842608, + "description": "The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html" + }, + "long": { + "format": "double", + "type": "number", + "example": 0.032875, + "description": "The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html" + }, + "service_points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "carrier_code": { + "allOf": [ + { + "$ref": "#/components/schemas/carrier_code" + } + ] + }, + "service_codes": { + "type": "array", + "items": { + "type": "string", + "example": "chronoclassic", + "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) service code." + } + }, + "service_point_id": { + "type": "string", + "example": "614940", + "description": "A unique identifier for a carrier drop off point." + }, + "company_name": { + "type": "string", + "example": "My fancy company name", + "description": "If this is a business address, then the company name should be specified here." + }, + "address_line1": { + "type": "string", + "example": "PLACE DU CANADA", + "description": "The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines." + }, + "city_locality": { + "type": "string", + "example": "TRUN", + "description": "The name of the city or locality" + }, + "state_province": { + "type": "string", + "example": "TRUN", + "description": "The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation." + }, + "postal_code": { + "allOf": [ + { + "$ref": "#/components/schemas/postal_code" + } + ] + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ] + }, + "phone_number": { + "type": "string", + "example": "555-555-5555", + "description": "Phone number associated" + }, + "lat": { + "format": "double", + "type": "number", + "example": 48.842608, + "description": "The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html" + }, + "long": { + "format": "double", + "type": "number", + "example": 0.032875, + "description": "The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html" + }, + "distance_in_meters": { + "format": "double", + "type": "number", + "example": 728.9959308847579, + "description": "Distance in meters" + }, + "hours_of_operation": { + "type": "object", + "description": "Hours of operation", + "properties": { + "monday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "tuesday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "wednesday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "thursday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "friday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "saturday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "sunday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + } + } + }, + "features": { + "type": "array", + "description": "Service features", + "items": { + "type": "string", + "enum": [ + "drop_off_point", + "pickup_point", + "print_services", + "after_hours_locker", + "after_hours_dropbox" + ] + } + }, + "type": { + "type": "string", + "description": "Service point type", + "default": "pudo", + "enum": [ + "pudo", + "locker" + ] + } + } + } + }, + "errors": { + "type": "array", + "readOnly": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/error" + } + ] + }, + "description": "The errors associated with the failed API call" + } + } + }, + "get_service_point_by_id_response_body": { + "title": "get_service_point_by_id_response_body", + "type": "object", + "description": "A get service point by ID response body", + "properties": { + "service_point": { + "type": "object", + "properties": { + "carrier_code": { + "allOf": [ + { + "$ref": "#/components/schemas/carrier_code" + } + ] + }, + "service_codes": { + "type": "array", + "items": { + "type": "string", + "description": "A [shipping carrier](https://www.shipengine.com/docs/carriers/setup/) service code." + } + }, + "service_point_id": { + "type": "string", + "example": "614940", + "description": "A unique identifier for a carrier drop off point." + }, + "company_name": { + "type": "string", + "example": "My fancy company name", + "description": "If this is a business address, then the company name should be specified here." + }, + "address_line1": { + "type": "string", + "example": "PLACE DU CANADA", + "description": "The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines." + }, + "city_locality": { + "type": "string", + "example": "TRUN", + "description": "The name of the city or locality" + }, + "state_province": { + "type": "string", + "example": "TRUN", + "description": "The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation." + }, + "postal_code": { + "allOf": [ + { + "$ref": "#/components/schemas/postal_code" + } + ] + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/country_code" + } + ] + }, + "phone_number": { + "type": "string", + "example": "555-555-5555", + "description": "Phone number associated" + }, + "lat": { + "format": "double", + "type": "number", + "example": 48.842608, + "description": "The latitude of the point. Represented as signed degrees. Required if long is provided. http://www.geomidpoint.com/latlon.html" + }, + "long": { + "format": "double", + "type": "number", + "example": 0.032875, + "description": "The longitude of the point. Represented as signed degrees. Required if lat is provided. http://www.geomidpoint.com/latlon.html" + }, + "hours_of_operation": { + "type": "object", + "description": "Hours of operation", + "properties": { + "monday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "tuesday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "wednesday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "thursday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "friday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "saturday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + }, + "sunday": { + "type": "array", + "items": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "09:15", + "description": "Opening time" + }, + "close": { + "type": "string", + "example": "12:00", + "description": "Closing time" + } + } + } + } + } + }, + "features": { + "type": "array", + "description": "Service features", + "items": { + "type": "string", + "enum": [ + "drop_off_point", + "pickup_point", + "print_services", + "after_hours_locker", + "after_hours_dropbox" + ] + } + }, + "type": { + "type": "string", + "description": "Service point type", + "default": "pudo", + "enum": [ + "pudo", + "locker" + ] + } + } + } + } + }, + "shipments_sort_by": { + "title": "shipments_sort_by", + "type": "string", + "enum": [ + "modified_at", + "created_at" + ], + "description": "The possible shipments sort by values" + }, + "list_shipments_response_body": { + "title": "list_shipments_response_body", + "type": "object", + "description": "A list shipment response body", + "required": [ + "shipments", + "total", + "page", + "pages", + "links" + ], + "additionalProperties": false, + "properties": { + "shipments": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/shipment" + } + ], + "description": "A shipment object" + }, + "description": "The list of shipments returned by the api call" + }, + "total": { + "type": "integer", + "format": "int64", + "readOnly": true, + "minimum": 0, + "example": 1990, + "description": "Total number of shipments returned by the api call" + }, + "page": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1, + "example": "????" + }, + "pages": { + "type": "integer", + "format": "int32", + "readOnly": true, + "minimum": 1 + }, + "links": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/pagination_link" + } + ] + } + } + }, + "create_shipments_request_body": { + "title": "create_shipments_request_body", + "type": "object", + "description": "A create shipments request body", + "required": [ + "shipments" + ], + "additionalProperties": false, + "properties": { + "shipments": { + "type": "array", + "minItems": 1, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/address_validating_shipment" + } + ] + }, + "description": "An array of shipments to be created." + } + } + }, + "create_shipments_response_body": { + "title": "create_shipments_response_body", + "type": "object", + "description": "A create shipments response body", + "required": [ + "has_errors", + "shipments" + ], + "additionalProperties": false, + "properties": { + "has_errors": { + "type": "boolean", + "default": false, + "description": "Indicates if errors occured while creating the shipments" + }, + "shipments": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/create_and_validate_shipment" + } + ], + "description": "The shipment that was created." + }, + "description": "An array of shipments that were created." + } + } + }, + "create_and_validate_shipment": { + "title": "create_and_validate_shipment", + "type": "object", + "description": "A create and validate shipment resource", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/partial_shipment" + }, + { + "$ref": "#/components/schemas/create_shipment_response_body_fields" + } + ] + }, + "create_shipment_response_body_fields": { + "title": "create_shipment_response_body_fields", + "type": "object", + "properties": { + "errors": { + "type": "array", + "deprecated": true, + "items": { + "type": "string", + "minLength": 1, + "example": "Parameter value '100000000.00' is out of range.", + "description": "An error that occurred while creating a shipment." + }, + "description": "An array of errors that occurred while creating shipment.", + "readOnly": true + }, + "address_validation": { + "allOf": [ + { + "$ref": "#/components/schemas/address_validation_result" + } + ], + "description": "The address validation" + } + } + }, + "get_shipment_by_external_id_response_body": { + "title": "get_shipment_by_external_id_response_body", + "type": "object", + "description": "A get shipment by external id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/shipment" + } + ] + }, + "parse_shipment_request_body": { + "title": "parse_shipment_request_body", + "type": "object", + "description": "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.\n", + "required": [ + "text" + ], + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "minLength": 1, + "example": "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.\n", + "description": "The unstructured text that contains shipping-related entities" + }, + "shipment": { + "allOf": [ + { + "$ref": "#/components/schemas/partial_shipment" + } + ], + "description": "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.\n" + } + } + }, + "parse_shipment_response_body": { + "title": "parse_shipment_response_body", + "type": "object", + "description": "The parsed shipment, as well as a confidence score and a list of all the shipping entities that were recognized in the text.\n", + "required": [ + "score", + "shipment", + "entities" + ], + "additionalProperties": false, + "properties": { + "score": { + "type": "number", + "format": "double", + "minimum": 0, + "maximum": 1, + "description": "A confidence score between zero and one that indicates how certain the API is that it understood the text.\n" + }, + "shipment": { + "allOf": [ + { + "$ref": "#/components/schemas/partial_shipment" + } + ], + "description": "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.\n\n> **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.\n" + }, + "entities": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/recognized_entity" + }, + "description": "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.\n" + } + } + }, + "get_shipment_by_id_response_body": { + "title": "get_shipment_by_id_response_body", + "type": "object", + "description": "A get shipment by id response body", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/shipment" + } + ] + }, + "update_shipment_request_body": { + "title": "update_shipment_request_body", + "type": "object", + "description": "An update shipment request body", + "required": [ + "ship_to", + "ship_from" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/partial_shipment" + }, + { + "$ref": "#/components/schemas/update_shipment_fields" + } + ] + }, + "update_shipment_fields": { + "title": "update_shipment_fields", + "type": "object", + "properties": { + "validate_address": { + "default": "no_validation", + "allOf": [ + { + "$ref": "#/components/schemas/validate_address" + } + ] + } + } + }, + "update_shipment_response_body": { + "title": "update_shipment_response_body", + "type": "object", + "description": "An update shipment response body", + "required": [ + "errors", + "has_errors", + "address_validation", + "shipment_id", + "carrier_id", + "service_code", + "ship_date", + "created_at", + "shipment_status", + "ship_to", + "ship_from", + "return_to", + "confirmation", + "customs", + "advanced_options", + "insurance_provider", + "tags", + "packages", + "total_weight" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/create_and_validate_shipment" + } + ] + }, + "list_shipment_rates_response_body": { + "title": "list_shipment_rates_response_body", + "type": "object", + "description": "A list shipment rates response body", + "required": [ + "rates", + "invalid_rates", + "rate_request_id", + "shipment_id", + "created_at", + "status", + "errors" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/rates_information" + } + ] + }, + "update_shipments_tags_request_body": { + "title": "update_shipments_tags_request_body", + "type": "object", + "description": "A request body with shipments and tags", + "allOf": [ + { + "$ref": "#/components/schemas/update_shipments_tags" + } + ] + }, + "update_shipments_tags": { + "title": "update_shipments_tags", + "type": "object", + "properties": { + "shipments_tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "shipment_id": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "example": { + "shipments_tags": [ + { + "shipment_id": "se-1014296", + "tags": [ + "Fragile", + "International" + ] + }, + { + "shipment_id": "se-1014297", + "tags": [ + "Fragile", + "International" + ] + } + ] + } + }, + "tag_shipment_response_body": { + "title": "tag_shipment_response_body", + "type": "object", + "description": "Get shipment tags response body", + "required": [ + "tags" + ], + "additionalProperties": false, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tag_name": { + "title": "tag_name", + "type": "string", + "minLength": 1, + "example": "Fragile", + "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" + }, + "list_tags_response_body": { + "title": "list_tags_response_body", + "type": "object", + "description": "Response body from a successful GET /tags API call", + "additionalProperties": false, + "properties": { + "tags": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/tag" + } + ] + }, + "description": "The array of tags returned by the API call" + } + } + }, + "create_tag_response_body": { + "title": "create_tag_response_body", + "type": "object", + "description": "Response body for creating tags", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/tag" + } + ] + }, + "redirect": { + "title": "redirect", + "type": "string", + "enum": [ + "shipengine-dashboard" + ], + "description": "The resource to return a redirect URL to." + }, + "tokens_get_ephemeral_token_response_body.yaml": { + "title": "tokens_get_ephemeral_token_response_body.yaml", + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The requested token that expires in 10 seconds." + }, + "redirect_url": { + "type": "string", + "description": "The redirect url formatted with the requested token." + } + } + }, + "get_tracking_log_response_body": { + "title": "get_tracking_log_response_body", + "type": "object", + "description": "A get tracking log response body", + "required": [ + "tracking_number", + "tracking_url", + "status_code", + "carrier_code", + "carrier_id", + "carrier_detail_code", + "carrier_status_code", + "estimated_delivery_date", + "events" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/tracking_information" + } + ] + }, + "list_warehouses_response_body": { + "title": "list_warehouses_response_body", + "type": "object", + "description": "A warehouse list response body", + "required": [ + "warehouses" + ], + "additionalProperties": false, + "properties": { + "warehouses": { + "type": "array", + "readOnly": true, + "items": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/warehouse" + } + ] + }, + "description": "The array of warehouses returned by the API call" + } + } + }, + "warehouse": { + "title": "warehouse", + "type": "object", + "description": "A warehouse", + "additionalProperties": false, + "properties": { + "warehouse_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/se_id" + } + ], + "description": "A string that uniquely identifies the warehouse" + }, + "is_default": { + "nullable": true, + "type": "boolean", + "default": false, + "description": "Designates which single warehouse is the default on the account" + }, + "name": { + "type": "string", + "minLength": 1, + "example": "Zero Cool HQ", + "description": "Name of the warehouse" + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "example": "2019-06-25T18:12:35.583Z", + "minLength": 1, + "description": "Timestamp that indicates when the warehouse was created" + }, + "origin_address": { + "allOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The origin address of the warehouse" + }, + "return_address": { + "allOf": [ + { + "$ref": "#/components/schemas/address" + } + ], + "description": "The return address associated with the warehouse" + } + } + }, + "create_warehouse_request_body": { + "title": "create_warehouse_request_body", + "type": "object", + "description": "A create warehouse request body", + "required": [ + "name", + "origin_address" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/warehouse" + } + ] + }, + "create_warehouse_response_body": { + "title": "create_warehouse_response_body", + "type": "object", + "description": "A create warehouse response body", + "required": [ + "warehouse_id", + "name", + "created_at", + "origin_address", + "return_address" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/warehouse" + } + ] + }, + "get_warehouse_by_id_response_body": { + "title": "get_warehouse_by_id_response_body", + "type": "object", + "description": "A get warehouse by id response body", + "required": [ + "warehouse_id", + "name", + "created_at", + "origin_address", + "return_address" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/warehouse" + } + ] + }, + "update_warehouse_request_body": { + "title": "update_warehouse_request_body", + "type": "object", + "description": "An update warehouse request body", + "required": [ + "name", + "origin_address" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/warehouse" + } + ] + }, + "update_warehouse_settings_request_body": { + "title": "update_warehouse_settings_request_body", + "type": "object", + "description": "An update warehouse settings request body", + "properties": { + "is_default": { + "type": "boolean", + "nullable": true, + "description": "The default property on the warehouse.", + "example": true + } + }, + "additionalProperties": false + } + }, + "responses": { + "400_error_response": { + "description": "The request contained errors.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_response_body" + } + } + } + }, + "404_error_response": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_response_body" + } + } + } + }, + "500_error_response": { + "description": "An error occurred on ShipEngine's side.\n\n> This error will automatically be reported to our engineers.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_response_body" + } + } + } + }, + "409_error_response": { + "description": "The request conflicts with an existing resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_response_body" + } + } + } + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "name": "API-Key", + "in": "header", + "description": "To authenticate yourself to ShipEngine, you need to include an `API-Key` header in each API call. If you don't include a key when making an API request, or if you use an incorrect or expired key, then ShipEngine will respond with a `401 Unauthorized` error.\n\nLearn more about API keys in our [authentication guide](https://www.shipengine.com/docs/auth/).\n" + } + } + }, + "tags": [ + { + "name": "account", + "description": "For additional information about the ShipEngine account. \n", + "x-displayName": "Account" + }, + { + "name": "addresses", + "description": "No matter your shipping volume, failed deliveries and address change surcharges cut into your bottom line and damage perception with customers. Our address validation services ensure your packages make it to the right place the first time. [Learn how to leverage our address validation services here.](https://www.shipengine.com/docs/addresses/validation/)\n\nShipEngine supports address validation for virtually every country on Earth, including the United States, Canada, Great Britain, Australia, Germany, France, Norway, Spain, Sweden, Israel, Italy, and over 160 others.\n", + "externalDocs": { + "url": "https://www.shipengine.com/docs/addresses/validation/", + "description": "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.\n" + }, + "x-displayName": "Addresses" + }, + { + "name": "batches", + "description": "batches\n", + "x-displayName": "Batches" + }, + { + "name": "carrier_accounts", + "description": "carrier accounts\n", + "x-displayName": "Carrier Accounts" + }, + { + "name": "carriers", + "description": "carriers\n", + "x-displayName": "Carriers" + }, + { + "name": "downloads", + "description": "downloads\n", + "x-displayName": "Downloads" + }, + { + "name": "insurance", + "description": "insurance\n", + "x-displayName": "Insurance" + }, + { + "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", + "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" + }, + "x-displayName": "Labels" + }, + { + "name": "manifests", + "description": "manifests\n", + "x-displayName": "Manifests" + }, + { + "name": "package_pickups", + "description": "Scheduled package pickups", + "x-displayName": "Package Pickups" + }, + { + "name": "package_types", + "description": "custom package types\n", + "x-displayName": "Package Types" + }, + { + "name": "rates", + "description": "Make sure you ship as cost-effectively as possible by [quickly comparing rates](https://www.shipengine.com/docs/rates/) using the ShipEngine Rates API. As long as you have the carrier connected to your account, you'll be able to see and compare different rates and services.\n", + "externalDocs": { + "url": "https://www.shipengine.com/docs/rates/", + "description": "This quick start guide shows you how to get shipping rates for multiple carriers so you can choose the fastest, cheapest, or most reliable option.\n" + }, + "x-displayName": "Rates" + }, + { + "name": "service_points", + "x-displayName": "Service Points" + }, + { + "name": "shipments", + "description": "Shipments are at the center of the ShipEngine API. A shipment is the first step in [creating a shipping label](https://www.shipengine.com/docs/labels/create-a-label/), or [creating a manifest](https://www.shipengine.com/docs/shipping/manifests/). It's also essential for [getting shipping rates](https://www.shipengine.com/docs/rates/).\n", + "externalDocs": { + "url": "https://www.shipengine.com/docs/shipping/create-a-shipment/", + "description": "Learn about the shipment object model concept, and how to persist and re-use shipment data inside ShipEngine.\n" + }, + "x-displayName": "Shipments" + }, + { + "name": "tags", + "description": "tags\n", + "x-displayName": "Tags" + }, + { + "name": "tokens", + "x-displayName": "Tokens" + }, + { + "name": "tracking", + "description": "[Track packages](https://www.shipengine.com/docs/tracking/) across any of our 20+ supported carrier accounts and create tracking events to keep your customers up-to-date. Easily integrate real-time tracking information for shipments into your app, email, or SMS.\n", + "externalDocs": { + "url": "https://www.shipengine.com/docs/tracking/", + "description": "Learn how to use ShipEngine to track any package with a carrier and a tracking number" + }, + "x-displayName": "Tracking" + }, + { + "name": "warehouses", + "description": "warehouses\n", + "x-displayName": "Warehouses" + }, + { + "name": "webhooks", + "description": "[Webhooks](https://www.shipengine.com/docs/tracking/webhooks/) are a powerful feature of ShipEngine that can save you from sending repeated polling requests to check on the state of something. With webhooks, ShipEngine will automatically contact your servers when the stage changes. This can include [parcel tracking](https://www.shipengine.com/docs/tracking/) events, notification of the completion of a [batch operation](https://www.shipengine.com/docs/labels/bulk/), or new [salses orders](https://www.shipengine.com/docs/orders/).\n", + "externalDocs": { + "url": "https://www.shipengine.com/docs/tracking/webhooks/", + "description": "Learn how to setup webhooks and start listening to ShipEngine events." + }, + "x-displayName": "Webhooks" + } + ], + "security": [ + { + "api_key": [] + } + ], + "externalDocs": { + "url": "https://www.shipengine.com/docs/", + "description": "ShipEngine's documentation is designed to help you start shipping as quickly as possible. With easy-to-follow tutorials, detailed reference docs, and ready-made recipes for common use cases, you'll see real results in no time at all.\n" + } +} \ No newline at end of file diff --git a/generation/templates/AbstractOpenAPISchema.mustache b/generation/templates/AbstractOpenAPISchema.mustache index 05e78204..3c299cab 100644 --- a/generation/templates/AbstractOpenAPISchema.mustache +++ b/generation/templates/AbstractOpenAPISchema.mustache @@ -1,68 +1,43 @@ {{>partial_header}} using System; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; +using System.Text.Json; +using System.Text.Json.Serialization; -namespace {{packageName}}.{{modelPackage}} +namespace {{packageName}}.{{modelPackage}}; + +/// +/// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification +/// +{{>visibility}} abstract partial class AbstractOpenAPISchema { /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification + /// Custom JSON serializer /// - {{>visibility}} abstract partial class AbstractOpenAPISchema + static public readonly JsonSerializerOptions SerializerSettings = new JsonSerializerOptions { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Error, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Custom JSON serializer for objects with additional properties - /// - static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; + // OpenAPI generated types generally hide default constructors. + PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, + DictionaryKeyPolicy = JsonNamingPolicy.SnakeCaseLower + }; - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } + /// + /// 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 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; } + /// + /// 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(); - } -} + /// + /// Converts the instance into JSON string. + /// + public abstract string ToJson(); +} \ No newline at end of file diff --git a/generation/templates/ApiClient.mustache b/generation/templates/ApiClient.mustache index eb5be40d..8211ccc2 100644 --- a/generation/templates/ApiClient.mustache +++ b/generation/templates/ApiClient.mustache @@ -14,22 +14,20 @@ using System.Text; using System.Threading; using System.Text.RegularExpressions; using System.Threading.Tasks; -{{^net60OrLater}} +{{^netStandard}} using System.Web; -{{/net60OrLater}} +{{/netStandard}} using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using RestSharp; using RestSharp.Serializers; using RestSharpMethod = RestSharp.Method; -using FileIO = System.IO.File; {{#supportsRetry}} using Polly; {{/supportsRetry}} {{#hasOAuthMethods}} using {{packageName}}.Client.Auth; {{/hasOAuthMethods}} -using {{packageName}}.{{modelPackage}}; namespace {{packageName}}.Client { @@ -70,10 +68,10 @@ namespace {{packageName}}.Client /// A JSON string. public string Serialize(object obj) { - if (obj != null && obj is AbstractOpenAPISchema) + if (obj != null && obj is {{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema) { // the object to be serialized is an oneOf/anyOf schema - return ((AbstractOpenAPISchema)obj).ToJson(); + return (({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema)obj).ToJson(); } else { @@ -118,7 +116,7 @@ namespace {{packageName}}.Client if (match.Success) { string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - FileIO.WriteAllBytes(fileName, bytes); + File.WriteAllBytes(fileName, bytes); return new FileStream(fileName, FileMode.Open); } } @@ -129,7 +127,7 @@ namespace {{packageName}}.Client if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { - return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); } if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type @@ -151,13 +149,13 @@ namespace {{packageName}}.Client public ISerializer Serializer => this; public IDeserializer Deserializer => this; - public string[] AcceptedContentTypes => ContentType.JsonAccept; + public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept; public SupportsContentType SupportsContentType => contentType => contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); - public ContentType ContentType { get; set; } = ContentType.Json; + public ContentType ContentType { get; set; } = RestSharp.ContentType.Json; public DataFormat DataFormat => DataFormat.Json; } @@ -205,7 +203,7 @@ namespace {{packageName}}.Client ///
public ApiClient() { - _baseUrl = GlobalConfiguration.Instance.BasePath; + _baseUrl = {{packageName}}.Client.GlobalConfiguration.Instance.BasePath; } /// @@ -262,14 +260,14 @@ namespace {{packageName}}.Client /// /// Provides all logic for constructing a new RestSharp . - /// At this point, all information for querying the service is known. - /// Here, it is simply mapped into the RestSharp request. + /// At this point, all information for querying the service is known. Here, it is simply + /// mapped into the RestSharp request. /// /// The http verb. /// The target path (or resource). /// The additional request options. - /// A per-request configuration object. - /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. /// [private] A new RestRequest instance. /// private RestRequest NewRequest( @@ -377,7 +375,7 @@ namespace {{packageName}}.Client var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name)); + request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); else request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } @@ -387,13 +385,6 @@ namespace {{packageName}}.Client return request; } - /// - /// Transforms a RestResponse instance into a new ApiResponse instance. - /// At this point, we have a concrete http response from the service. - /// Here, it is simply mapped into the [public] ApiResponse object. - /// - /// The RestSharp response object - /// A new ApiResponse instance. private ApiResponse ToApiResponse(RestResponse response) { T result = response.Data; @@ -438,32 +429,30 @@ namespace {{packageName}}.Client return transformed; } - /// - /// Executes the HTTP request for the current service. - /// Based on functions received it can be async or sync. - /// - /// Local function that executes http request and returns http response. - /// Local function to specify options for the service. - /// The RestSharp request object - /// The RestSharp options object - /// A per-request configuration object. - /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. - /// A new ApiResponse instance. - private ApiResponse ExecClient(Func> getResponse, Action setOptions, RestRequest request, RequestOptions options, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) { var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + var cookies = new CookieContainer(); + + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } + } + var clientOptions = new RestClientOptions(baseUrl) { ClientCertificates = configuration.ClientCertificates, + CookieContainer = cookies, MaxTimeout = configuration.Timeout, Proxy = configuration.Proxy, UserAgent = configuration.UserAgent, UseDefaultCredentials = configuration.UseDefaultCredentials, RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback }; - setOptions(clientOptions); - {{#hasOAuthMethods}} if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && !string.IsNullOrEmpty(configuration.OAuthClientId) && @@ -485,14 +474,27 @@ namespace {{packageName}}.Client { InterceptRequest(request); - RestResponse response = getResponse(client); + RestResponse response; + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) + { + ErrorException = policyResult.FinalException + }; + } + else + { + response = client.Execute(request); + } // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { try { - response.Data = (T)typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); } catch (Exception ex) { @@ -550,85 +552,111 @@ namespace {{packageName}}.Client } } - private RestResponse DeserializeRestResponseFromPolicy(RestClient client, RestRequest request, PolicyResult policyResult) + {{#supportsAsync}} + private async Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (policyResult.Outcome == OutcomeType.Successful) + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + + var clientOptions = new RestClientOptions(baseUrl) { - return client.Deserialize(policyResult.Result); - } - else + ClientCertificates = configuration.ClientCertificates, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + }; + + {{#hasOAuthMethods}} + if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(configuration.OAuthClientId) && + !string.IsNullOrEmpty(configuration.OAuthClientSecret) && + configuration.OAuthFlow != null) { - return new RestResponse(request) - { - ErrorException = policyResult.FinalException - }; + clientOptions.Authenticator = new OAuthAuthenticator( + configuration.OAuthTokenUrl, + configuration.OAuthClientId, + configuration.OAuthClientSecret, + configuration.OAuthFlow, + SerializerSettings, + configuration); } - } - - private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) - { - Action setOptions = (clientOptions) => + + {{/hasOAuthMethods}} + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) { - var cookies = new CookieContainer(); + InterceptRequest(request); - if (options.Cookies != null && options.Cookies.Count > 0) + RestResponse response; + {{#supportsRetry}} + if (RetryConfiguration.AsyncRetryPolicy != null) { - foreach (var cookie in options.Cookies) + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) { - cookies.Add(new Cookie(cookie.Name, cookie.Value)); - } + ErrorException = policyResult.FinalException + }; } - clientOptions.CookieContainer = cookies; - }; + else + { + {{/supportsRetry}} + response = await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); + {{#supportsRetry}} + } + {{/supportsRetry}} - Func> getResponse = (client) => - { - if (RetryConfiguration.RetryPolicy != null) + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); - return DeserializeRestResponseFromPolicy(client, request, policyResult); + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); } - else + else if (typeof(T).Name == "Stream") // for binary response { - return client.Execute(request); + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; } - }; - return ExecClient(getResponse, setOptions, request, options, configuration); - } + InterceptResponse(request, response); - {{#supportsAsync}} - private Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken = default(CancellationToken)) - { - Action setOptions = (clientOptions) => - { - //no extra options - }; + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - Func> getResponse = (client) => - { - Func>> action = async () => + if (response.Cookies != null && response.Cookies.Count > 0) { - {{#supportsRetry}} - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); - return DeserializeRestResponseFromPolicy(client, request, policyResult); - } - else + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - {{/supportsRetry}} - return await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); - {{#supportsRetry}} - } - {{/supportsRetry}} - }; - return action().Result; - }; + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; - return Task.FromResult>(ExecClient(getResponse, setOptions, request, options, configuration)); + result.Cookies.Add(cookie); + } + } + return result; + } } #region IAsynchronousClient @@ -641,7 +669,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); @@ -656,7 +684,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); @@ -671,7 +699,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); @@ -686,7 +714,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); @@ -701,7 +729,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); @@ -716,7 +744,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); @@ -731,7 +759,7 @@ namespace {{packageName}}.Client /// GlobalConfiguration has been done before calling this method. /// Token that enables callers to cancel the request. /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); diff --git a/generation/templates/ApiException.mustache b/generation/templates/ApiException.mustache deleted file mode 100644 index f7dadc55..00000000 --- a/generation/templates/ApiException.mustache +++ /dev/null @@ -1,60 +0,0 @@ -{{>partial_header}} - -using System; - -namespace {{packageName}}.Client -{ - /// - /// API Exception - /// - {{>visibility}} class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public object ErrorContent { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public Multimap Headers { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() { } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - /// HTTP Headers. - public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - this.Headers = headers; - } - } - -} diff --git a/generation/templates/ApiResponse.mustache b/generation/templates/ApiResponse.mustache deleted file mode 100644 index 161c2acd..00000000 --- a/generation/templates/ApiResponse.mustache +++ /dev/null @@ -1,158 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections.Generic; -using System.Net; - -namespace {{packageName}}.Client -{ - /// - /// Provides a non-generic contract for the ApiResponse wrapper. - /// - public interface IApiResponse - { - /// - /// The data type of - /// - Type ResponseType { get; } - - /// - /// The content of this response - /// - Object Content { get; } - - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - HttpStatusCode StatusCode { get; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - Multimap Headers { get; } - - /// - /// Gets or sets any error text defined by the calling client. - /// - string ErrorText { get; set; } - - /// - /// Gets or sets any cookies passed along on the response. - /// - List Cookies { get; set; } - - /// - /// The raw content of this response - /// - string RawContent { get; } - } - - /// - /// API Response - /// - public class ApiResponse : IApiResponse - { - #region Properties - - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public HttpStatusCode StatusCode { get; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public Multimap Headers { get; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; } - - /// - /// Gets or sets any error text defined by the calling client. - /// - public string ErrorText { get; set; } - - /// - /// Gets or sets any cookies passed along on the response. - /// - public List Cookies { get; set; } - - /// - /// The content of this response - /// - public Type ResponseType - { - get { return typeof(T); } - } - - /// - /// The data type of - /// - public object Content - { - get { return Data; } - } - - /// - /// The raw content - /// - public string RawContent { get; } - - #endregion Properties - - #region Constructors - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - /// Raw content. - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data, string rawContent) - { - StatusCode = statusCode; - Headers = headers; - Data = data; - RawContent = rawContent; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) : this(statusCode, headers, data, null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Data (parsed HTTP body) - /// Raw content. - public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) - { - } - - #endregion Constructors - } -} diff --git a/generation/templates/AssemblyInfo.mustache b/generation/templates/AssemblyInfo.mustache deleted file mode 100644 index d5d937dc..00000000 --- a/generation/templates/AssemblyInfo.mustache +++ /dev/null @@ -1,40 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("{{packageTitle}}")] -[assembly: AssemblyDescription("{{packageDescription}}")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("{{packageCompany}}")] -[assembly: AssemblyProduct("{{packageProductName}}")] -[assembly: AssemblyCopyright("{{packageCopyright}}")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("{{packageVersion}}")] -[assembly: AssemblyFileVersion("{{packageVersion}}")] -{{^supportsAsync}} -// Settings which don't support asynchronous operations rely on non-public constructors -// This is due to how RestSharp requires the type constraint `where T : new()` in places it probably shouldn't. -[assembly: InternalsVisibleTo("RestSharp")] -[assembly: InternalsVisibleTo("NewtonSoft.Json")] -[assembly: InternalsVisibleTo("JsonSubTypes")] -{{/supportsAsync}} diff --git a/generation/templates/ClientUtils.mustache b/generation/templates/ClientUtils.mustache deleted file mode 100644 index 5e43c3d0..00000000 --- a/generation/templates/ClientUtils.mustache +++ /dev/null @@ -1,261 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -{{#useCompareNetObjects}} -using KellermanSoftware.CompareNetObjects; -{{/useCompareNetObjects}} - -namespace {{packageName}}.Client -{ - /// - /// Utility functions providing some benefit to API client consumers. - /// - public static class ClientUtils - { - {{#useCompareNetObjects}} - /// - /// An instance of CompareLogic. - /// - public static CompareLogic compareLogic; - - /// - /// Static constructor to initialise compareLogic. - /// - static ClientUtils() - { - {{#equatable}} - ComparisonConfig comparisonConfig = new{{^net70OrLater}} ComparisonConfig{{/net70OrLater}}(); - comparisonConfig.UseHashCodeIdentifier = true; - {{/equatable}} - compareLogic = new{{^net70OrLater}} CompareLogic{{/net70OrLater}}({{#equatable}}comparisonConfig{{/equatable}}); - } - - {{/useCompareNetObjects}} - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - return match.Success ? match.Groups[1].Value : filename; - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// The swagger-supported collection format, one of: csv, tsv, ssv, pipes, multi - /// Key name. - /// Value object. - /// A multimap of keys with 1..n associated values. - public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) - { - var parameters = new Multimap(); - - if (value is ICollection collection && collectionFormat == "multi") - { - foreach (var item in collection) - { - parameters.Add(name, ParameterToString(item)); - } - } - else if (value is IDictionary dictionary) - { - if(collectionFormat == "deepObject") { - foreach (DictionaryEntry entry in dictionary) - { - parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); - } - } - else { - foreach (DictionaryEntry entry in dictionary) - { - parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); - } - } - } - else - { - parameters.Add(name, ParameterToString(value)); - } - - return parameters; - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// An optional configuration instance, providing formatting options used in processing. - /// Formatted string. - public static string ParameterToString(object obj, IReadableConfiguration configuration = null) - { - if (obj is DateTime dateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is DateTimeOffset dateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is bool boolean) - return boolean ? "true" : "false"; - if (obj is ICollection collection) { - List entries = new List(); - foreach (var entry in collection) - entries.Add(ParameterToString(entry, configuration)); - return string.Join(",", entries); - } - if (obj is Enum && HasEnumMemberAttrValue(obj)) - return GetEnumMemberAttrValue(obj); - - return Convert.ToString(obj, CultureInfo.InvariantCulture); - } - - /// - /// Serializes the given object when not null. Otherwise return null. - /// - /// The object to serialize. - /// Serialized string. - public static string Serialize(object obj) - { - return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; - } - - /// - /// Encode string in base64 format. - /// - /// string to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - using (var ms = new MemoryStream()) - { - inputStream.CopyTo(ms); - return ms.ToArray(); - } - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public static string SelectHeaderContentType(string[] contentTypes) - { - if (contentTypes.Length == 0) - return null; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType)) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public static string SelectHeaderAccept(string[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return string.Join(",", accepts); - } - - /// - /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. - /// - public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - - /// - /// Check if the given MIME is a JSON MIME. - /// JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public static bool IsJsonMime(string mime) - { - if (string.IsNullOrWhiteSpace(mime)) return false; - - return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); - } - - /// - /// Is the Enum decorated with EnumMember Attribute - /// - /// - /// true if found - private static bool HasEnumMemberAttrValue(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 true; - return false; - } - - /// - /// Get the EnumMember value - /// - /// - /// EnumMember value as string otherwise null - 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; - } - } -} diff --git a/generation/templates/Configuration.mustache b/generation/templates/Configuration.mustache deleted file mode 100644 index a765ebf1..00000000 --- a/generation/templates/Configuration.mustache +++ /dev/null @@ -1,730 +0,0 @@ -{{>partial_header}} - -using System; -{{^net35}} -using System.Collections.Concurrent; -{{/net35}} -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Net.Http; -using System.Net.Security; -{{#useRestSharp}} -{{#hasOAuthMethods}}using {{packageName}}.Client.Auth; -{{/hasOAuthMethods}} -{{/useRestSharp}} - -namespace {{packageName}}.Client -{ - /// - /// Represents a set of configuration settings - /// - {{>visibility}} class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "{{packageVersion}}"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.RawContent), - response.RawContent, response.Headers); - } - {{^netStandard}} - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); - } - {{/netStandard}} - return null; - }; - - #endregion Static Members - - #region Private Members - - /// - /// Defines the base path of the target API server. - /// Example: http://localhost:3000/v1/ - /// - private string _basePath; - - private bool _useDefaultCredentials = false; - - /// - /// Gets or sets the API key based on the authentication name. - /// This is the key and value comprising the "secret" for accessing an API. - /// - /// The API key. - private IDictionary _apiKey; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - {{#servers.0}} - - /// - /// Gets or sets the servers defined in the OpenAPI spec. - /// - /// The servers - private IList> _servers; - {{/servers.0}} - - /// - /// Gets or sets the operation servers defined in the OpenAPI spec. - /// - /// The operation servers - private IReadOnlyDictionary>> _operationServers; - - {{#hasHttpSignatureMethods}} - - /// - /// HttpSigning configuration - /// - private HttpSigningConfiguration _HttpSigningConfiguration = null; - {{/hasHttpSignatureMethods}} - #endregion Private Members - - #region Constructors - - /// - /// Initializes a new instance of the class - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] - public Configuration() - { - Proxy = null; - UserAgent = WebUtility.UrlEncode("{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}"); - BasePath = "{{{basePath}}}"; - DefaultHeaders = new {{^net35}}Concurrent{{/net35}}Dictionary(); - ApiKey = new {{^net35}}Concurrent{{/net35}}Dictionary(); - ApiKeyPrefix = new {{^net35}}Concurrent{{/net35}}Dictionary(); - {{#servers}} - {{#-first}} - Servers = new List>() - { - {{/-first}} - { - new Dictionary { - {"url", "{{{url}}}"}, - {"description", "{{{description}}}{{^description}}No description provided{{/description}}"}, - {{#variables}} - {{#-first}} - { - "variables", new Dictionary { - {{/-first}} - { - "{{{name}}}", new Dictionary { - {"description", "{{{description}}}{{^description}}No description provided{{/description}}"}, - {"default_value", {{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}"{{{defaultValue}}}"}, - {{#enumValues}} - {{#-first}} - { - "enum_values", new List() { - {{/-first}} - "{{{.}}}"{{^-last}},{{/-last}} - {{#-last}} - } - } - {{/-last}} - {{/enumValues}} - } - }{{^-last}},{{/-last}} - {{#-last}} - } - } - {{/-last}} - {{/variables}} - } - }{{^-last}},{{/-last}} - {{#-last}} - }; - {{/-last}} - {{/servers}} - OperationServers = new Dictionary>>() - { - {{#apiInfo}} - {{#apis}} - {{#operations}} - {{#operation}} - {{#servers.0}} - { - "{{{classname}}}.{{{nickname}}}", new List> - { - {{#servers}} - { - new Dictionary - { - {"url", "{{{url}}}"}, - {"description", "{{{description}}}{{^description}}No description provided{{/description}}"} - } - }, - {{/servers}} - } - }, - {{/servers.0}} - {{/operation}} - {{/operations}} - {{/apis}} - {{/apiInfo}} - }; - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] - public Configuration( - IDictionary defaultHeaders, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "{{{basePath}}}") : this() - { - if (string.{{^net35}}IsNullOrWhiteSpace{{/net35}}{{#net35}}IsNullOrEmpty{{/net35}}(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeaders == null) - throw new ArgumentNullException("defaultHeaders"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeaders) - { - DefaultHeaders.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - #endregion Constructors - - #region Properties - - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath - { - get { return _basePath; } - set { _basePath = value; } - } - - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - public virtual bool UseDefaultCredentials - { - get { return _useDefaultCredentials; } - set { _useDefaultCredentials = value; } - } - - /// - /// Gets or sets the default header. - /// - [Obsolete("Use DefaultHeaders instead.")] - public virtual IDictionary DefaultHeader - { - get - { - return DefaultHeaders; - } - set - { - DefaultHeaders = value; - } - } - - /// - /// Gets or sets the default headers. - /// - public virtual IDictionary DefaultHeaders { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout { get; set; } - - /// - /// Gets or sets the proxy - /// - /// Proxy. - public virtual WebProxy Proxy { get; set; } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - string apiKeyValue; - ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); - string apiKeyPrefix; - if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) - { - return apiKeyPrefix + " " + apiKeyValue; - } - - return apiKeyValue; - } - - /// - /// Gets or sets certificate collection to be sent with requests. - /// - /// X509 Certificate collection. - public X509CertificateCollection ClientCertificates { get; set; } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// This helper property simplifies code generation. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - {{#useRestSharp}} - {{#hasOAuthMethods}} - /// - /// Gets or sets the token URL for OAuth2 authentication. - /// - /// The OAuth Token URL. - public virtual string OAuthTokenUrl { get; set; } - - /// - /// Gets or sets the client ID for OAuth2 authentication. - /// - /// The OAuth Client ID. - public virtual string OAuthClientId { get; set; } - - /// - /// Gets or sets the client secret for OAuth2 authentication. - /// - /// The OAuth Client Secret. - public virtual string OAuthClientSecret { get; set; } - - /// - /// Gets or sets the flow for OAuth2 authentication. - /// - /// The OAuth Flow. - public virtual OAuthFlow? OAuthFlow { get; set; } - - {{/hasOAuthMethods}} - {{/useRestSharp}} - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// Whatever you set here will be prepended to the value defined in AddApiKey. - /// - /// An example invocation here might be: - /// - /// ApiKeyPrefix["Authorization"] = "Bearer"; - /// - /// … where ApiKey["Authorization"] would then be used to set the value of your bearer token. - /// - /// - /// OAuth2 workflows should set tokens via AccessToken. - /// - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - {{#servers.0}} - - /// - /// Gets or sets the servers. - /// - /// The servers. - public virtual IList> Servers - { - get { return _servers; } - set - { - if (value == null) - { - throw new InvalidOperationException("Servers may not be null."); - } - _servers = value; - } - } - - /// - /// Gets or sets the operation servers. - /// - /// The operation servers. - public virtual IReadOnlyDictionary>> OperationServers - { - get { return _operationServers; } - set - { - if (value == null) - { - throw new InvalidOperationException("Operation servers may not be null."); - } - _operationServers = value; - } - } - - /// - /// Returns URL based on server settings without providing values - /// for the variables - /// - /// Array index of the server settings. - /// The server URL. - public string GetServerUrl(int index) - { - return GetServerUrl(Servers, index, null); - } - - /// - /// Returns URL based on server settings. - /// - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The server URL. - public string GetServerUrl(int index, Dictionary inputVariables) - { - return GetServerUrl(Servers, index, inputVariables); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index) - { - return GetOperationServerUrl(operation, index, null); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) - { - if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) - { - return GetServerUrl(operationServer, index, inputVariables); - } - - return null; - } - - /// - /// Returns URL based on server settings. - /// - /// Dictionary of server settings. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The server URL. - private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) - { - if (index < 0 || index >= servers.Count) - { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); - } - - if (inputVariables == null) - { - inputVariables = new Dictionary(); - } - - IReadOnlyDictionary server = servers[index]; - string url = (string)server["url"]; - - if (server.ContainsKey("variables")) - { - // go through each variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) - { - - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) - { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); - } - else - { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); - } - } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } - } - } - - return url; - } - {{/servers.0}} - {{#hasHttpSignatureMethods}} - - /// - /// Gets and Sets the HttpSigningConfiguration - /// - public HttpSigningConfiguration HttpSigningConfiguration - { - get { return _HttpSigningConfiguration; } - set { _HttpSigningConfiguration = value; } - } - {{/hasHttpSignatureMethods}} - - /// - /// Gets and Sets the RemoteCertificateValidationCallback - /// - public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } - - #endregion Properties - - #region Methods - - /// - /// Returns a string with essential information for debugging. - /// - public static string ToDebugReport() - { - string report = "C# SDK ({{{packageName}}}) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: {{{version}}}\n"; - report += " SDK Package Version: {{{packageVersion}}}\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - - #region Static Members - /// - /// Merge configurations. - /// - /// First configuration. - /// Second configuration. - /// Merged configuration. - public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) - { - if (second == null) return first ?? GlobalConfiguration.Instance; - - Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - - foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; - foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; - foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; - - var config = new Configuration - { - ApiKey = apiKey, - ApiKeyPrefix = apiKeyPrefix, - DefaultHeaders = defaultHeaders, - BasePath = second.BasePath ?? first.BasePath, - Timeout = second.Timeout, - Proxy = second.Proxy ?? first.Proxy, - UserAgent = second.UserAgent ?? first.UserAgent, - Username = second.Username ?? first.Username, - Password = second.Password ?? first.Password, - AccessToken = second.AccessToken ?? first.AccessToken, - {{#useRestSharp}} - {{#hasOAuthMethods}} - OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, - OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, - OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, - OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, - {{/hasOAuthMethods}} - {{/useRestSharp}} - {{#hasHttpSignatureMethods}} - HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, - {{/hasHttpSignatureMethods}} - TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, - ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, - UseDefaultCredentials = second.UseDefaultCredentials, - RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, - }; - return config; - } - #endregion Static Members - } -} diff --git a/generation/templates/ExceptionFactory.mustache b/generation/templates/ExceptionFactory.mustache deleted file mode 100644 index 4a141f6f..00000000 --- a/generation/templates/ExceptionFactory.mustache +++ /dev/null @@ -1,14 +0,0 @@ -{{>partial_header}} - -using System; - -namespace {{packageName}}.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - {{>visibility}} delegate Exception ExceptionFactory(string methodName, IApiResponse response); -} diff --git a/generation/templates/GlobalConfiguration.mustache b/generation/templates/GlobalConfiguration.mustache deleted file mode 100644 index 93a9ab8a..00000000 --- a/generation/templates/GlobalConfiguration.mustache +++ /dev/null @@ -1,59 +0,0 @@ -{{>partial_header}} - -using System.Collections.Generic; - -namespace {{packageName}}.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - {{>visibility}} partial class GlobalConfiguration : Configuration - { - #region Private Members - - private static readonly object GlobalConfigSync = new { }; - private static IReadableConfiguration _globalConfiguration; - - #endregion Private Members - - #region Constructors - - /// - private GlobalConfiguration() - { - } - - /// - public GlobalConfiguration(IDictionary defaultHeader, IDictionary apiKey, IDictionary apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath) - { - } - - static GlobalConfiguration() - { - Instance = new GlobalConfiguration(); - } - - #endregion Constructors - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static IReadableConfiguration Instance - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - } -} diff --git a/generation/templates/HttpMethod.mustache b/generation/templates/HttpMethod.mustache deleted file mode 100644 index 904a042a..00000000 --- a/generation/templates/HttpMethod.mustache +++ /dev/null @@ -1,25 +0,0 @@ -{{>partial_header}} - -namespace {{packageName}}.Client -{ - /// - /// Http methods supported by swagger - /// - public enum HttpMethod - { - /// HTTP GET request. - Get, - /// HTTP POST request. - Post, - /// HTTP PUT request. - Put, - /// HTTP DELETE request. - Delete, - /// HTTP HEAD request. - Head, - /// HTTP OPTIONS request. - Options, - /// HTTP PATCH request. - Patch - } -} diff --git a/generation/templates/HttpSigningConfiguration.mustache b/generation/templates/HttpSigningConfiguration.mustache deleted file mode 100644 index 9566e1f1..00000000 --- a/generation/templates/HttpSigningConfiguration.mustache +++ /dev/null @@ -1,803 +0,0 @@ -{{>partial_header}} - -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Web; - -namespace {{packageName}}.Client -{ - /// - /// Class for HttpSigning auth related parameter and methods - /// - public class HttpSigningConfiguration - { - /// - /// Initialize the HashAlgorithm and SigningAlgorithm to default value - /// - public HttpSigningConfiguration() - { - HashAlgorithm = HashAlgorithmName.SHA256; - SigningAlgorithm = "PKCS1-v15"; - } - - /// - ///Gets the Api keyId - /// - public string KeyId { get; set; } - - /// - /// Gets the Key file path - /// - public string KeyFilePath { get; set; } - - /// - /// Specify the API key in the form of a string, either configure the KeyString property or configure the KeyFilePath property. - /// - public string KeyString { get; set; } - - /// - /// Gets the key pass phrase for password protected key - /// - public SecureString KeyPassPhrase { get; set; } - - /// - /// Gets the HTTP signing header - /// - public List HttpSigningHeader { get; set; } - - /// - /// Gets the hash algorithm sha256 or sha512 - /// - public HashAlgorithmName HashAlgorithm { get; set; } - - /// - /// Gets the signing algorithm - /// - public string SigningAlgorithm { get; set; } - - /// - /// Gets the Signature validity period in seconds - /// - public int SignatureValidityPeriod { get; set; } - - private enum PrivateKeyType - { - None = 0, - RSA = 1, - ECDSA = 2, - } - - /// - /// Gets the Headers for HttpSigning - /// - /// Base path - /// HTTP method - /// Path - /// Request options - /// Http signed headers - public Dictionary GetHttpSignedHeader(string basePath,string method, string path, RequestOptions requestOptions) - { - const string HEADER_REQUEST_TARGET = "(request-target)"; - //The time when the HTTP signature expires. The API server should reject HTTP requests - //that have expired. - const string HEADER_EXPIRES = "(expires)"; - //The 'Date' header. - const string HEADER_DATE = "Date"; - //The 'Host' header. - const string HEADER_HOST = "Host"; - //The time when the HTTP signature was generated. - const string HEADER_CREATED = "(created)"; - //When the 'Digest' header is included in the HTTP signature, the client automatically - //computes the digest of the HTTP request body, per RFC 3230. - const string HEADER_DIGEST = "Digest"; - //The 'Authorization' header is automatically generated by the client. It includes - //the list of signed headers and a base64-encoded signature. - const string HEADER_AUTHORIZATION = "Authorization"; - - //Read the api key from the file - if(File.Exists(KeyFilePath)) - { - this.KeyString = ReadApiKeyFromFile(KeyFilePath); - } - else if(string.IsNullOrEmpty(KeyString)) - { - throw new Exception("No API key has been provided. Supply it using either KeyFilePath or KeyString"); - } - - //Hash table to store singed headers - var HttpSignedRequestHeader = new Dictionary(); - var HttpSignatureHeader = new Dictionary(); - - if (HttpSigningHeader.Count == 0) - { - HttpSigningHeader.Add("(created)"); - } - - if (requestOptions.PathParameters != null) - { - foreach (var pathParam in requestOptions.PathParameters) - { - var tempPath = path.Replace(pathParam.Key, "0"); - path = string.Format(tempPath, pathParam.Value); - } - } - - var httpValues = HttpUtility.ParseQueryString(string.Empty); - foreach (var parameter in requestOptions.QueryParameters) - { -#if (NETCOREAPP) - if (parameter.Value.Count > 1) - { // array - foreach (var value in parameter.Value) - { - httpValues.Add(HttpUtility.UrlEncode(parameter.Key) + "[]", value); - } - } - else - { - httpValues.Add(HttpUtility.UrlEncode(parameter.Key), parameter.Value[0]); - } -#else - if (parameter.Value.Count > 1) - { // array - foreach (var value in parameter.Value) - { - httpValues.Add(parameter.Key + "[]", value); - } - } - else - { - httpValues.Add(parameter.Key, parameter.Value[0]); - } -#endif - } - var uriBuilder = new UriBuilder(string.Concat(basePath, path)); - uriBuilder.Query = httpValues.ToString().Replace("+", "%20"); - - var dateTime = DateTime.Now; - string Digest = string.Empty; - - //get the body - string requestBody = string.Empty; - if (requestOptions.Data != null) - { - var serializerSettings = new JsonSerializerSettings(); - requestBody = JsonConvert.SerializeObject(requestOptions.Data, serializerSettings); - } - - if (HashAlgorithm == HashAlgorithmName.SHA256) - { - var bodyDigest = GetStringHash(HashAlgorithm, requestBody); - Digest = string.Format("SHA-256={0}", Convert.ToBase64String(bodyDigest)); - } - else if (HashAlgorithm == HashAlgorithmName.SHA512) - { - var bodyDigest = GetStringHash(HashAlgorithm, requestBody); - Digest = string.Format("SHA-512={0}", Convert.ToBase64String(bodyDigest)); - } - else - { - throw new Exception(string.Format("{0} not supported", HashAlgorithm)); - } - - foreach (var header in HttpSigningHeader) - { - if (header.Equals(HEADER_REQUEST_TARGET)) - { - var targetUrl = string.Format("{0} {1}{2}", method.ToLower(), uriBuilder.Path, uriBuilder.Query); - HttpSignatureHeader.Add(header.ToLower(), targetUrl); - } - else if (header.Equals(HEADER_EXPIRES)) - { - var expireDateTime = dateTime.AddSeconds(SignatureValidityPeriod); - HttpSignatureHeader.Add(header.ToLower(), GetUnixTime(expireDateTime).ToString()); - } - else if (header.Equals(HEADER_DATE)) - { - var utcDateTime = dateTime.ToUniversalTime().ToString("r"); - HttpSignatureHeader.Add(header.ToLower(), utcDateTime); - HttpSignedRequestHeader.Add(HEADER_DATE, utcDateTime); - } - else if (header.Equals(HEADER_HOST)) - { - HttpSignatureHeader.Add(header.ToLower(), uriBuilder.Host); - HttpSignedRequestHeader.Add(HEADER_HOST, uriBuilder.Host); - } - else if (header.Equals(HEADER_CREATED)) - { - HttpSignatureHeader.Add(header.ToLower(), GetUnixTime(dateTime).ToString()); - } - else if (header.Equals(HEADER_DIGEST)) - { - HttpSignedRequestHeader.Add(HEADER_DIGEST, Digest); - HttpSignatureHeader.Add(header.ToLower(), Digest); - } - else - { - bool isHeaderFound = false; - foreach (var item in requestOptions.HeaderParameters) - { - if (string.Equals(item.Key, header, StringComparison.OrdinalIgnoreCase)) - { - HttpSignatureHeader.Add(header.ToLower(), item.Value.ToString()); - isHeaderFound = true; - break; - } - } - if (!isHeaderFound) - { - throw new Exception(string.Format("Cannot sign HTTP request.Request does not contain the {0} header.",header)); - } - } - - } - var headersKeysString = string.Join(" ", HttpSignatureHeader.Keys); - var headerValuesList = new List(); - - foreach (var keyVal in HttpSignatureHeader) - { - headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); - } - //Concatenate headers value separated by new line - var headerValuesString = string.Join("\n", headerValuesList); - var signatureStringHash = GetStringHash(HashAlgorithm, headerValuesString); - string headerSignatureStr = null; - var keyType = GetKeyType(KeyString); - - if (keyType == PrivateKeyType.RSA) - { - headerSignatureStr = GetRSASignature(signatureStringHash); - } - else if (keyType == PrivateKeyType.ECDSA) - { - headerSignatureStr = GetECDSASignature(signatureStringHash); - } - else - { - throw new Exception(string.Format("Private key type {0} not supported", keyType)); - } - const string cryptographicScheme = "hs2019"; - var authorizationHeaderValue = string.Format("Signature keyId=\"{0}\",algorithm=\"{1}\"", - KeyId, cryptographicScheme); - - if (HttpSignatureHeader.ContainsKey(HEADER_CREATED)) - { - authorizationHeaderValue += string.Format(",created={0}", HttpSignatureHeader[HEADER_CREATED]); - } - - if (HttpSignatureHeader.ContainsKey(HEADER_EXPIRES)) - { - authorizationHeaderValue += string.Format(",expires={0}", HttpSignatureHeader[HEADER_EXPIRES]); - } - - authorizationHeaderValue += string.Format(",headers=\"{0}\",signature=\"{1}\"", - headersKeysString, headerSignatureStr); - HttpSignedRequestHeader.Add(HEADER_AUTHORIZATION, authorizationHeaderValue); - return HttpSignedRequestHeader; - } - - private byte[] GetStringHash(HashAlgorithmName hashAlgorithmName, string stringToBeHashed) - { - HashAlgorithm{{nrt?}} hashAlgorithm = null; - - if (hashAlgorithmName == HashAlgorithmName.SHA1) - hashAlgorithm = SHA1.Create(); - - if (hashAlgorithmName == HashAlgorithmName.SHA256) - hashAlgorithm = SHA256.Create(); - - if (hashAlgorithmName == HashAlgorithmName.SHA512) - hashAlgorithm = SHA512.Create(); - - if (hashAlgorithmName == HashAlgorithmName.MD5) - hashAlgorithm = MD5.Create(); - - if (hashAlgorithm == null) - throw new NullReferenceException($"{ nameof(hashAlgorithm) } was null."); - - byte[] bytes = Encoding.UTF8.GetBytes(stringToBeHashed); - byte[] stringHash = hashAlgorithm.ComputeHash(bytes); - return stringHash; - } - - private int GetUnixTime(DateTime date2) - { - DateTime date1 = new DateTime(1970, 01, 01); - TimeSpan timeSpan = date2 - date1; - return (int)timeSpan.TotalSeconds; - } - - private string GetRSASignature(byte[] stringToSign) - { - if (string.IsNullOrEmpty(KeyString)) - { - throw new Exception("No API key has been provided."); - } - RSA rsa = GetRSAProviderFromPemFile(KeyString, KeyPassPhrase); - if (SigningAlgorithm == "RSASSA-PSS") - { - var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pss); - return Convert.ToBase64String(signedbytes); - } - else if (SigningAlgorithm == "PKCS1-v15") - { - var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pkcs1); - return Convert.ToBase64String(signedbytes); - } - else - { - return string.Empty; - } - } - - /// - /// Gets the ECDSA signature - /// - /// - /// ECDSA signature - private string GetECDSASignature(byte[] dataToSign) - { - {{#net60OrLater}} - if (!File.Exists(KeyFilePath) && string.IsNullOrEmpty(KeyString)) - { - throw new Exception("No API key has been provided."); - } - - var keyStr = KeyString; - const string ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"; - const string ecKeyFooter = "-----END EC PRIVATE KEY-----"; - var ecKeyBase64String = keyStr.Replace(ecKeyHeader, "").Replace(ecKeyFooter, "").Trim(); - var keyBytes = System.Convert.FromBase64String(ecKeyBase64String); - var ecdsa = ECDsa.Create(); - - var byteCount = 0; - if (KeyPassPhrase != null) - { - IntPtr unmanagedString = IntPtr.Zero; - try - { - // convert secure string to byte array - unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); - ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(Marshal.PtrToStringUni(unmanagedString)), keyBytes, out byteCount); - } - finally - { - if (unmanagedString != IntPtr.Zero) - { - Marshal.ZeroFreeBSTR(unmanagedString); - } - } - } - else - ecdsa.ImportPkcs8PrivateKey(keyBytes, out byteCount); - - var derBytes = ecdsa.SignHash(dataToSign, DSASignatureFormat.Rfc3279DerSequence); - var signedString = System.Convert.ToBase64String(derBytes); - - return signedString; - {{/net60OrLater}} - {{^net60OrLater}} - throw new Exception("ECDSA signing is supported only on NETCOREAPP3_0 and above"); - {{/net60OrLater}} - } - - /// - /// Convert ANS1 format to DER format. Not recommended to use because it generate inavlid signature occationally. - /// - /// - /// - private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) - { - var derBytes = new List(); - byte derLength = 68; //default length for ECDSA code signing bit 0x44 - byte rbytesLength = 32; //R length 0x20 - byte sbytesLength = 32; //S length 0x20 - var rBytes = new List(); - var sBytes = new List(); - for (int i = 0; i < 32; i++) - { - rBytes.Add(signedBytes[i]); - } - for (int i = 32; i < 64; i++) - { - sBytes.Add(signedBytes[i]); - } - - if (rBytes[0] > 0x7F) - { - derLength++; - rbytesLength++; - var tempBytes = new List(); - tempBytes.AddRange(rBytes); - rBytes.Clear(); - rBytes.Add(0x00); - rBytes.AddRange(tempBytes); - } - - if (sBytes[0] > 0x7F) - { - derLength++; - sbytesLength++; - var tempBytes = new List(); - tempBytes.AddRange(sBytes); - sBytes.Clear(); - sBytes.Add(0x00); - sBytes.AddRange(tempBytes); - - } - - derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r length, type and r bytes - - derBytes.Add(2); //tag for integer - derBytes.Add(rbytesLength); //length of r - derBytes.AddRange(rBytes); - - derBytes.Add(2); //tag for integer - derBytes.Add(sbytesLength); //length of s - derBytes.AddRange(sBytes); - return derBytes.ToArray(); - } - - private RSACryptoServiceProvider GetRSAProviderFromPemFile(string keyString, SecureString keyPassPhrase = null) - { - if (string.IsNullOrEmpty(KeyString)) - { - throw new Exception("No API key has been provided."); - } - - const string pempubheader = "-----BEGIN PUBLIC KEY-----"; - const string pempubfooter = "-----END PUBLIC KEY-----"; - bool isPrivateKeyFile = true; - byte[] pemkey = null; - string pemstr = keyString; - - if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter)) - { - isPrivateKeyFile = false; - } - - if (isPrivateKeyFile) - { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); - if (pemkey == null) - { - return null; - } - return DecodeRSAPrivateKey(pemkey); - } - return null; - } - - private byte[] ConvertPrivateKeyToBytes(string instr, SecureString keyPassPhrase = null) - { - const string pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; - const string pemprivfooter = "-----END RSA PRIVATE KEY-----"; - string pemstr = instr.Trim(); - byte[] binkey; - - if (!pemstr.StartsWith(pemprivheader) || !pemstr.EndsWith(pemprivfooter)) - { - return null; - } - - StringBuilder sb = new StringBuilder(pemstr); - sb.Replace(pemprivheader, ""); - sb.Replace(pemprivfooter, ""); - string pvkstr = sb.ToString().Trim(); - - try - { // if there are no PEM encryption info lines, this is an UNencrypted PEM private key - binkey = Convert.FromBase64String(pvkstr); - return binkey; - } - catch (System.FormatException) - { - StringReader str = new StringReader(pvkstr); - - //-------- read PEM encryption info. lines and extract salt ----- - if (!str.ReadLine().StartsWith("Proc-Type: 4,ENCRYPTED")) - { - return null; - } - string saltline = str.ReadLine(); - if (!saltline.StartsWith("DEK-Info: DES-EDE3-CBC,")) - { - return null; - } - string saltstr = saltline.Substring(saltline.IndexOf(",") + 1).Trim(); - byte[] salt = new byte[saltstr.Length / 2]; - for (int i = 0; i < salt.Length; i++) - salt[i] = Convert.ToByte(saltstr.Substring(i * 2, 2), 16); - if (str.ReadLine() != "") - { - return null; - } - - //------ remaining b64 data is encrypted RSA key ---- - string encryptedstr = str.ReadToEnd(); - - try - { //should have b64 encrypted RSA key now - binkey = Convert.FromBase64String(encryptedstr); - } - catch (System.FormatException) - { //data is not in base64 format - return null; - } - - byte[] deskey = GetEncryptedKey(salt, keyPassPhrase, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes - if (deskey == null) - { - return null; - } - - //------ Decrypt the encrypted 3des-encrypted RSA private key ------ - byte[] rsakey = DecryptKey(binkey, deskey, salt); //OpenSSL uses salt value in PEM header also as 3DES IV - return rsakey; - } - } - - private RSACryptoServiceProvider DecodeRSAPrivateKey(byte[] privkey) - { - byte[] bytesModulus, bytesE, bytesD, bytesP, bytesQ, bytesDP, bytesDQ, bytesIQ; - - // --------- Set up stream to decode the asn.1 encoded RSA private key ------ - MemoryStream mem = new MemoryStream(privkey); - BinaryReader binr = new BinaryReader(mem); //wrap Memory Stream with BinaryReader for easy reading - byte bt = 0; - ushort twobytes = 0; - int elems = 0; - try - { - twobytes = binr.ReadUInt16(); - if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81) - { - binr.ReadByte(); //advance 1 byte - } - else if (twobytes == 0x8230) - { - binr.ReadInt16(); //advance 2 bytes - } - else - { - return null; - } - - twobytes = binr.ReadUInt16(); - if (twobytes != 0x0102) //version number - { - return null; - } - bt = binr.ReadByte(); - if (bt != 0x00) - { - return null; - } - - //------ all private key components are Integer sequences ---- - elems = GetIntegerSize(binr); - bytesModulus = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - bytesE = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - bytesD = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - bytesP = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - bytesQ = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - bytesDP = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - bytesDQ = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - bytesIQ = binr.ReadBytes(elems); - - // ------- create RSACryptoServiceProvider instance and initialize with public key ----- - RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(); - RSAParameters RSAparams = new RSAParameters(); - RSAparams.Modulus = bytesModulus; - RSAparams.Exponent = bytesE; - RSAparams.D = bytesD; - RSAparams.P = bytesP; - RSAparams.Q = bytesQ; - RSAparams.DP = bytesDP; - RSAparams.DQ = bytesDQ; - RSAparams.InverseQ = bytesIQ; - RSA.ImportParameters(RSAparams); - return RSA; - } - catch (Exception) - { - return null; - } - finally - { - binr.Close(); - } - } - - private int GetIntegerSize(BinaryReader binr) - { - byte bt = 0; - byte lowbyte = 0x00; - byte highbyte = 0x00; - int count = 0; - bt = binr.ReadByte(); - if (bt != 0x02) //expect integer - { - return 0; - } - bt = binr.ReadByte(); - - if (bt == 0x81) - { - count = binr.ReadByte(); // data size in next byte - } - else if (bt == 0x82) - { - highbyte = binr.ReadByte(); // data size in next 2 bytes - lowbyte = binr.ReadByte(); - byte[] modint = { lowbyte, highbyte, 0x00, 0x00 }; - count = BitConverter.ToInt32(modint, 0); - } - else - { - count = bt; // we already have the data size - } - while (binr.ReadByte() == 0x00) - { - //remove high order zeros in data - count -= 1; - } - binr.BaseStream.Seek(-1, SeekOrigin.Current); - //last ReadByte wasn't a removed zero, so back up a byte - return count; - } - - private byte[] GetEncryptedKey(byte[] salt, SecureString secpswd, int count, int miter) - { - IntPtr unmanagedPswd = IntPtr.Zero; - const int HASHLENGTH = 16; //MD5 bytes - byte[] keymaterial = new byte[HASHLENGTH * miter]; //to store concatenated Mi hashed results - - byte[] psbytes = new byte[secpswd.Length]; - unmanagedPswd = Marshal.SecureStringToGlobalAllocAnsi(secpswd); - Marshal.Copy(unmanagedPswd, psbytes, 0, psbytes.Length); - Marshal.ZeroFreeGlobalAllocAnsi(unmanagedPswd); - - // --- concatenate salt and pswd bytes into fixed data array --- - byte[] data00 = new byte[psbytes.Length + salt.Length]; - Array.Copy(psbytes, data00, psbytes.Length); //copy the pswd bytes - Array.Copy(salt, 0, data00, psbytes.Length, salt.Length); //concatenate the salt bytes - - // ---- do multi-hashing and concatenate results D1, D2 ... into keymaterial bytes ---- - MD5 md5 = MD5.Create(); - byte[] result = null; - byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget - - for (int j = 0; j < miter; j++) - { - // ---- Now hash consecutively for count times ------ - if (j == 0) - { - result = data00; //initialize - } - else - { - Array.Copy(result, hashtarget, result.Length); - Array.Copy(data00, 0, hashtarget, result.Length, data00.Length); - result = hashtarget; - } - - for (int i = 0; i < count; i++) - { - result = md5.ComputeHash(result); - } - Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //concatenate to keymaterial - } - byte[] deskey = new byte[24]; - Array.Copy(keymaterial, deskey, deskey.Length); - - Array.Clear(psbytes, 0, psbytes.Length); - Array.Clear(data00, 0, data00.Length); - Array.Clear(result, 0, result.Length); - Array.Clear(hashtarget, 0, hashtarget.Length); - Array.Clear(keymaterial, 0, keymaterial.Length); - return deskey; - } - - private byte[] DecryptKey(byte[] cipherData, byte[] desKey, byte[] IV) - { - MemoryStream memst = new MemoryStream(); - TripleDES alg = TripleDES.Create(); - alg.Key = desKey; - alg.IV = IV; - try - { - CryptoStream cs = new CryptoStream(memst, alg.CreateDecryptor(), CryptoStreamMode.Write); - cs.Write(cipherData, 0, cipherData.Length); - cs.Close(); - } - catch (Exception) - { - return null; - } - byte[] decryptedData = memst.ToArray(); - return decryptedData; - } - - /// - /// Detect the key type from the pem file. - /// - /// api key in string format - /// Private Key Type - private PrivateKeyType GetKeyType(string keyString) - { - string[] key = null; - - if (string.IsNullOrEmpty(keyString)) - { - throw new Exception("No API key has been provided."); - } - - const string ecPrivateKeyHeader = "BEGIN EC PRIVATE KEY"; - const string ecPrivateKeyFooter = "END EC PRIVATE KEY"; - const string rsaPrivateKeyHeader = "BEGIN RSA PRIVATE KEY"; - const string rsaPrivateFooter = "END RSA PRIVATE KEY"; - //var pkcs8Header = "BEGIN PRIVATE KEY"; - //var pkcs8Footer = "END PRIVATE KEY"; - PrivateKeyType keyType; - key = KeyString.TrimEnd().Split('\n'); - - if (key[0].Contains(rsaPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(rsaPrivateFooter)) - { - keyType = PrivateKeyType.RSA; - } - else if (key[0].Contains(ecPrivateKeyHeader) && - key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - keyType = PrivateKeyType.ECDSA; - } - else - { - throw new Exception("The key file path does not exist or key is invalid or key is not supported"); - } - return keyType; - } - - /// - /// Read the api key form the api key file path and stored it in KeyString property. - /// - /// api key file path - private string ReadApiKeyFromFile(string apiKeyFilePath) - { - string apiKeyString = null; - - if(File.Exists(apiKeyFilePath)) - { - apiKeyString = File.ReadAllText(apiKeyFilePath); - } - else - { - throw new Exception("Provided API key file path does not exists."); - } - return apiKeyString; - } - } -} diff --git a/generation/templates/IApiAccessor.mustache b/generation/templates/IApiAccessor.mustache deleted file mode 100644 index a269f56e..00000000 --- a/generation/templates/IApiAccessor.mustache +++ /dev/null @@ -1,29 +0,0 @@ -{{>partial_header}} - -using System; - -namespace {{packageName}}.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - {{>visibility}} interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - IReadableConfiguration Configuration { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - string GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/generation/templates/IAsynchronousClient.mustache b/generation/templates/IAsynchronousClient.mustache deleted file mode 100644 index f0c88fae..00000000 --- a/generation/templates/IAsynchronousClient.mustache +++ /dev/null @@ -1,92 +0,0 @@ -{{>partial_header}} - -using System; -using System.Threading.Tasks; - -namespace {{packageName}}.Client -{ - /// - /// Contract for Asynchronous RESTful API interactions. - /// - /// This interface allows consumers to provide a custom API accessor client. - /// - public interface IAsynchronousClient - { - /// - /// Executes a non-blocking call to some using the GET http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the POST http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the PUT http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the DELETE http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the HEAD http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the OPTIONS http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the PATCH http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - } -} diff --git a/generation/templates/IReadableConfiguration.mustache b/generation/templates/IReadableConfiguration.mustache deleted file mode 100644 index 78c998b3..00000000 --- a/generation/templates/IReadableConfiguration.mustache +++ /dev/null @@ -1,172 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections.Generic; -using System.Net; -using System.Net.Security; -using System.Security.Cryptography.X509Certificates; -{{#useRestSharp}} -{{#hasOAuthMethods}}using {{packageName}}.Client.Auth; -{{/hasOAuthMethods}} -{{/useRestSharp}} - -namespace {{packageName}}.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - {{#useRestSharp}} - {{#hasOAuthMethods}} - /// - /// Gets the OAuth token URL. - /// - /// OAuth Token URL. - string OAuthTokenUrl { get; } - - /// - /// Gets the OAuth client ID. - /// - /// OAuth Client ID. - string OAuthClientId { get; } - - /// - /// Gets the OAuth client secret. - /// - /// OAuth Client Secret. - string OAuthClientSecret { get; } - - /// - /// Gets the OAuth flow. - /// - /// OAuth Flow. - OAuthFlow? OAuthFlow { get; } - - {{/hasOAuthMethods}} - {{/useRestSharp}} - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - [Obsolete("Use DefaultHeaders instead.")] - IDictionary DefaultHeader { get; } - - /// - /// Gets the default headers. - /// - /// Default headers. - IDictionary DefaultHeaders { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the proxy. - /// - /// Proxy. - WebProxy Proxy { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - bool UseDefaultCredentials { get; } - - /// - /// Get the servers associated with the operation. - /// - /// Operation servers. - IReadOnlyDictionary>> OperationServers { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - - /// - /// Gets the Operation server url at the provided index. - /// - /// Operation server name. - /// Index of the operation server settings. - /// - string GetOperationServerUrl(string operation, int index); - - /// - /// Gets certificate collection to be sent with requests. - /// - /// X509 Certificate collection. - X509CertificateCollection ClientCertificates { get; } - {{#hasHttpSignatureMethods}} - - /// - /// Gets the HttpSigning configuration - /// - HttpSigningConfiguration HttpSigningConfiguration { get; } - {{/hasHttpSignatureMethods}} - - /// - /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and - /// overriding certificate errors in the scope of a request. - /// - RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } - } -} diff --git a/generation/templates/ISynchronousClient.mustache b/generation/templates/ISynchronousClient.mustache deleted file mode 100644 index c09bfbfe..00000000 --- a/generation/templates/ISynchronousClient.mustache +++ /dev/null @@ -1,85 +0,0 @@ -{{>partial_header}} - -using System; -using System.IO; - -namespace {{packageName}}.Client -{ - /// - /// Contract for Synchronous RESTful API interactions. - /// - /// This interface allows consumers to provide a custom API accessor client. - /// - public interface ISynchronousClient - { - /// - /// Executes a blocking call to some using the GET http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the POST http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the PUT http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the DELETE http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the HEAD http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the OPTIONS http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the PATCH http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null); - } -} diff --git a/generation/templates/JsonSubTypesTests.mustache b/generation/templates/JsonSubTypesTests.mustache deleted file mode 100644 index 55b1d518..00000000 --- a/generation/templates/JsonSubTypesTests.mustache +++ /dev/null @@ -1,125 +0,0 @@ -{{>partial_header}} - -using System.Collections.Generic; -using System.Linq; -using JsonSubTypes; -using Newtonsoft.Json; -using NUnit.Framework; - -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.{{modelPackage}}; -using {{packageName}}.Client; - -namespace {{packageName}}.Test.Client -{ - public class JsonSubTypesTests - { - [Test] - public void TestSimpleJsonSubTypesExample() - { - var animal = - JsonConvert.DeserializeObject("{\"Kind\":\"Dog\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (animal as Dog)?.Breed); - } - - [Test] - public void DeserializeObjectWithCustomMapping() - { - var animal = - JsonConvert.DeserializeObject("{\"Sound\":\"Bark\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (animal as Dog2)?.Breed); - } - - [Test] - public void DeserializeObjectMappingByPropertyPresence() - { - string json = - "[{\"Department\":\"Department1\",\"JobTitle\":\"JobTitle1\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}," + - "{\"Department\":\"Department1\",\"JobTitle\":\"JobTitle1\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}," + - "{\"Skill\":\"Painter\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}]"; - - - var persons = JsonConvert.DeserializeObject>(json); - Assert.AreEqual("Painter", (persons.Last() as Artist)?.Skill); - } - } - - [JsonConverter(typeof(JsonSubtypes), "Kind")] - public interface IAnimal - { - string Kind { get; } - } - - public class Dog : IAnimal - { - public Dog() - { - Kind = "Dog"; - } - - public string Kind { get; } - public string Breed { get; set; } - } - - class Cat : IAnimal - { - public Cat() - { - Kind = "Cat"; - } - - public string Kind { get; } - bool Declawed { get; set; } - } - - [JsonConverter(typeof(JsonSubtypes), "Sound")] - [JsonSubtypes.KnownSubType(typeof(Dog2), "Bark")] - [JsonSubtypes.KnownSubType(typeof(Cat2), "Meow")] - public class Animal2 - { - public virtual string Sound { get; } - public string Color { get; set; } - } - - public class Dog2 : Animal2 - { - public Dog2() - { - Sound = "Bark"; - } - - public override string Sound { get; } - public string Breed { get; set; } - } - - public class Cat2 : Animal2 - { - public Cat2() - { - Sound = "Meow"; - } - - public override string Sound { get; } - public bool Declawed { get; set; } - } - - [JsonConverter(typeof(JsonSubtypes))] - [JsonSubtypes.KnownSubTypeWithProperty(typeof(Employee), "JobTitle")] - [JsonSubtypes.KnownSubTypeWithProperty(typeof(Artist), "Skill")] - public class Person - { - public string FirstName { get; set; } - public string LastName { get; set; } - } - - public class Employee : Person - { - public string Department { get; set; } - public string JobTitle { get; set; } - } - - public class Artist : Person - { - public string Skill { get; set; } - } -} diff --git a/generation/templates/Multimap.mustache b/generation/templates/Multimap.mustache deleted file mode 100644 index 8624af00..00000000 --- a/generation/templates/Multimap.mustache +++ /dev/null @@ -1,287 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace {{packageName}}.Client -{ - /// - /// A dictionary in which one key has many associated values. - /// - /// The type of the key - /// The type of the value associated with the key. - public class Multimap : IDictionary> - { - #region Private Fields - - private readonly Dictionary> _dictionary; - - #endregion Private Fields - - #region Constructors - - /// - /// Empty Constructor. - /// - public Multimap() - { - _dictionary = new Dictionary>(); - } - - /// - /// Constructor with comparer. - /// - /// - public Multimap(IEqualityComparer comparer) - { - _dictionary = new Dictionary>(comparer); - } - - #endregion Constructors - - #region Enumerators - - /// - /// To get the enumerator. - /// - /// Enumerator - public IEnumerator>> GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - /// - /// To get the enumerator. - /// - /// Enumerator - IEnumerator IEnumerable.GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - #endregion Enumerators - - #region Public Members - /// - /// Add values to Multimap - /// - /// Key value pair - public void Add(KeyValuePair> item) - { - if (!TryAdd(item.Key, item.Value)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - - /// - /// Add Multimap to Multimap - /// - /// Multimap - public void Add(Multimap multimap) - { - foreach (var item in multimap) - { - if (!TryAdd(item.Key, item.Value)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - } - - /// - /// Clear Multimap - /// - public void Clear() - { - _dictionary.Clear(); - } - - /// - /// Determines whether Multimap contains the specified item. - /// - /// Key value pair - /// Method needs to be implemented - /// true if the Multimap contains the item; otherwise, false. - public bool Contains(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - /// - /// Copy items of the Multimap to an array, - /// starting at a particular array index. - /// - /// The array that is the destination of the items copied - /// from Multimap. The array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - /// Method needs to be implemented - public void CopyTo(KeyValuePair>[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - /// - /// Removes the specified item from the Multimap. - /// - /// Key value pair - /// true if the item is successfully removed; otherwise, false. - /// Method needs to be implemented - public bool Remove(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - /// - /// Gets the number of items contained in the Multimap. - /// - public int Count => _dictionary.Count; - - /// - /// Gets a value indicating whether the Multimap is read-only. - /// - public bool IsReadOnly => false; - - /// - /// Adds an item with the provided key and value to the Multimap. - /// - /// 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 the value to Multimap. - public void Add(TKey key, IList value) - { - if (value != null && value.Count > 0) - { - if (_dictionary.TryGetValue(key, out var list)) - { - foreach (var k in value) list.Add(k); - } - else - { - list = new List(value); - if (!TryAdd(key, list)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - } - } - - /// - /// Determines whether the Multimap contains an item with the specified key. - /// - /// The key to locate in the Multimap. - /// true if the Multimap contains an item with - /// the key; otherwise, false. - public bool ContainsKey(TKey key) - { - return _dictionary.ContainsKey(key); - } - - /// - /// Removes item with the specified key from the Multimap. - /// - /// The key to locate in the Multimap. - /// true if the item is successfully removed; otherwise, false. - public bool Remove(TKey key) - { - return TryRemove(key, out var _); - } - - /// - /// Gets the value associated with the specified key. - /// - /// The key whose value to get. - /// When this method returns, the value associated with the specified key, if the - /// key is found; otherwise, the default value for the type of the value parameter. - /// This parameter is passed uninitialized. - /// true if the object that implements Multimap contains - /// an item with the specified key; otherwise, false. - public bool TryGetValue(TKey key, out IList value) - { - return _dictionary.TryGetValue(key, out value); - } - - /// - /// Gets or sets the item with the specified key. - /// - /// The key of the item to get or set. - /// The value of the specified key. - public IList this[TKey key] - { - get => _dictionary[key]; - set => _dictionary[key] = value; - } - - /// - /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. - /// - public ICollection Keys => _dictionary.Keys; - - /// - /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. - /// - public ICollection> Values => _dictionary.Values; - - /// - /// Copy the items of the Multimap to an System.Array, - /// starting at a particular System.Array index. - /// - /// The one-dimensional System.Array that is the destination of the items copied - /// from Multimap. The System.Array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - public void CopyTo(Array array, int index) - { - ((ICollection)_dictionary).CopyTo(array, index); - } - - /// - /// Adds an item with the provided key and value to the Multimap. - /// - /// 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) - { - if (value != null) - { - if (_dictionary.TryGetValue(key, out var list)) - { - list.Add(value); - } - else - { - list = new List { value }; - if (!TryAdd(key, list)) - throw new InvalidOperationException("Could not add value to Multimap."); - } - } - } - - #endregion Public Members - - #region Private Members - - /** - * Helper method to encapsulate generator differences between dictionary types. - */ - private bool TryRemove(TKey key, out IList value) - { - _dictionary.TryGetValue(key, out value); - return _dictionary.Remove(key); - } - - /** - * Helper method to encapsulate generator differences between dictionary types. - */ - private bool TryAdd(TKey key, IList value) - { - try - { - _dictionary.Add(key, value); - } - catch (ArgumentException) - { - return false; - } - - return true; - } - #endregion Private Members - } -} diff --git a/generation/templates/NullConditionalParameter.mustache b/generation/templates/NullConditionalParameter.mustache deleted file mode 100644 index d8ad9266..00000000 --- a/generation/templates/NullConditionalParameter.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file diff --git a/generation/templates/NullConditionalProperty.mustache b/generation/templates/NullConditionalProperty.mustache deleted file mode 100644 index 7dcafa80..00000000 --- a/generation/templates/NullConditionalProperty.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#lambda.first}}{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} \ No newline at end of file diff --git a/generation/templates/OpenAPIDateConverter.mustache b/generation/templates/OpenAPIDateConverter.mustache deleted file mode 100644 index d7905102..00000000 --- a/generation/templates/OpenAPIDateConverter.mustache +++ /dev/null @@ -1,21 +0,0 @@ -{{>partial_header}} -using Newtonsoft.Json.Converters; - -namespace {{packageName}}.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/generation/templates/README.mustache b/generation/templates/README.mustache index 9b6c23b9..d56a86e8 100644 --- a/generation/templates/README.mustache +++ b/generation/templates/README.mustache @@ -1,5 +1,37 @@ -# {{packageName}} - the C# library for the {{appName}} +[![ShipEngine](https://shipengine.github.io/img/shipengine-logo-wide.png)](https://shipengine.com) +# ShipEngine .NET SDK + +### The official ShipEngine SDK for .NET + +![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/ShipEngine) +![GitHub](https://img.shields.io/github/license/ShipEngine/shipengine-dotnet) + +[![Build Status](https://github.com/ShipEngine/shipengine-dotnet/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/ShipEngine/shipengine-dotnet/actions/workflows/ci-cd.yaml) +[![Coverage Status](https://coveralls.io/repos/github/ShipEngine/shipengine-dotnet/badge.svg?branch=main)](https://coveralls.io/github/ShipEngine/shipengine-dotnet?branch=main) + +[![OS Compatibility](https://shipengine.github.io/img/badges/os-badges.svg)](https://github.com/ShipEngine/shipengine-dotnet/actions) + +[Nuget Page](https://www.nuget.org/packages/ShipEngine/) + +## Quick Start + +Install ShipEngine .NET SDK via the [.NET CLI](https://docs.microsoft.com/en-us/dotnet/core/tools/). + +```bash +dotnet add package ShipEngine +``` + +The only configuration requirement is an [API key](https://www.shipengine.com/docs/auth/#api-keys). + +```csharp +using ShipEngineSDK; + +var shipengine = new ShipEngine("___YOUR_API_KEY_HERE__"); +``` + + +## Overview {{#appDescriptionWithNewLines}} {{{.}}} {{/appDescriptionWithNewLines}} @@ -25,243 +57,91 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap - Mono/Xamarin >=vNext {{/netStandard}} - -## Dependencies - -{{#useRestSharp}} -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later -{{/useRestSharp}} -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later -{{#useCompareNetObjects}} -- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later -{{/useCompareNetObjects}} -{{#validatable}} -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later -{{/validatable}} - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: -``` -{{#useRestSharp}} -Install-Package RestSharp -{{/useRestSharp}} -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -{{#validatable}} -Install-Package System.ComponentModel.Annotations -{{/validatable}} -{{#useCompareNetObjects}} -Install-Package CompareNETObjects -{{/useCompareNetObjects}} -``` -{{#useRestSharp}} + +## Documentation for API Endpoints -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742). -NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406). +All URIs are relative to *{{{basePath}}}* -{{/useRestSharp}} - -## Installation -{{#netStandard}} -Generate the DLL using your preferred tool (e.g. `dotnet build`) -{{/netStandard}} -{{^netStandard}} -Run the following command to generate the DLL -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` -{{/netStandard}} +API | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: -```csharp -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; -``` -{{^netStandard}} - -## Packaging + +## Documentation for Models + +{{#modelPackage}} +{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} +{{/modelPackage}} +{{^modelPackage}} +No model defined in this package +{{/modelPackage}} -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: +## Legacy Methods -``` -nuget pack -Build -OutputDirectory out {{packageName}}.csproj -``` +These methods have been deprecated in favor of the methods listed above, but are still in the SDK. -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. +- [`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/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. -{{/netStandard}} - -## Usage +## Contributing -To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` -```csharp -Configuration c = new Configuration(); -System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/"); -webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; -c.Proxy = webProxy; -``` -{{#useHttpClient}} +Contributions, enhancements, and bug-fixes are welcome! [Open an issue](https://github.com/ShipEngine/shipengine-dotnet/issues) on GitHub and [submit a pull request](https://github.com/ShipEngine/shipengine-dotnet/pulls). -### Connections -Each ApiClass (properly the ApiClient inside it) will create an instance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method. +### Building -To better manager the connections it's a common practice to reuse the HttpClient and HttpClientHandler (see [here](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net) for details). To use your own HttpClient instance just pass it to the ApiClass constructor. +To build the project locally on your computer: -```csharp -HttpClientHandler yourHandler = new HttpClientHandler(); -HttpClient yourHttpClient = new HttpClient(yourHandler); -var api = new YourApiClass(yourHttpClient, yourHandler); -``` +1. **Clone this repo**
+ `git clone https://github.com/ShipEngine/shipengine-dotnet.git` -If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory. +2. **Install [.NET 5.x](https://dotnet.microsoft.com/download)** -```csharp -HttpClient yourHttpClient = new HttpClient(); -var api = new YourApiClass(yourHttpClient); -``` -You'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available. +3. **Install dependencies**
+ `dotnet restore` -Here an example of DI setup in a sample web project: +4. **Build the code**
+ `dotnet build` -```csharp -services.AddHttpClient(httpClient => - new PetApi(httpClient)); -``` +5. **Format the code**
+ `dotnet format` -{{/useHttpClient}} +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` - -## Getting Started +### Generating from OpenAPI -```csharp -using System.Collections.Generic; -using System.Diagnostics; -{{#useHttpClient}} -using System.Net.Http; -{{/useHttpClient}} -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; - -namespace Example -{ - public class {{operationId}}Example - { - public static void Main() - { -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - Configuration config = new Configuration(); - config.BasePath = "{{{basePath}}}"; - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - config.Username = "YOUR_USERNAME"; - config.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure Bearer token for authorization: {{{name}}} - config.AccessToken = "YOUR_BEARER_TOKEN"; - {{/isBasicBearer}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - config.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - config.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - - {{/hasAuthMethods}} - {{#useHttpClient}} - // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes - HttpClient httpClient = new HttpClient(); - HttpClientHandler httpClientHandler = new HttpClientHandler(); - var apiInstance = new {{classname}}(httpClient, config, httpClientHandler); - {{/useHttpClient}} - {{^useHttpClient}} - var apiInstance = new {{classname}}(config); - {{/useHttpClient}} - {{#allParams}} - {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{/allParams}} - - try - { - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.WriteLine(result);{{/returnType}} - } - catch (ApiException e) - { - Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} - } - } -} +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. + +The templates for autogeneration were extracted using the command: +```bash +npx @openapitools/openapi-generator-cli author template -g csharp -o generation/templates ``` - -## Documentation for API Endpoints +## Release +Create a [fork](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) for your changes. -All URIs are relative to *{{{basePath}}}* +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. -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} +In the `ShipEngineSDK.csproj` file, update to the desired version (using [semantic versioning](https://semver.org/)) and push to your fork. - -## Documentation for Models +Run `dotnet format` -{{#modelPackage}} -{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} -{{/modelPackage}} -{{^modelPackage}} -No model defined in this package -{{/modelPackage}} +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. - -## Documentation for Authorization - -{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} -{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} -{{#authMethods}} - -### {{name}} - -{{#isApiKey}}- **Type**: API key -- **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasicBasic}}- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}}- **Type**: Bearer Authentication -{{/isBasicBearer}} -{{#isHttpSignature}}- **Type**: HTTP signature authentication -{{/isHttpSignature}} -{{#isOAuth}}- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - {{scope}}: {{description}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} diff --git a/generation/templates/ReadOnlyDictionary.mustache b/generation/templates/ReadOnlyDictionary.mustache deleted file mode 100644 index 1299b243..00000000 --- a/generation/templates/ReadOnlyDictionary.mustache +++ /dev/null @@ -1,137 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace {{packageName}}.Client -{ - public class ReadOnlyDictionary : IDictionary - { - private IDictionary _dictionaryImplementation; - public IEnumerator> GetEnumerator() - { - return _dictionaryImplementation.GetEnumerator(); - } - - public ReadOnlyDictionary() - { - _dictionaryImplementation = new Dictionary(); - } - - public ReadOnlyDictionary(IDictionary dictionaryImplementation) - { - if (dictionaryImplementation == null) throw new ArgumentNullException("dictionaryImplementation"); - _dictionaryImplementation = dictionaryImplementation; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return ((IEnumerable) _dictionaryImplementation).GetEnumerator(); - } - - public void Add(KeyValuePair item) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public void Clear() - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool Contains(KeyValuePair item) - { - return _dictionaryImplementation.Contains(item); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - _dictionaryImplementation.CopyTo(array, arrayIndex); - } - - public bool Remove(KeyValuePair item) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public int Count - { - get { return _dictionaryImplementation.Count; } - } - - public bool IsReadOnly - { - get { return true; } - } - - public void Add(T key, K value) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool ContainsKey(T key) - { - return _dictionaryImplementation.ContainsKey(key); - } - - public bool Remove(T key) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool TryGetValue(T key, out K value) - { - return _dictionaryImplementation.TryGetValue(key, out value); - } - - public K this[T key] - { - get { return _dictionaryImplementation[key]; } - set - { - throw new ReadonlyOperationException("This instance is readonly."); - - } - } - - public ICollection Keys - { - get { return _dictionaryImplementation.Keys; } - } - - public ICollection Values - { - get { return _dictionaryImplementation.Values; } - } - } - - [Serializable] - public class ReadonlyOperationException : Exception - { - // - // For guidelines regarding the creation of new exception types, see - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp - // and - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp - // - - public ReadonlyOperationException() - { - } - - public ReadonlyOperationException(string message) : base(message) - { - } - - public ReadonlyOperationException(string message, Exception inner) : base(message, inner) - { - } - - protected ReadonlyOperationException( - SerializationInfo info, - StreamingContext context) : base(info, context) - { - } - } -} diff --git a/generation/templates/RequestOptions.mustache b/generation/templates/RequestOptions.mustache deleted file mode 100644 index cfc14692..00000000 --- a/generation/templates/RequestOptions.mustache +++ /dev/null @@ -1,87 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; - -namespace {{packageName}}.Client -{ - /// - /// A container for generalized request inputs. This type allows consumers to extend the request functionality - /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). - /// - public class RequestOptions - { - /// - /// Parameters to be bound to path parts of the Request's URL - /// - public Dictionary PathParameters { get; set; } - - /// - /// Query parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap QueryParameters { get; set; } - - /// - /// Header parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap HeaderParameters { get; set; } - - /// - /// Form parameters to be sent along with the request. - /// - public Dictionary FormParameters { get; set; } - - {{#supportsFileParameters}} - /// - /// File parameters to be sent along with the request. - /// - public Multimap FileParameters { get; set; } - {{/supportsFileParameters}} - - /// - /// Cookies to be sent along with the request. - /// - public List Cookies { get; set; } - - /// - /// Operation associated with the request path. - /// - public string Operation { get; set; } - - /// - /// Index associated with the operation. - /// - public int OperationIndex { get; set; } - - /// - /// Any data associated with a request body. - /// - public Object Data { get; set; } - - {{#hasOAuthMethods}} - /// - /// If request should be authenticated with OAuth. - /// - public bool OAuth { get; set; } - - {{/hasOAuthMethods}} - /// - /// Constructs a new instance of - /// - public RequestOptions() - { - PathParameters = new Dictionary(); - QueryParameters = new Multimap(); - HeaderParameters = new Multimap(); - FormParameters = new Dictionary(); - {{#supportsFileParameters}} - FileParameters = new Multimap(); - {{/supportsFileParameters}} - Cookies = new List(); - } - } -} diff --git a/generation/templates/RetryConfiguration.mustache b/generation/templates/RetryConfiguration.mustache deleted file mode 100644 index 93ba14d9..00000000 --- a/generation/templates/RetryConfiguration.mustache +++ /dev/null @@ -1,41 +0,0 @@ -{{>partial_header}} - -using Polly; -{{#useRestSharp}} -using RestSharp; -{{/useRestSharp}} -{{#useHttpClient}} -using System.Net.Http; -{{/useHttpClient}} - -namespace {{packageName}}.Client -{ - /// - /// Configuration class to set the polly retry policies to be applied to the requests. - /// - public static class RetryConfiguration - { -{{#useRestSharp}} - /// - /// Retry policy - /// - public static Policy RetryPolicy { get; set; } - - /// - /// Async retry policy - /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } -{{/useRestSharp}} -{{#useHttpClient}} - /// - /// Retry policy - /// - public static Policy RetryPolicy { get; set; } - - /// - /// Async retry policy - /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } -{{/useHttpClient}} - } -} diff --git a/generation/templates/Solution.mustache b/generation/templates/Solution.mustache deleted file mode 100644 index 112cc3dc..00000000 --- a/generation/templates/Solution.mustache +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio {{^netStandard}}2012{{/netStandard}}{{#netStandard}}14{{/netStandard}} -VisualStudioVersion = {{^netStandard}}12.0.0.0{{/netStandard}}{{#netStandard}}14.0.25420.1{{/netStandard}} -MinimumVisualStudioVersion = {{^netStandard}}10.0.0.1{{/netStandard}}{{#netStandard}}10.0.40219.1{{/netStandard}} -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" -EndProject -{{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "src\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -{{/excludeTests}}Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {{packageGuid}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU - {{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU - {{packageGuid}}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/generation/templates/TestProject.mustache b/generation/templates/TestProject.mustache deleted file mode 100644 index 2a27f6a9..00000000 --- a/generation/templates/TestProject.mustache +++ /dev/null @@ -1,35 +0,0 @@ - - - - - false - Properties - {{testPackageName}} - {{testPackageName}} - {{testTargetFramework}} - false - 512 - - - - - - - - - {{packageGuid}} - {{packageName}} - - - diff --git a/generation/templates/ValidateRegex.mustache b/generation/templates/ValidateRegex.mustache deleted file mode 100644 index 15cf626d..00000000 --- a/generation/templates/ValidateRegex.mustache +++ /dev/null @@ -1,6 +0,0 @@ -// {{{name}}} ({{{dataType}}}) pattern -Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); -if (!regex{{{name}}}.Match(this.{{{name}}}{{#isUuid}}.ToString(){{/isUuid}}).Success) -{ - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); -} \ No newline at end of file diff --git a/generation/templates/WebRequestPathBuilder.mustache b/generation/templates/WebRequestPathBuilder.mustache deleted file mode 100644 index cc811ae4..00000000 --- a/generation/templates/WebRequestPathBuilder.mustache +++ /dev/null @@ -1,45 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; - -namespace {{packageName}}.Client -{ - /// - /// A URI builder - /// - class WebRequestPathBuilder - { - private string _baseUrl; - private string _path; - private string _query = "?"; - public WebRequestPathBuilder(string baseUrl, string path) - { - _baseUrl = baseUrl; - _path = path; - } - - public void AddPathParameters(Dictionary parameters) - { - foreach (var parameter in parameters) - { - _path = _path.Replace("{" + parameter.Key + "}", Uri.EscapeDataString(parameter.Value)); - } - } - - public void AddQueryParameters(Multimap parameters) - { - foreach (var parameter in parameters) - { - foreach (var value in parameter.Value) - { - _query = _query + parameter.Key + "=" + Uri.EscapeDataString(value) + "&"; - } - } - } - - public string GetFullUri() - { - return _baseUrl + _path + _query.Substring(0, _query.Length - 1); - } - } -} diff --git a/generation/templates/api.mustache b/generation/templates/api.mustache index 6494627b..a4ab4edd 100644 --- a/generation/templates/api.mustache +++ b/generation/templates/api.mustache @@ -1,798 +1,247 @@ {{>partial_header}} +{{#hasOAuthMethods}}using {{packageName}}.Client.Auth; +{{/hasOAuthMethods}} +{{#hasImport}}using {{packageName}}.{{modelPackage}}; +{{/hasImport}} 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 {{packageName}}.Client; -{{#hasOAuthMethods}}using {{packageName}}.Client.Auth; -{{/hasOAuthMethods}} -{{#hasImport}}using {{packageName}}.{{modelPackage}}; -{{/hasImport}} +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; -namespace {{packageName}}.{{apiPackage}} -{ - {{#operations}} +namespace {{packageName}}; +{{#operations}} +/// +/// Represents a collection of functions to interact with the API endpoints +/// +{{>visibility}} partial interface IShipEngine +{ + {{#operation}} /// - /// Represents a collection of functions to interact with the API endpoints + /// {{summary}} {{notes}} /// - {{>visibility}} interface {{interfacePrefix}}{{classname}}Sync : IApiAccessor - { - #region Synchronous Operations - {{#operation}} - /// - /// {{summary}} - /// - {{#notes}} - /// - /// {{.}} - /// - {{/notes}} - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Index associated with the operation. - /// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); + /// Thrown when required argument is null + /// Thrown when fails to make API call + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}CancellationToken cancellationToken = default); - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Index associated with the operation. - /// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0); - {{/operation}} - #endregion Synchronous Operations - } - - {{#supportsAsync}} /// - /// Represents a collection of functions to interact with the API endpoints + /// {{summary}} {{notes}} /// - {{>visibility}} interface {{interfacePrefix}}{{classname}}Async : IApiAccessor - { - #region Asynchronous Operations - {{#operation}} - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - {{/operation}} - #endregion Asynchronous Operations - } - {{/supportsAsync}} + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}(HttpClient methodClient, {{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}CancellationToken cancellationToken = default); + + {{/operation}} +} +/// +/// Represents a collection of functions to interact with the API endpoints +/// +{{>visibility}} partial class ShipEngine +{ + {{#operation}} /// - /// Represents a collection of functions to interact with the API endpoints + /// {{summary}} {{notes}} /// - {{>visibility}} interface {{interfacePrefix}}{{classname}} : {{interfacePrefix}}{{classname}}Sync{{#supportsAsync}}, {{interfacePrefix}}{{classname}}Async{{/supportsAsync}} + /// Thrown when required argument is null + /// Thrown when fails to make API call + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} + {{#isDeprecated}} + [Obsolete] + {{/isDeprecated}} + public Task<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}, {{/allParams}}CancellationToken cancellationToken = default) { - + return {{operationId}}(_client, {{#allParams}}{{paramName}}, {{/allParams}}cancellationToken); } /// - /// Represents a collection of functions to interact with the API endpoints + /// {{summary}} {{notes}} /// - {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}} + /// Thrown when required argument is null + /// Thrown when fails to make API call + /// HttpClient to use for the request + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} + {{#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) { - private {{packageName}}.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public {{classname}}() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public {{classname}}(string basePath) - { - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - new {{packageName}}.Client.Configuration { BasePath = basePath } - ); - this.Client = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - {{#supportsAsync}} - this.AsynchronousClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - {{/supportsAsync}} - this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public {{classname}}({{packageName}}.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - {{#supportsAsync}} - this.AsynchronousClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - {{/supportsAsync}} - ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access.{{#supportsAsync}} - /// The client interface for asynchronous API access.{{/supportsAsync}} - /// The configuration object. - public {{classname}}({{packageName}}.Client.ISynchronousClient client, {{#supportsAsync}}{{packageName}}.Client.IAsynchronousClient asyncClient, {{/supportsAsync}}{{packageName}}.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - {{#supportsAsync}} - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - {{/supportsAsync}} - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - {{#supportsAsync}} - this.AsynchronousClient = asyncClient; - {{/supportsAsync}} - this.Configuration = configuration; - this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - {{#supportsAsync}} - /// - /// The client for accessing this underlying API asynchronously. - /// - public {{packageName}}.Client.IAsynchronousClient AsynchronousClient { get; set; } - {{/supportsAsync}} - - /// - /// The client for accessing this underlying API synchronously. - /// - public {{packageName}}.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() + {{#allParams}} + {{#required}} + {{^vendorExtensions.x-csharp-value-type}} + // verify the required parameter '{{paramName}}' is set + if ({{paramName}} == null) { - return this.Configuration.BasePath; + throw new ArgumentNullException(nameof({{paramName}})); } - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public {{packageName}}.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public {{packageName}}.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } + {{/vendorExtensions.x-csharp-value-type}} + {{/required}} + {{/allParams}} - {{#operation}} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Index associated with the operation. - /// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + RequestOptions requestOptions = new("{{path}}"); + + {{#constantParams}} + {{#isPathParam}} + // Set client side default value of Path Param "{{baseName}}". + requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant path parameter + {{/isPathParam}} + {{/constantParams}} + {{#pathParams}} + {{#required}} + requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // path parameter + {{/required}} + {{^required}} + if ({{paramName}} != null) { - {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} + requestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // path parameter } - - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Index associated with the operation. - /// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0) + {{/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 + {{/isQueryParam}} + {{/constantParams}} + {{#queryParams}} + {{#required}} + {{#isDeepObject}} + {{#items.vars}} + requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/items.vars}} + {{^items}} + requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + {{/items}} + {{/isDeepObject}} + {{^isDeepObject}} + requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/isDeepObject}} + {{/required}} + {{^required}} + if ({{paramName}} != null) { - {{#allParams}} - {{#required}} - {{^vendorExtensions.x-csharp-value-type}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - { - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - } - - {{/vendorExtensions.x-csharp-value-type}} - {{/required}} - {{/allParams}} - {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/consumes}} - }; - - // to determine the Accept header - string[] _accepts = new string[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - {{#pathParams}} - {{#required}} - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - } - {{/required}} - {{/pathParams}} - {{#queryParams}} - {{#required}} {{#isDeepObject}} {{#items.vars}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + if ({{paramName}}.{{name}} != null) + { + requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); + } {{/items.vars}} {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + requestOptions.QueryParameters.Add({{packageName}}.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/isDeepObject}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isDeepObject}} - {{#items.vars}} - if ({{paramName}}.{{name}} != null) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); - } - {{/items.vars}} - {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); - {{/items}} - {{/isDeepObject}} - {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/isDeepObject}} - } - {{/required}} - {{/queryParams}} - {{#headerParams}} - {{#required}} - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - } - {{/required}} - {{/headerParams}} - {{#formParams}} - {{#required}} - {{#isFile}} - {{#isArray}} - {{#supportsFileParameters}} - foreach (var file in {{paramName}}) - { - localVarRequestOptions.FileParameters.Add("{{baseName}}", file); - } - {{/supportsFileParameters}} - {{/isArray}} - {{^isArray}} - {{#supportsFileParameters}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); - {{/supportsFileParameters}} - {{/isArray}} - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter - {{/isFile}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isFile}} - {{#isArray}} - {{#supportsFileParameters}} - foreach (var file in {{paramName}}) - { - localVarRequestOptions.FileParameters.Add("{{baseName}}", file); - } - {{/supportsFileParameters}} - {{/isArray}} - {{^isArray}} - {{#supportsFileParameters}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); - {{/supportsFileParameters}} - {{/isArray}} - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter - {{/isFile}} - } - {{/required}} - {{/formParams}} - {{#bodyParam}} - localVarRequestOptions.Data = {{paramName}}; - {{/bodyParam}} - - localVarRequestOptions.Operation = "{{classname}}.{{operationId}}"; - localVarRequestOptions.OperationIndex = operationIndex; - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInCookie}} - // cookie parameter support - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInCookie}} - {{#isKeyInHeader}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasicBasic}} - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isBasicBearer}} - {{#isOAuth}} - // oauth required - if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{#hasOAuthMethods}} - else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && - !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && - !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && - this.Configuration.OAuthFlow != null) - { - localVarRequestOptions.OAuth = true; - } - {{/hasOAuthMethods}} - } - {{/isOAuth}} - {{#isHttpSignature}} - if (this.Configuration.HttpSigningConfiguration != null) - { - var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); - foreach (var headerItem in HttpSigningHeaders) - { - if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) - { - localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; - } - else - { - localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); - } - } - } - {{/isHttpSignature}} - {{/authMethods}} - - // make the HTTP request - var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; } - - {{#supportsAsync}} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{/required}} + {{/queryParams}} + {{#constantParams}} + {{#isHeaderParam}} + // Set client side default value of Header Param "{{baseName}}". + requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter + {{/isHeaderParam}} + {{/constantParams}} + {{#headerParams}} + {{#required}} + requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // header parameter + {{/required}} + {{^required}} + if ({{paramName}} != null) { - {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);{{/returnType}} + requestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.ParameterToString({{paramName}})); // header parameter } - - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{/required}} + {{/headerParams}} + {{#formParams}} + {{#required}} + {{#isFile}} + {{#isArray}} + {{#supportsFileParameters}} + foreach (var file in {{paramName}}) + { + requestOptions.FileParameters.Add("{{baseName}}", file); + } + {{/supportsFileParameters}} + {{/isArray}} + {{^isArray}} + {{#supportsFileParameters}} + requestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + {{/supportsFileParameters}} + {{/isArray}} + {{/isFile}} + {{^isFile}} + requestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + {{/isFile}} + {{/required}} + {{^required}} + if ({{paramName}} != null) { - {{#allParams}} - {{#required}} - {{^vendorExtensions.x-csharp-value-type}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - { - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - } - - {{/vendorExtensions.x-csharp-value-type}} - {{/required}} - {{/allParams}} - - {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}}, {{/-last}} - {{/consumes}} - }; - - // to determine the Accept header - string[] _accepts = new string[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - {{#constantParams}} - {{#isPathParam}} - // Set client side default value of Path Param "{{baseName}}". - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant path parameter - {{/isPathParam}} - {{/constantParams}} - {{#pathParams}} - {{#required}} - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - } - {{/required}} - {{/pathParams}} - {{#constantParams}} - {{#isQueryParam}} - // Set client side default value of Query Param "{{baseName}}". - localVarRequestOptions.QueryParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant query parameter - {{/isQueryParam}} - {{/constantParams}} - {{#queryParams}} - {{#required}} - {{#isDeepObject}} - {{#items.vars}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); - {{/items.vars}} - {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); - {{/items}} - {{/isDeepObject}} - {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/isDeepObject}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isDeepObject}} - {{#items.vars}} - if ({{paramName}}.{{name}} != null) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}]", {{paramName}}.{{name}})); - } - {{/items.vars}} - {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); - {{/items}} - {{/isDeepObject}} - {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/isDeepObject}} - } - {{/required}} - {{/queryParams}} - {{#constantParams}} - {{#isHeaderParam}} - // Set client side default value of Header Param "{{baseName}}". - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter - {{/isHeaderParam}} - {{/constantParams}} - {{#headerParams}} - {{#required}} - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - } - {{/required}} - {{/headerParams}} - {{#formParams}} - {{#required}} {{#isFile}} {{#isArray}} {{#supportsFileParameters}} foreach (var file in {{paramName}}) { - localVarRequestOptions.FileParameters.Add("{{baseName}}", file); + requestOptions.FileParameters.Add("{{baseName}}", file); } {{/supportsFileParameters}} {{/isArray}} {{^isArray}} {{#supportsFileParameters}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); + requestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); {{/supportsFileParameters}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + requestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter {{/isFile}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isFile}} - {{#isArray}} - {{#supportsFileParameters}} - foreach (var file in {{paramName}}) - { - localVarRequestOptions.FileParameters.Add("{{baseName}}", file); - } - {{/supportsFileParameters}} - {{/isArray}} - {{^isArray}} - {{#supportsFileParameters}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); - {{/supportsFileParameters}} - {{/isArray}} - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter - {{/isFile}} - } - {{/required}} - {{/formParams}} - {{#bodyParam}} - localVarRequestOptions.Data = {{paramName}}; - {{/bodyParam}} - - localVarRequestOptions.Operation = "{{classname}}.{{operationId}}"; - localVarRequestOptions.OperationIndex = operationIndex; - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInCookie}} - // cookie parameter support - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInCookie}} - {{#isKeyInHeader}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasic}} - {{#isBasicBasic}} - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isBasicBearer}} - {{/isBasic}} - {{#isOAuth}} - // oauth required - if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{#hasOAuthMethods}} - else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && - !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && - !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && - this.Configuration.OAuthFlow != null) - { - localVarRequestOptions.OAuth = true; - } - {{/hasOAuthMethods}} - } - {{/isOAuth}} - {{#isHttpSignature}} - if (this.Configuration.HttpSigningConfiguration != null) - { - var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); - foreach (var headerItem in HttpSigningHeaders) - { - if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) - { - localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; - } - else - { - localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); - } - } - } - {{/isHttpSignature}} - {{/authMethods}} - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + } + {{/required}} + {{/formParams}} + {{#bodyParam}} + requestOptions.Data = JsonSerializer.Serialize({{paramName}}, JsonSerializerOptions); + {{/bodyParam}} - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } + requestOptions.Operation = "{{classname}}.{{operationId}}"; - return localVarResponse; - } + var result = await SendHttpRequestAsync<{{{returnType}}}{{^returnType}}Object{{/returnType}}>(HttpMethods.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}, requestOptions, methodClient, _config, cancellationToken); - {{/supportsAsync}} - {{/operation}} + return result; } - {{/operations}} -} + + {{/operation}} +}{{/operations}} \ No newline at end of file diff --git a/generation/templates/api_doc.mustache b/generation/templates/api_doc.mustache index da165463..0a6b787d 100644 --- a/generation/templates/api_doc.mustache +++ b/generation/templates/api_doc.mustache @@ -28,51 +28,16 @@ using System.Diagnostics; {{#useHttpClient}} using System.Net.Http; {{/useHttpClient}} -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; +using {{packageName}}; using {{packageName}}.{{modelPackage}}; namespace Example { public class {{operationId}}Example { - public static void Main() + public static async Task Main() { - Configuration config = new Configuration(); - config.BasePath = "{{{basePath}}}"; - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - config.Username = "YOUR_USERNAME"; - config.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure Bearer token for authorization: {{{name}}} - config.AccessToken = "YOUR_BEARER_TOKEN"; - {{/isBasicBearer}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - config.AddApiKey("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - config.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - - {{/hasAuthMethods}} - {{#useHttpClient}} - // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes - HttpClient httpClient = new HttpClient(); - HttpClientHandler httpClientHandler = new HttpClientHandler(); - var apiInstance = new {{classname}}(httpClient, config, httpClientHandler); - {{/useHttpClient}} - {{^useHttpClient}} - var apiInstance = new {{classname}}(config); - {{/useHttpClient}} + var shipEngine = new ShipEngine("api_key"); {{#allParams}} {{#isPrimitiveType}} var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} @@ -87,10 +52,10 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = await {{/returnType}}shipEngine.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } - catch (ApiException e) + catch (ShipEngineException e) { Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); @@ -101,28 +66,6 @@ namespace Example } ``` -#### Using the {{operationId}}WithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}ApiResponse<{{{.}}}> response = {{/returnType}}apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data);{{/returnType}} -} -catch (ApiException e) -{ - Debug.Print("Exception when calling {{classname}}.{{operationId}}WithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} | Name | Type | Description | Notes | diff --git a/generation/templates/api_test.mustache b/generation/templates/api_test.mustache index 78319978..498de18e 100644 --- a/generation/templates/api_test.mustache +++ b/generation/templates/api_test.mustache @@ -5,17 +5,13 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Reflection; -{{#useRestSharp}} -using RestSharp; -{{/useRestSharp}} using Xunit; - using {{packageName}}.Client; -using {{packageName}}.{{apiPackage}}; {{#hasImport}} // uncomment below to import models -//using {{packageName}}.{{modelPackage}}; +using {{packageName}}.{{modelPackage}}; {{/hasImport}} +using ShipEngineTest; namespace {{packageName}}.Test.Api { @@ -29,13 +25,15 @@ namespace {{packageName}}.Test.Api public class {{classname}}Tests : IDisposable { {{^nonPublicApi}} - private {{classname}} instance; + private ShipEngine instance; {{/nonPublicApi}} public {{classname}}Tests() { {{^nonPublicApi}} - instance = new {{classname}}(); + var config = new Config("test-key"); + var mockShipEngineFixture = new MockShipEngineFixture(config); + instance = mockShipEngineFixture.ShipEngine; {{/nonPublicApi}} } diff --git a/generation/templates/appveyor.mustache b/generation/templates/appveyor.mustache deleted file mode 100644 index eb85fc2a..00000000 --- a/generation/templates/appveyor.mustache +++ /dev/null @@ -1,9 +0,0 @@ -# auto-generated by OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator) -# -image: Visual Studio 2019 -clone_depth: 1 -build_script: -- dotnet build -c Release -- dotnet test -c Release -after_build: -- dotnet pack .\src\{{{packageName}}}\{{{packageName}}}.csproj -o ../../output -c Release --no-build diff --git a/generation/templates/auth/OAuthAuthenticator.mustache b/generation/templates/auth/OAuthAuthenticator.mustache deleted file mode 100644 index ae8f3c75..00000000 --- a/generation/templates/auth/OAuthAuthenticator.mustache +++ /dev/null @@ -1,97 +0,0 @@ -{{>partial_header}} - -using System; -using System.Threading.Tasks; -using Newtonsoft.Json; -using RestSharp; -using RestSharp.Authenticators; - -namespace {{packageName}}.Client.Auth -{ - /// - /// An authenticator for OAuth2 authentication flows - /// - public class OAuthAuthenticator : AuthenticatorBase - { - readonly string _tokenUrl; - readonly string _clientId; - readonly string _clientSecret; - readonly string _grantType; - readonly JsonSerializerSettings _serializerSettings; - readonly IReadableConfiguration _configuration; - - /// - /// Initialize the OAuth2 Authenticator - /// - public OAuthAuthenticator( - string tokenUrl, - string clientId, - string clientSecret, - OAuthFlow? flow, - JsonSerializerSettings serializerSettings, - IReadableConfiguration configuration) : base("") - { - _tokenUrl = tokenUrl; - _clientId = clientId; - _clientSecret = clientSecret; - _serializerSettings = serializerSettings; - _configuration = configuration; - - switch (flow) - { - /*case OAuthFlow.ACCESS_CODE: - _grantType = "authorization_code"; - break; - case OAuthFlow.IMPLICIT: - _grantType = "implicit"; - break; - case OAuthFlow.PASSWORD: - _grantType = "password"; - break;*/ - case OAuthFlow.APPLICATION: - _grantType = "client_credentials"; - break; - default: - break; - } - } - - /// - /// Creates an authentication parameter from an access token. - /// - /// Access token to create a parameter from. - /// An authentication parameter. - protected override async ValueTask GetAuthenticationParameter(string accessToken) - { - var token = string.IsNullOrEmpty(Token) ? await GetToken().ConfigureAwait(false) : Token; - return new HeaderParameter(KnownHeaders.Authorization, token); - } - - /// - /// Gets the token from the OAuth2 server. - /// - /// An authentication token. - async Task GetToken() - { - var client = new RestClient(_tokenUrl, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); - - var request = new RestRequest() - .AddParameter("grant_type", _grantType) - .AddParameter("client_id", _clientId) - .AddParameter("client_secret", _clientSecret); - var response = await client.PostAsync(request).ConfigureAwait(false); - - // RFC6749 - token_type is case insensitive. - // RFC6750 - In Authorization header Bearer should be capitalized. - // Fix the capitalization irrespective of token_type casing. - switch (response.TokenType?.ToLower()) - { - case "bearer": - return $"Bearer {response.AccessToken}"; - default: - return $"{response.TokenType} {response.AccessToken}"; - } - } - } -} diff --git a/generation/templates/auth/OAuthFlow.mustache b/generation/templates/auth/OAuthFlow.mustache deleted file mode 100644 index 768ddd0a..00000000 --- a/generation/templates/auth/OAuthFlow.mustache +++ /dev/null @@ -1,19 +0,0 @@ -{{>partial_header}} - -namespace {{packageName}}.Client.Auth -{ - /// - /// Available flows for OAuth2 authentication - /// - public enum OAuthFlow - { - /// Authorization code flow - ACCESS_CODE, - /// Implicit flow - IMPLICIT, - /// Password flow - PASSWORD, - /// Client credentials flow - APPLICATION - } -} \ No newline at end of file diff --git a/generation/templates/auth/TokenResponse.mustache b/generation/templates/auth/TokenResponse.mustache deleted file mode 100644 index f118b97a..00000000 --- a/generation/templates/auth/TokenResponse.mustache +++ /dev/null @@ -1,14 +0,0 @@ -{{>partial_header}} - -using Newtonsoft.Json; - -namespace {{packageName}}.Client.Auth -{ - class TokenResponse - { - [JsonProperty("token_type")] - public string TokenType { get; set; } - [JsonProperty("access_token")] - public string AccessToken { get; set; } - } -} \ No newline at end of file diff --git a/generation/templates/git_push.sh.mustache b/generation/templates/git_push.sh.mustache deleted file mode 100644 index 0e3776ae..00000000 --- a/generation/templates/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/generation/templates/gitignore.mustache b/generation/templates/gitignore.mustache deleted file mode 100644 index 1ee53850..00000000 --- a/generation/templates/gitignore.mustache +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/generation/templates/libraries/generichost/AfterOperationDefaultImplementation.mustache b/generation/templates/libraries/generichost/AfterOperationDefaultImplementation.mustache deleted file mode 100644 index 394c6572..00000000 --- a/generation/templates/libraries/generichost/AfterOperationDefaultImplementation.mustache +++ /dev/null @@ -1,2 +0,0 @@ - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ApiException.mustache b/generation/templates/libraries/generichost/ApiException.mustache deleted file mode 100644 index c14c1010..00000000 --- a/generation/templates/libraries/generichost/ApiException.mustache +++ /dev/null @@ -1,46 +0,0 @@ -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// API Exception - /// - {{>visibility}} class ApiException : Exception - { - /// - /// The reason the api request failed - /// - public string{{nrt?}} ReasonPhrase { get; } - - /// - /// The HttpStatusCode - /// - public System.Net.HttpStatusCode StatusCode { get; } - - /// - /// The raw data returned by the api - /// - public string RawContent { get; } - - /// - /// Construct the ApiException from parts of the response - /// - /// - /// - /// - public ApiException(string{{nrt?}} reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent) : base(reasonPhrase ?? rawContent) - { - ReasonPhrase = reasonPhrase; - - StatusCode = statusCode; - - RawContent = rawContent; - } - } -} diff --git a/generation/templates/libraries/generichost/ApiFactory.mustache b/generation/templates/libraries/generichost/ApiFactory.mustache deleted file mode 100644 index a445d216..00000000 --- a/generation/templates/libraries/generichost/ApiFactory.mustache +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.{{apiPackage}}; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// An IApiFactory interface - /// - {{>visibility}} interface IApiFactory - { - /// - /// A method to create an IApi of type IResult - /// - /// - /// - IResult Create() where IResult : IApi; - } - - /// - /// An ApiFactory - /// - {{>visibility}} class ApiFactory : IApiFactory - { - /// - /// The service provider - /// - public IServiceProvider Services { get; } - - /// - /// Initializes a new instance of the class. - /// - /// - public ApiFactory(IServiceProvider services) - { - Services = services; - } - - /// - /// A method to create an IApi of type IResult - /// - /// - /// - public IResult Create() where IResult : IApi - { - return Services.GetRequiredService(); - } - } -} diff --git a/generation/templates/libraries/generichost/ApiKeyToken.mustache b/generation/templates/libraries/generichost/ApiKeyToken.mustache deleted file mode 100644 index 273eb2cc..00000000 --- a/generation/templates/libraries/generichost/ApiKeyToken.mustache +++ /dev/null @@ -1,56 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A token constructed from an apiKey. - /// - {{>visibility}} class ApiKeyToken : TokenBase - { - private string _raw; - - /// - /// The header that this token will be used with. - /// - public ClientUtils.ApiKeyHeader Header { get; } - - /// - /// Constructs an ApiKeyToken object. - /// - /// - /// - /// - /// - public ApiKeyToken(string value, ClientUtils.ApiKeyHeader header, string prefix = "Bearer ", TimeSpan? timeout = null) : base(timeout) - { - Header = header; - _raw = $"{ prefix }{ value }"; - } - - /// - /// Places the token in the header. - /// - /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request) - { - request.Headers.Add(ClientUtils.ApiKeyHeaderToString(Header), _raw); - } - - /// - /// Places the token in the query. - /// - /// - /// - /// - public virtual void UseInQuery(System.Net.Http.HttpRequestMessage request, UriBuilder uriBuilder, System.Collections.Specialized.NameValueCollection parseQueryString) - { - parseQueryString[ClientUtils.ApiKeyHeaderToString(Header)] = Uri.EscapeDataString(_raw).ToString(){{nrt!}}; - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ApiResponseEventArgs`1.mustache b/generation/templates/libraries/generichost/ApiResponseEventArgs`1.mustache deleted file mode 100644 index aea35fae..00000000 --- a/generation/templates/libraries/generichost/ApiResponseEventArgs`1.mustache +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Useful for tracking server health - /// - {{>visibility}} class ApiResponseEventArgs : EventArgs - { - /// - /// The ApiResponse - /// - public ApiResponse ApiResponse { get; } - - /// - /// The ApiResponseEventArgs - /// - /// - public ApiResponseEventArgs(ApiResponse apiResponse) - { - ApiResponse = apiResponse; - } - } -} diff --git a/generation/templates/libraries/generichost/ApiResponse`1.mustache b/generation/templates/libraries/generichost/ApiResponse`1.mustache deleted file mode 100644 index 5b097c22..00000000 --- a/generation/templates/libraries/generichost/ApiResponse`1.mustache +++ /dev/null @@ -1,170 +0,0 @@ -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -{{^netStandard}} -using System.Diagnostics.CodeAnalysis; -{{/netStandard}} -using System.Net; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Provides a non-generic contract for the ApiResponse wrapper. - /// - {{>visibility}} partial interface IApiResponse - { - /// - /// The IsSuccessStatusCode from the api response - /// - bool IsSuccessStatusCode { get; } - - /// - /// Gets the status code (HTTP status code) - /// - /// The status code. - HttpStatusCode StatusCode { get; } - - /// - /// The raw content of this response. - /// - string RawContent { get; } - - /// - /// The DateTime when the request was retrieved. - /// - DateTime DownloadedAt { get; } - - /// - /// The headers contained in the api response - /// - System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - - /// - /// The path used when making the request. - /// - string Path { get; } - - /// - /// The reason phrase contained in the api response - /// - string{{nrt?}} ReasonPhrase { get; } - - /// - /// The DateTime when the request was sent. - /// - DateTime RequestedAt { get; } - - /// - /// The Uri used when making the request. - /// - Uri{{nrt?}} RequestUri { get; } - } - - /// - /// API Response - /// - {{>visibility}} partial class ApiResponse : IApiResponse - { - /// - /// Gets the status code (HTTP status code) - /// - /// The status code. - public HttpStatusCode StatusCode { get; } - - /// - /// The raw data - /// - public string RawContent { get; protected set; } - - /// - /// The IsSuccessStatusCode from the api response - /// - public bool IsSuccessStatusCode { get; } - - /// - /// The reason phrase contained in the api response - /// - public string{{nrt?}} ReasonPhrase { get; } - - /// - /// The headers contained in the api response - /// - public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - - /// - /// The DateTime when the request was retrieved. - /// - public DateTime DownloadedAt { get; } = DateTime.UtcNow; - - /// - /// The DateTime when the request was sent. - /// - public DateTime RequestedAt { get; } - - /// - /// The path used when making the request. - /// - public string Path { get; } - - /// - /// The Uri used when making the request. - /// - public Uri{{nrt?}} RequestUri { get; } - - /// - /// The - /// - protected System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; - - /// - /// Construct the response using an HttpResponseMessage - /// - /// - /// - /// - /// - /// - /// - public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) - { - StatusCode = httpResponseMessage.StatusCode; - Headers = httpResponseMessage.Headers; - IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; - ReasonPhrase = httpResponseMessage.ReasonPhrase; - RawContent = rawContent; - Path = path; - RequestUri = httpRequestMessage.RequestUri; - RequestedAt = requestedAt; - _jsonSerializerOptions = jsonSerializerOptions; - OnCreated(httpRequestMessage, httpResponseMessage); - } - - partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); - } - {{#x-http-statuses-with-return}} - - /// - /// An interface for responses of type {{TType}} - /// - /// - {{>visibility}} interface I{{.}} : IApiResponse - { - /// - /// Deserializes the response if the response is {{.}} - /// - /// - TType {{.}}(); - - /// - /// Returns true if the response is {{.}} and the deserialized response is not null - /// - /// - /// - bool Try{{.}}({{#net60OrLater}}[NotNullWhen(true)]{{/net60OrLater}}out TType{{nrt?}} result); - } - {{/x-http-statuses-with-return}} -} diff --git a/generation/templates/libraries/generichost/ApiTestsBase.mustache b/generation/templates/libraries/generichost/ApiTestsBase.mustache deleted file mode 100644 index 3292a1e8..00000000 --- a/generation/templates/libraries/generichost/ApiTestsBase.mustache +++ /dev/null @@ -1,65 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; -using System.Security.Cryptography; -using Microsoft.Extensions.Hosting; -using {{packageName}}.{{clientPackage}};{{#hasImport}} -using {{packageName}}.{{modelPackage}};{{/hasImport}} -using {{packageName}}.Extensions; - - -{{>testInstructions}} - - -namespace {{packageName}}.Test.{{apiPackage}} -{ - /// - /// Base class for API tests - /// - public class ApiTestsBase - { - protected readonly IHost _host; - - public ApiTestsBase(string[] args) - { - _host = CreateHostBuilder(args).Build(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .Configure{{apiName}}((context, services, options) => - { - {{#lambda.trimTrailingWithNewLine}} - {{#apiKeyMethods}} - string apiKeyTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}(apiKeyTokenValue{{-index}}, ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken{{-index}}); - - {{/apiKeyMethods}} - {{#httpBearerMethods}} - string bearerTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); - BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}(bearerTokenValue{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken{{-index}}); - - {{/httpBearerMethods}} - {{#httpBasicMethods}} - string basicTokenUsername{{-index}} = context.Configuration[""] ?? throw new Exception("Username not found."); - string basicTokenPassword{{-index}} = context.Configuration[""] ?? throw new Exception("Password not found."); - BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}(basicTokenUsername{{-index}}, basicTokenPassword{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken{{-index}}); - - {{/httpBasicMethods}} - {{#httpSignatureMethods}} - HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken{{-index}}); - - {{/httpSignatureMethods}} - {{#oauthMethods}} - string oauthTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); - OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}(oauthTokenValue{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken{{-index}}); - {{/oauthMethods}} - {{/lambda.trimTrailingWithNewLine}} - }); - } -} diff --git a/generation/templates/libraries/generichost/AsModel.mustache b/generation/templates/libraries/generichost/AsModel.mustache deleted file mode 100644 index 96bedfa4..00000000 --- a/generation/templates/libraries/generichost/AsModel.mustache +++ /dev/null @@ -1,4 +0,0 @@ -// This logic may be modified with the AsModel.mustache template -return Is{{vendorExtensions.x-http-status}} - ? System.Text.Json.JsonSerializer.Deserialize<{{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}>(RawContent, _jsonSerializerOptions) - : {{#net60OrLater}}null{{/net60OrLater}}{{^net60OrLater}}default{{/net60OrLater}}; diff --git a/generation/templates/libraries/generichost/Assembly.mustache b/generation/templates/libraries/generichost/Assembly.mustache deleted file mode 100644 index a22cc232..00000000 --- a/generation/templates/libraries/generichost/Assembly.mustache +++ /dev/null @@ -1,2 +0,0 @@ -[assembly: InternalsVisibleTo("{{packageName}}.Test")] - diff --git a/generation/templates/libraries/generichost/BasicToken.mustache b/generation/templates/libraries/generichost/BasicToken.mustache deleted file mode 100644 index 4cb7023f..00000000 --- a/generation/templates/libraries/generichost/BasicToken.mustache +++ /dev/null @@ -1,46 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A token constructed from a username and password. - /// - {{>visibility}} class BasicToken : TokenBase - { - private string _username; - - private string _password; - - /// - /// Constructs a BasicToken object. - /// - /// - /// - /// - public BasicToken(string username, string password, TimeSpan? timeout = null) : base(timeout) - { - _username = username; - - _password = password; - } - - /// - /// Places the token in the header. - /// - /// - /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) - { - request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", {{packageName}}.Client.ClientUtils.Base64Encode(_username + ":" + _password)); - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/BearerToken.mustache b/generation/templates/libraries/generichost/BearerToken.mustache deleted file mode 100644 index b0fc0a5d..00000000 --- a/generation/templates/libraries/generichost/BearerToken.mustache +++ /dev/null @@ -1,41 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A token constructed from a token from a bearer token. - /// - {{>visibility}} class BearerToken : TokenBase - { - private string _raw; - - /// - /// Constructs a BearerToken object. - /// - /// - /// - public BearerToken(string value, TimeSpan? timeout = null) : base(timeout) - { - _raw = value; - } - - /// - /// Places the token in the header. - /// - /// - /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) - { - request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ClientUtils.mustache b/generation/templates/libraries/generichost/ClientUtils.mustache deleted file mode 100644 index 271dfa67..00000000 --- a/generation/templates/libraries/generichost/ClientUtils.mustache +++ /dev/null @@ -1,401 +0,0 @@ -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.IO; -using System.Linq; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using System.Text.RegularExpressions;{{#useCompareNetObjects}} -using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}} -using {{packageName}}.{{modelPackage}}; -using System.Runtime.CompilerServices; - -{{>Assembly}}namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Utility functions providing some benefit to API client consumers. - /// - {{>visibility}} static class ClientUtils - { - {{#useCompareNetObjects}} - /// - /// An instance of CompareLogic. - /// - public static CompareLogic compareLogic; - - /// - /// Static constructor to initialise compareLogic. - /// - static ClientUtils() - { - {{#equatable}} - ComparisonConfig comparisonConfig = new{{^net70OrLater}} ComparisonConfig{{/net70OrLater}}(); - comparisonConfig.UseHashCodeIdentifier = true; - {{/equatable}} - compareLogic = new{{^net70OrLater}} CompareLogic{{/net70OrLater}}({{#equatable}}comparisonConfig{{/equatable}}); - } - {{/useCompareNetObjects}} - - /// - /// A delegate for events. - /// - /// - /// - /// - /// - public delegate void EventHandler(object sender, T e) where T : EventArgs; - - {{#hasApiKeyMethods}} - /// - /// An enum of headers - /// - public enum ApiKeyHeader - { - {{#apiKeyMethods}} - /// - /// The {{keyParamName}} header - /// - {{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}{{^-last}},{{/-last}} - {{/apiKeyMethods}} - } - - /// - /// Converte an ApiKeyHeader to a string - /// - /// - /// - /// - {{>visibility}} static string ApiKeyHeaderToString(ApiKeyHeader value) - { - {{#net80OrLater}} - return value switch - { - {{#apiKeyMethods}} - ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}} => "{{keyParamName}}", - {{/apiKeyMethods}} - _ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)), - }; - {{/net80OrLater}} - {{^net80OrLater}} - switch(value) - { - {{#apiKeyMethods}} - case ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}: - return "{{keyParamName}}"; - {{/apiKeyMethods}} - default: - throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)); - } - {{/net80OrLater}} - } - - {{/hasApiKeyMethods}} - /// - /// Returns true when deserialization succeeds. - /// - /// - /// - /// - /// - /// - public static bool TryDeserialize(string json, JsonSerializerOptions options, {{#net60OrLater}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result) - { - try - { - result = JsonSerializer.Deserialize(json, options); - return result != null; - } - catch (Exception) - { - result = default; - return false; - } - } - - /// - /// Returns true when deserialization succeeds. - /// - /// - /// - /// - /// - /// - public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, {{#net60OrLater}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result) - { - try - { - result = JsonSerializer.Deserialize(ref reader, options); - return result != null; - } - catch (Exception) - { - result = default; - return false; - } - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - return match.Success ? match.Groups[1].Value : filename; - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// The DateTime serialization format. - /// Formatted string. - public static string{{nrt?}} ParameterToString(object{{nrt?}} obj, string{{nrt?}} format = ISO8601_DATETIME_FORMAT) - { - if (obj is DateTime dateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTime.ToString(format); - if (obj is DateTimeOffset dateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTimeOffset.ToString(format); - if (obj is bool boolean) - return boolean - ? "true" - : "false"; - {{#models}} - {{#model}} - {{#isEnum}} - if (obj is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}) - {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} - return {{classname}}ValueConverter.{{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; - {{/isEnum}} - {{^isEnum}} - {{#vars}} - {{#items.isEnum}} - {{#items}} - {{^complexType}} - if (obj is {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}) - {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} - return {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; - {{/complexType}} - {{/items}} - {{/items.isEnum}} - {{#isEnum}} - {{^complexType}} - if (obj is {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}) - {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} - return {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; - {{/complexType}} - {{/isEnum}} - {{/vars}} - {{/isEnum}} - {{/model}} - {{/models}} - if (obj is ICollection collection) - { - List entries = new{{^net70OrLater}} List{{/net70OrLater}}(); - foreach (var entry in collection) - entries.Add(ParameterToString(entry)); - return string.Join(",", entries); - } - - return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture); - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// string to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Encode string in base64 format. - /// - /// string to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - using (var ms = new MemoryStream()) - { - inputStream.CopyTo(ms); - return ms.ToArray(); - } - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public static string{{nrt?}} SelectHeaderContentType(string[] contentTypes) - { - if (contentTypes.Length == 0) - return null; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType)) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public static string{{nrt?}} SelectHeaderAccept(string[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return string.Join(",", accepts); - } - - /// - /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. - /// - public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - - /// - /// Check if the given MIME is a JSON MIME. - /// JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public static bool IsJsonMime(string mime) - { - if (string.IsNullOrWhiteSpace(mime)) return false; - - return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); - } - - /// - /// Get the discriminator - /// - /// - /// - /// - /// - public static string{{nrt?}} GetDiscriminator(Utf8JsonReader utf8JsonReader, string discriminator) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string{{nrt?}} localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - if (localVarJsonPropertyName != null && localVarJsonPropertyName.Equals(discriminator)) - return utf8JsonReader.GetString(); - } - } - - throw new JsonException("The specified discriminator was not found."); - } - - /// - /// The base path of the API - /// - public const string BASE_ADDRESS = "{{{basePath}}}"; - - /// - /// The scheme of the API - /// - public const string SCHEME = "{{{scheme}}}"; - - /// - /// The context path of the API - /// - public const string CONTEXT_PATH = "{{contextPath}}"; - - /// - /// The host of the API - /// - public const string HOST = "{{{host}}}"; - - /// - /// The format to use for DateTime serialization - /// - public const string ISO8601_DATETIME_FORMAT = "o"; - } -} diff --git a/generation/templates/libraries/generichost/CookieContainer.mustache b/generation/templates/libraries/generichost/CookieContainer.mustache deleted file mode 100644 index f96d4fb4..00000000 --- a/generation/templates/libraries/generichost/CookieContainer.mustache +++ /dev/null @@ -1,22 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System.Linq; -using System.Collections.Generic; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A class containing a CookieContainer - /// - {{>visibility}} sealed class CookieContainer - { - /// - /// The collection of tokens - /// - public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/DateFormats.mustache b/generation/templates/libraries/generichost/DateFormats.mustache deleted file mode 100644 index 920ecda8..00000000 --- a/generation/templates/libraries/generichost/DateFormats.mustache +++ /dev/null @@ -1,2 +0,0 @@ - "yyyy'-'MM'-'dd", - "yyyyMMdd" diff --git a/generation/templates/libraries/generichost/DateOnlyJsonConverter.mustache b/generation/templates/libraries/generichost/DateOnlyJsonConverter.mustache deleted file mode 100644 index 209979c8..00000000 --- a/generation/templates/libraries/generichost/DateOnlyJsonConverter.mustache +++ /dev/null @@ -1,51 +0,0 @@ -{{>partial_header}} -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - {{>visibility}} class DateOnlyJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { -{{>DateFormats}} - }; - - /// - /// Returns a DateOnly from the Json object - /// - /// - /// - /// - /// - public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - throw new NotSupportedException(); - - string value = reader.GetString(){{nrt!}}; - - foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) - return result; - - throw new NotSupportedException(); - } - - /// - /// Writes the DateOnly to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateOnly dateOnlyValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateOnlyValue.ToString("{{{dateFormat}}}", CultureInfo.InvariantCulture)); - } -} diff --git a/generation/templates/libraries/generichost/DateOnlyNullableJsonConverter.mustache b/generation/templates/libraries/generichost/DateOnlyNullableJsonConverter.mustache deleted file mode 100644 index 17c84736..00000000 --- a/generation/templates/libraries/generichost/DateOnlyNullableJsonConverter.mustache +++ /dev/null @@ -1,56 +0,0 @@ -{{>partial_header}} -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - {{>visibility}} class DateOnlyNullableJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { -{{>DateFormats}} - }; - - /// - /// Returns a DateOnly from the Json object - /// - /// - /// - /// - /// - public override DateOnly? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - return null; - - string value = reader.GetString(){{nrt!}}; - - foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) - return result; - - throw new NotSupportedException(); - } - - /// - /// Writes the DateOnly to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateOnly? dateOnlyValue, JsonSerializerOptions options) - { - if (dateOnlyValue == null) - writer.WriteNullValue(); - else - writer.WriteStringValue(dateOnlyValue.Value.ToString("{{{dateFormat}}}", CultureInfo.InvariantCulture)); - } - } -} diff --git a/generation/templates/libraries/generichost/DateTimeFormats.mustache b/generation/templates/libraries/generichost/DateTimeFormats.mustache deleted file mode 100644 index 85ed99a2..00000000 --- a/generation/templates/libraries/generichost/DateTimeFormats.mustache +++ /dev/null @@ -1,22 +0,0 @@ - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", - {{^supportsDateOnly}} - "yyyy'-'MM'-'dd", - {{/supportsDateOnly}} - "yyyyMMddTHHmmss.fffffffK", - "yyyyMMddTHHmmss.ffffffK", - "yyyyMMddTHHmmss.fffffK", - "yyyyMMddTHHmmss.ffffK", - "yyyyMMddTHHmmss.fffK", - "yyyyMMddTHHmmss.ffK", - "yyyyMMddTHHmmss.fK", - "yyyyMMddTHHmmssK", - {{^supportsDateOnly}} - "yyyyMMdd" - {{/supportsDateOnly}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/DateTimeJsonConverter.mustache b/generation/templates/libraries/generichost/DateTimeJsonConverter.mustache deleted file mode 100644 index c5187f50..00000000 --- a/generation/templates/libraries/generichost/DateTimeJsonConverter.mustache +++ /dev/null @@ -1,51 +0,0 @@ -{{>partial_header}} -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Formatter for {{#supportsDateOnly}}'date-time'{{/supportsDateOnly}}{{^supportsDateOnly}}'date' and 'date-time'{{/supportsDateOnly}} openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - {{>visibility}} class DateTimeJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { -{{>DateTimeFormats}} - }; - - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - throw new NotSupportedException(); - - string value = reader.GetString(){{nrt!}}; - - foreach(string format in Formats) - if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) - return result; - - throw new NotSupportedException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString("{{{dateTimeFormat}}}", CultureInfo.InvariantCulture)); - } -} diff --git a/generation/templates/libraries/generichost/DateTimeNullableJsonConverter.mustache b/generation/templates/libraries/generichost/DateTimeNullableJsonConverter.mustache deleted file mode 100644 index 646c7294..00000000 --- a/generation/templates/libraries/generichost/DateTimeNullableJsonConverter.mustache +++ /dev/null @@ -1,56 +0,0 @@ -{{>partial_header}} -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Formatter for {{#supportsDateOnly}}'date-time'{{/supportsDateOnly}}{{^supportsDateOnly}}'date' and 'date-time'{{/supportsDateOnly}} openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - {{>visibility}} class DateTimeNullableJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { -{{>DateTimeFormats}} - }; - - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - return null; - - string value = reader.GetString(){{nrt!}}; - - foreach(string format in Formats) - if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) - return result; - - return null; - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) - { - if (dateTimeValue == null) - writer.WriteNullValue(); - else - writer.WriteStringValue(dateTimeValue.Value.ToString("{{{dateTimeFormat}}}", CultureInfo.InvariantCulture)); - } - } -} diff --git a/generation/templates/libraries/generichost/DependencyInjectionTests.mustache b/generation/templates/libraries/generichost/DependencyInjectionTests.mustache deleted file mode 100644 index aadf2c73..00000000 --- a/generation/templates/libraries/generichost/DependencyInjectionTests.mustache +++ /dev/null @@ -1,211 +0,0 @@ -{{>partial_header}} -using System; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using System.Collections.Generic; -using System.Security.Cryptography; -using {{packageName}}.{{clientPackage}}; -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Extensions; -using Xunit; - -namespace {{packageName}}.Test.{{apiPackage}} -{ - /// - /// Tests the dependency injection. - /// - public class DependencyInjectionTest - { - private readonly IHost _hostUsingConfigureWithoutAClient = - Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).Configure{{apiName}}((context, services, options) => - { - {{#lambda.trimTrailingWithNewLine}} - {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken{{-index}}); - - {{/apiKeyMethods}} - {{#httpBearerMethods}} - BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken{{-index}}); - - {{/httpBearerMethods}} - {{#httpBasicMethods}} - BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken{{-index}}); - - {{/httpBasicMethods}} - {{#httpSignatureMethods}} - HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken{{-index}}); - - {{/httpSignatureMethods}} - {{#oauthMethods}} - OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken{{-index}}); - - {{/oauthMethods}} - {{/lambda.trimTrailingWithNewLine}} - }) - .Build(); - - private readonly IHost _hostUsingConfigureWithAClient = - Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).Configure{{apiName}}((context, services, options) => - { - {{#lambda.trimTrailingWithNewLine}} - {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken{{-index}}); - - {{/apiKeyMethods}} - {{#httpBearerMethods}} - BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken{{-index}}); - - {{/httpBearerMethods}} - {{#httpBasicMethods}} - BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken{{-index}}); - - {{/httpBasicMethods}} - {{#httpSignatureMethods}} - HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken{{-index}}); - - {{/httpSignatureMethods}} - {{#oauthMethods}} - OAuthToken oauthToken = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken); - - {{/oauthMethods}} - {{/lambda.trimTrailingWithNewLine}} - options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); - }) - .Build(); - - private readonly IHost _hostUsingAddWithoutAClient = - Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).ConfigureServices((host, services) => - { - services.Add{{apiName}}(options => - { - {{#lambda.trimTrailingWithNewLine}} - {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken{{-index}}); - - {{/apiKeyMethods}} - {{#httpBearerMethods}} - BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken{{-index}}); - - {{/httpBearerMethods}} - {{#httpBasicMethods}} - BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken{{-index}}); - - {{/httpBasicMethods}} - {{#httpSignatureMethods}} - HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken{{-index}}); - - {{/httpSignatureMethods}} - {{#oauthMethods}} - OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken{{-index}}); - - {{/oauthMethods}} - {{/lambda.trimTrailingWithNewLine}} - }); - }) - .Build(); - - private readonly IHost _hostUsingAddWithAClient = - Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).ConfigureServices((host, services) => - { - services.Add{{apiName}}(options => - { - {{#lambda.trimTrailingWithNewLine}} - {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(apiKeyToken{{-index}}); - - {{/apiKeyMethods}} - {{#httpBearerMethods}} - BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(bearerToken{{-index}}); - - {{/httpBearerMethods}} - {{#httpBasicMethods}} - BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(basicToken{{-index}}); - - {{/httpBasicMethods}} - {{#httpSignatureMethods}} - HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); - HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(httpSignatureToken{{-index}}); - - {{/httpSignatureMethods}} - {{#oauthMethods}} - OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); - options.AddTokens(oauthToken{{-index}}); - - {{/oauthMethods}} - {{/lambda.trimTrailingWithNewLine}} - options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); - }); - }) - .Build(); - - /// - /// Test dependency injection when using the configure method - /// - [Fact] - public void ConfigureApiWithAClientTest() - { - {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} - - {{/-last}}{{/apis}}{{/apiInfo}} - } - - /// - /// Test dependency injection when using the configure method - /// - [Fact] - public void ConfigureApiWithoutAClientTest() - { - {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} - - {{/-last}}{{/apis}}{{/apiInfo}} - } - - /// - /// Test dependency injection when using the add method - /// - [Fact] - public void AddApiWithAClientTest() - { - {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} - - {{/-last}}{{/apis}}{{/apiInfo}} - } - - /// - /// Test dependency injection when using the add method - /// - [Fact] - public void AddApiWithoutAClientTest() - { - {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} - - {{/-last}}{{/apis}}{{/apiInfo}} - } - } -} diff --git a/generation/templates/libraries/generichost/EnumValueDataType.mustache b/generation/templates/libraries/generichost/EnumValueDataType.mustache deleted file mode 100644 index e92e67b3..00000000 --- a/generation/templates/libraries/generichost/EnumValueDataType.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}{{^isNumeric}}string{{/isNumeric}}{{/isString}}{{#isNumeric}}{{#isLong}}long{{/isLong}}{{#isFloat}}float{{/isFloat}}{{#isDouble}}double{{/isDouble}}{{#isDecimal}}decimal{{/isDecimal}}{{^isLong}}{{^isFloat}}{{^isDouble}}{{^isDecimal}}int{{/isDecimal}}{{/isDouble}}{{/isFloat}}{{/isLong}}{{/isNumeric}}{{/-first}}{{/enumVars}}{{/allowableValues}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ExceptionEventArgs.mustache b/generation/templates/libraries/generichost/ExceptionEventArgs.mustache deleted file mode 100644 index 016ef7c6..00000000 --- a/generation/templates/libraries/generichost/ExceptionEventArgs.mustache +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Useful for tracking server health - /// - {{>visibility}} class ExceptionEventArgs : EventArgs - { - /// - /// The ApiResponse - /// - public Exception Exception { get; } - - /// - /// The ExcepetionEventArgs - /// - /// - public ExceptionEventArgs(Exception exception) - { - Exception = exception; - } - } -} diff --git a/generation/templates/libraries/generichost/HostConfiguration.mustache b/generation/templates/libraries/generichost/HostConfiguration.mustache deleted file mode 100644 index d7d1e3bf..00000000 --- a/generation/templates/libraries/generichost/HostConfiguration.mustache +++ /dev/null @@ -1,162 +0,0 @@ -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Net.Http; -using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.{{modelPackage}}; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Provides hosting configuration for {{packageName}} - /// - {{>visibility}} class HostConfiguration - { - private readonly IServiceCollection _services; - private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); - - internal bool HttpClientsAdded { get; private set; } - - /// - /// Instantiates the class - /// - /// - public HostConfiguration(IServiceCollection services) - { - _services = services; - _jsonOptions.Converters.Add(new JsonStringEnumConverter()); - _jsonOptions.Converters.Add(new DateTimeJsonConverter()); - _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); - {{#supportsDateOnly}} - _jsonOptions.Converters.Add(new DateOnlyJsonConverter()); - _jsonOptions.Converters.Add(new DateOnlyNullableJsonConverter()); - {{/supportsDateOnly}} - {{#models}} - {{#model}} - {{#isEnum}} - _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter()); - _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableJsonConverter()); - {{/isEnum}} - {{^isEnum}} - _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); - {{/isEnum}} - {{/model}} - {{/models}} - JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new{{^net60OrLater}} JsonSerializerOptionsProvider{{/net60OrLater}}(_jsonOptions); - _services.AddSingleton(jsonSerializerOptionsProvider); - {{#useSourceGeneration}} - - {{#models}} - {{#-first}} - _jsonOptions.TypeInfoResolver = System.Text.Json.Serialization.Metadata.JsonTypeInfoResolver.Combine( - {{/-first}} - {{/models}} - {{#lambda.joinLinesWithComma}} - {{#models}} - {{#model}} - new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}SerializationContext(){{#-last}},{{/-last}} - {{/model}} - {{/models}} - {{/lambda.joinLinesWithComma}} - {{#models}} - {{#-last}} - - new System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver() - ); - {{/-last}} - {{/models}} - - {{/useSourceGeneration}} - _services.AddSingleton();{{#apiInfo}}{{#apis}} - _services.AddSingleton<{{classname}}Events>(); - _services.AddTransient<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}} - } - - /// - /// Configures the HttpClients. - /// - /// - /// - /// - public HostConfiguration Add{{apiName}}HttpClients - ( - Action{{nrt?}} client = null, Action{{nrt?}} builder = null) - { - if (client == null) - client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); - - List builders = new List(); - - {{#apiInfo}}{{#apis}}builders.Add(_services.AddHttpClient<{{interfacePrefix}}{{classname}}, {{classname}}>(client)); - {{/apis}}{{/apiInfo}} - if (builder != null) - foreach (IHttpClientBuilder instance in builders) - builder(instance); - - HttpClientsAdded = true; - - return this; - } - - /// - /// Configures the JsonSerializerSettings - /// - /// - /// - public HostConfiguration ConfigureJsonOptions(Action options) - { - options(_jsonOptions); - - return this; - } - - /// - /// Adds tokens to your IServiceCollection - /// - /// - /// - /// - public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase - { - return AddTokens(new TTokenBase[]{ token }); - } - - /// - /// Adds tokens to your IServiceCollection - /// - /// - /// - /// - public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase - { - TokenContainer container = new TokenContainer(tokens); - _services.AddSingleton(services => container); - - return this; - } - - /// - /// Adds a token provider to your IServiceCollection - /// - /// - /// - /// - public HostConfiguration UseProvider() - where TTokenProvider : TokenProvider - where TTokenBase : TokenBase - { - _services.AddSingleton(); - _services.AddSingleton>(services => services.GetRequiredService()); - - return this; - } - } -} diff --git a/generation/templates/libraries/generichost/HttpSigningConfiguration.mustache b/generation/templates/libraries/generichost/HttpSigningConfiguration.mustache deleted file mode 100644 index 2e99b3c9..00000000 --- a/generation/templates/libraries/generichost/HttpSigningConfiguration.mustache +++ /dev/null @@ -1,678 +0,0 @@ -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Web; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Class for HttpSigning auth related parameter and methods - /// - {{>visibility}} class HttpSigningConfiguration - { - /// - /// Create an instance - /// - public HttpSigningConfiguration(string keyId, string keyFilePath, SecureString{{nrt?}} keyPassPhrase, List httpSigningHeader, HashAlgorithmName hashAlgorithm, string signingAlgorithm, int signatureValidityPeriod) - { - KeyId = keyId; - KeyFilePath = keyFilePath; - KeyPassPhrase = keyPassPhrase; - HttpSigningHeader = httpSigningHeader; - HashAlgorithm = hashAlgorithm; - SigningAlgorithm = signingAlgorithm; - SignatureValidityPeriod = signatureValidityPeriod; - } - - /// - ///Gets the Api keyId - /// - public string KeyId { get; set; } - - /// - /// Gets the Key file path - /// - public string KeyFilePath { get; set; } - - /// - /// Gets the key pass phrase for password protected key - /// - public SecureString{{nrt?}} KeyPassPhrase { get; set; } - - /// - /// Gets the HTTP signing header - /// - public List HttpSigningHeader { get; set; } - - /// - /// Gets the hash algorithm sha256 or sha512 - /// - public HashAlgorithmName HashAlgorithm { get; set; } = HashAlgorithmName.SHA256; - - /// - /// Gets the signing algorithm - /// - public string SigningAlgorithm { get; set; } - - /// - /// Gets the Signature validaty period in seconds - /// - public int SignatureValidityPeriod { get; set; } - - private enum PrivateKeyType - { - None = 0, - RSA = 1, - ECDSA = 2, - } - - /// - /// Gets the Headers for HttpSigning - /// - /// - /// - /// - internal Dictionary GetHttpSignedHeader(System.Net.Http.HttpRequestMessage request, string requestBody, System.Threading.CancellationToken cancellationToken = default{{^netstandard20OrLater}}(System.Threading.CancellationToken){{/netstandard20OrLater}}) - { - if (request.RequestUri == null) - throw new NullReferenceException("The request URI was null"); - - const string HEADER_REQUEST_TARGET = "(request-target)"; - - // The time when the HTTP signature expires. The API server should reject HTTP requests that have expired. - const string HEADER_EXPIRES = "(expires)"; - - //The 'Date' header. - const string HEADER_DATE = "Date"; - - //The 'Host' header. - const string HEADER_HOST = "Host"; - - //The time when the HTTP signature was generated. - const string HEADER_CREATED = "(created)"; - - //When the 'Digest' header is included in the HTTP signature, the client automatically - //computes the digest of the HTTP request body, per RFC 3230. - const string HEADER_DIGEST = "Digest"; - - //The 'Authorization' header is automatically generated by the client. It includes - //the list of signed headers and a base64-encoded signature. - const string HEADER_AUTHORIZATION = "Authorization"; - - //Hash table to store singed headers - var HttpSignedRequestHeader = new Dictionary(); - - var httpSignatureHeader = new Dictionary(); - - if (HttpSigningHeader.Count == 0) - HttpSigningHeader.Add("(created)"); - - var dateTime = DateTime.Now; - string digest = String.Empty; - - if (HashAlgorithm == HashAlgorithmName.SHA256) - { - var bodyDigest = GetStringHash(HashAlgorithm, requestBody); - digest = string.Format("SHA-256={0}", Convert.ToBase64String(bodyDigest)); - } - else if (HashAlgorithm == HashAlgorithmName.SHA512) - { - var bodyDigest = GetStringHash(HashAlgorithm, requestBody); - digest = string.Format("SHA-512={0}", Convert.ToBase64String(bodyDigest)); - } - else - throw new Exception(string.Format("{0} not supported", HashAlgorithm)); - - foreach (var header in HttpSigningHeader) - if (header.Equals(HEADER_REQUEST_TARGET)) - httpSignatureHeader.Add(header.ToLower(), request.RequestUri.ToString()); - else if (header.Equals(HEADER_EXPIRES)) - { - var expireDateTime = dateTime.AddSeconds(SignatureValidityPeriod); - httpSignatureHeader.Add(header.ToLower(), GetUnixTime(expireDateTime).ToString()); - } - else if (header.Equals(HEADER_DATE)) - { - var utcDateTime = dateTime.ToString("r").ToString(); - httpSignatureHeader.Add(header.ToLower(), utcDateTime); - HttpSignedRequestHeader.Add(HEADER_DATE, utcDateTime); - } - else if (header.Equals(HEADER_HOST)) - { - httpSignatureHeader.Add(header.ToLower(), request.RequestUri.ToString()); - HttpSignedRequestHeader.Add(HEADER_HOST, request.RequestUri.ToString()); - } - else if (header.Equals(HEADER_CREATED)) - httpSignatureHeader.Add(header.ToLower(), GetUnixTime(dateTime).ToString()); - else if (header.Equals(HEADER_DIGEST)) - { - HttpSignedRequestHeader.Add(HEADER_DIGEST, digest); - httpSignatureHeader.Add(header.ToLower(), digest); - } - else - { - bool isHeaderFound = false; - foreach (var item in request.Headers) - { - if (string.Equals(item.Key, header, StringComparison.OrdinalIgnoreCase)) - { - httpSignatureHeader.Add(header.ToLower(), item.Value.ToString()); - isHeaderFound = true; - break; - } - } - - if (!isHeaderFound) - throw new Exception(string.Format("Cannot sign HTTP request.Request does not contain the {0} header.",header)); - } - - var headersKeysString = String.Join(" ", httpSignatureHeader.Keys); - var headerValuesList = new List(); - - foreach (var keyVal in httpSignatureHeader) - headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); - - //Concatenate headers value separated by new line - var headerValuesString = string.Join("\n", headerValuesList); - var signatureStringHash = GetStringHash(HashAlgorithm, headerValuesString); - string{{nrt?}} headerSignatureStr = null; - var keyType = GetKeyType(KeyFilePath); - - if (keyType == PrivateKeyType.RSA) - headerSignatureStr = GetRSASignature(signatureStringHash); - - else if (keyType == PrivateKeyType.ECDSA) - headerSignatureStr = GetECDSASignature(signatureStringHash); - - var cryptographicScheme = "hs2019"; - var authorizationHeaderValue = string.Format("Signature keyId=\"{0}\",algorithm=\"{1}\"", - KeyId, cryptographicScheme); - - if (httpSignatureHeader.ContainsKey(HEADER_CREATED)) - authorizationHeaderValue += string.Format(",created={0}", httpSignatureHeader[HEADER_CREATED]); - - if (httpSignatureHeader.ContainsKey(HEADER_EXPIRES)) - authorizationHeaderValue += string.Format(",expires={0}", httpSignatureHeader[HEADER_EXPIRES]); - - authorizationHeaderValue += string.Format(",headers=\"{0}\",signature=\"{1}\"", headersKeysString, headerSignatureStr); - - HttpSignedRequestHeader.Add(HEADER_AUTHORIZATION, authorizationHeaderValue); - - return HttpSignedRequestHeader; - } - - private byte[] GetStringHash(HashAlgorithmName hashAlgorithmName, string stringToBeHashed) - { - HashAlgorithm{{nrt?}} hashAlgorithm = null; - - if (hashAlgorithmName == HashAlgorithmName.SHA1) - hashAlgorithm = SHA1.Create(); - - if (hashAlgorithmName == HashAlgorithmName.SHA256) - hashAlgorithm = SHA256.Create(); - - if (hashAlgorithmName == HashAlgorithmName.SHA512) - hashAlgorithm = SHA512.Create(); - - if (hashAlgorithmName == HashAlgorithmName.MD5) - hashAlgorithm = MD5.Create(); - - if (hashAlgorithm == null) - throw new NullReferenceException($"{ nameof(hashAlgorithm) } was null."); - - byte[] bytes = Encoding.UTF8.GetBytes(stringToBeHashed); - byte[] stringHash = hashAlgorithm.ComputeHash(bytes); - return stringHash; - } - - private int GetUnixTime(DateTime date2) - { - DateTime date1 = new DateTime(1970, 01, 01); - TimeSpan timeSpan = date2 - date1; - return (int)timeSpan.TotalSeconds; - } - - private string GetRSASignature(byte[] stringToSign) - { - if (KeyPassPhrase == null) - throw new NullReferenceException($"{ nameof(KeyPassPhrase) } was null."); - - RSA{{nrt?}} rsa = GetRSAProviderFromPemFile(KeyFilePath, KeyPassPhrase); - - if (rsa == null) - return string.Empty; - else if (SigningAlgorithm == "RSASSA-PSS") - { - var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pss); - return Convert.ToBase64String(signedbytes); - } - else if (SigningAlgorithm == "PKCS1-v15") - { - var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pkcs1); - return Convert.ToBase64String(signedbytes); - } - - return string.Empty; - } - - /// - /// Gets the ECDSA signature - /// - /// - /// - private string GetECDSASignature(byte[] dataToSign) - { - {{#net60OrLater}} - if (!File.Exists(KeyFilePath)) - throw new Exception("key file path does not exist."); - - var ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"; - var ecKeyFooter = "-----END EC PRIVATE KEY-----"; - var keyStr = File.ReadAllText(KeyFilePath); - var ecKeyBase64String = keyStr.Replace(ecKeyHeader, "").Replace(ecKeyFooter, "").Trim(); - var keyBytes = System.Convert.FromBase64String(ecKeyBase64String); - var ecdsa = ECDsa.Create(); - - var byteCount = 0; - if (KeyPassPhrase != null) - { - IntPtr unmanagedString = IntPtr.Zero; - try - { - // convert secure string to byte array - unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); - - string ptrToStringUni = Marshal.PtrToStringUni(unmanagedString) ?? throw new NullReferenceException(); - - ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(ptrToStringUni), keyBytes, out byteCount); - } - finally - { - if (unmanagedString != IntPtr.Zero) - Marshal.ZeroFreeBSTR(unmanagedString); - } - } - else - ecdsa.ImportPkcs8PrivateKey(keyBytes, out byteCount); - - var signedBytes = ecdsa.SignHash(dataToSign); - var derBytes = ConvertToECDSAANS1Format(signedBytes); - var signedString = System.Convert.ToBase64String(derBytes); - - return signedString; - {{/net60OrLater}} - {{^net60OrLater}} - throw new Exception("ECDSA signing is supported only on NETCOREAPP3_0 and above"); - {{/net60OrLater}} - } - - private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) - { - var derBytes = new List(); - byte derLength = 68; //default length for ECDSA code signing bit 0x44 - byte rbytesLength = 32; //R length 0x20 - byte sbytesLength = 32; //S length 0x20 - var rBytes = new List(); - var sBytes = new List(); - for (int i = 0; i < 32; i++) - rBytes.Add(signedBytes[i]); - - for (int i = 32; i < 64; i++) - sBytes.Add(signedBytes[i]); - - if (rBytes[0] > 0x7F) - { - derLength++; - rbytesLength++; - var tempBytes = new List(); - tempBytes.AddRange(rBytes); - rBytes.Clear(); - rBytes.Add(0x00); - rBytes.AddRange(tempBytes); - } - - if (sBytes[0] > 0x7F) - { - derLength++; - sbytesLength++; - var tempBytes = new List(); - tempBytes.AddRange(sBytes); - sBytes.Clear(); - sBytes.Add(0x00); - sBytes.AddRange(tempBytes); - - } - - derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r length, type and r bytes - - derBytes.Add(2); //tag for integer - derBytes.Add(rbytesLength); //length of r - derBytes.AddRange(rBytes); - - derBytes.Add(2); //tag for integer - derBytes.Add(sbytesLength); //length of s - derBytes.AddRange(sBytes); - return derBytes.ToArray(); - } - - private RSACryptoServiceProvider{{nrt?}} GetRSAProviderFromPemFile(String pemfile, SecureString{{nrt?}} keyPassPhrase = null) - { - const String pempubheader = "-----BEGIN PUBLIC KEY-----"; - const String pempubfooter = "-----END PUBLIC KEY-----"; - bool isPrivateKeyFile = true; - byte[]{{nrt?}} pemkey = null; - - if (!File.Exists(pemfile)) - throw new Exception("private key file does not exist."); - - string pemstr = File.ReadAllText(pemfile).Trim(); - - if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter)) - isPrivateKeyFile = false; - - if (isPrivateKeyFile) - { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); - - if (pemkey == null) - return null; - - return DecodeRSAPrivateKey(pemkey); - } - return null; - } - - private byte[]{{nrt?}} ConvertPrivateKeyToBytes(String instr, SecureString{{nrt?}} keyPassPhrase = null) - { - const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; - const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; - String pemstr = instr.Trim(); - byte[] binkey; - - if (!pemstr.StartsWith(pemprivheader) || !pemstr.EndsWith(pemprivfooter)) - return null; - - StringBuilder sb = new StringBuilder(pemstr); - sb.Replace(pemprivheader, ""); - sb.Replace(pemprivfooter, ""); - String pvkstr = sb.ToString().Trim(); - - try - { // if there are no PEM encryption info lines, this is an UNencrypted PEM private key - binkey = Convert.FromBase64String(pvkstr); - return binkey; - } - catch (System.FormatException) - { - StringReader str = new StringReader(pvkstr); - - //-------- read PEM encryption info. lines and extract salt ----- - if (!str.ReadLine(){{nrt!}}.StartsWith("Proc-Type: 4,ENCRYPTED")) // TODO: what do we do here if ReadLine is null? - return null; - - String saltline = str.ReadLine(){{nrt!}}; // TODO: what do we do here if ReadLine is null? - if (!saltline.StartsWith("DEK-Info: DES-EDE3-CBC,")) - return null; - - String saltstr = saltline.Substring(saltline.IndexOf(",") + 1).Trim(); - byte[] salt = new byte[saltstr.Length / 2]; - for (int i = 0; i < salt.Length; i++) - salt[i] = Convert.ToByte(saltstr.Substring(i * 2, 2), 16); - - if (!(str.ReadLine() == "")) - return null; - - //------ remaining b64 data is encrypted RSA key ---- - String encryptedstr = str.ReadToEnd(); - - try - { //should have b64 encrypted RSA key now - binkey = Convert.FromBase64String(encryptedstr); - } - catch (System.FormatException) - { //data is not in base64 format - return null; - } - - // TODO: what do we do here if keyPassPhrase is null? - byte[] deskey = GetEncryptedKey(salt, keyPassPhrase{{nrt!}}, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes - if (deskey == null) - return null; - - //------ Decrypt the encrypted 3des-encrypted RSA private key ------ - byte[]{{nrt?}} rsakey = DecryptKey(binkey, deskey, salt); //OpenSSL uses salt value in PEM header also as 3DES IV - - return rsakey; - } - } - - private RSACryptoServiceProvider{{nrt?}} DecodeRSAPrivateKey(byte[] privkey) - { - byte[] MODULUS, E, D, P, Q, DP, DQ, IQ; - - // --------- Set up stream to decode the asn.1 encoded RSA private key ------ - MemoryStream mem = new MemoryStream(privkey); - BinaryReader binr = new BinaryReader(mem); //wrap Memory Stream with BinaryReader for easy reading - byte bt = 0; - ushort twobytes = 0; - int elems = 0; - try - { - twobytes = binr.ReadUInt16(); - if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81) - binr.ReadByte(); //advance 1 byte - else if (twobytes == 0x8230) - binr.ReadInt16(); //advance 2 bytes - else - return null; - - twobytes = binr.ReadUInt16(); - if (twobytes != 0x0102) //version number - return null; - - bt = binr.ReadByte(); - if (bt != 0x00) - return null; - - //------ all private key components are Integer sequences ---- - elems = GetIntegerSize(binr); - MODULUS = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - E = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - D = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - P = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - Q = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - DP = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - DQ = binr.ReadBytes(elems); - - elems = GetIntegerSize(binr); - IQ = binr.ReadBytes(elems); - - // ------- create RSACryptoServiceProvider instance and initialize with public key ----- - RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(); - RSAParameters RSAparams = new RSAParameters(); - RSAparams.Modulus = MODULUS; - RSAparams.Exponent = E; - RSAparams.D = D; - RSAparams.P = P; - RSAparams.Q = Q; - RSAparams.DP = DP; - RSAparams.DQ = DQ; - RSAparams.InverseQ = IQ; - RSA.ImportParameters(RSAparams); - return RSA; - } - catch (Exception) - { - return null; - } - finally - { - binr.Close(); - } - } - - private int GetIntegerSize(BinaryReader binr) - { - byte bt = 0; - byte lowbyte = 0x00; - byte highbyte = 0x00; - int count = 0; - bt = binr.ReadByte(); - if (bt != 0x02) //expect integer - return 0; - - bt = binr.ReadByte(); - - if (bt == 0x81) - count = binr.ReadByte(); // data size in next byte - else if (bt == 0x82) - { - highbyte = binr.ReadByte(); // data size in next 2 bytes - lowbyte = binr.ReadByte(); - byte[] modint = { lowbyte, highbyte, 0x00, 0x00 }; - count = BitConverter.ToInt32(modint, 0); - } - else - count = bt; // we already have the data size - - while (binr.ReadByte() == 0x00) - //remove high order zeros in data - count -= 1; - - binr.BaseStream.Seek(-1, SeekOrigin.Current); - - //last ReadByte wasn't a removed zero, so back up a byte - return count; - } - - private byte[] GetEncryptedKey(byte[] salt, SecureString secpswd, int count, int miter) - { - IntPtr unmanagedPswd = IntPtr.Zero; - int HASHLENGTH = 16; //MD5 bytes - byte[] keymaterial = new byte[HASHLENGTH * miter]; //to store concatenated Mi hashed results - - byte[] psbytes = new byte[secpswd.Length]; - unmanagedPswd = Marshal.SecureStringToGlobalAllocAnsi(secpswd); - Marshal.Copy(unmanagedPswd, psbytes, 0, psbytes.Length); - Marshal.ZeroFreeGlobalAllocAnsi(unmanagedPswd); - - // --- concatenate salt and pswd bytes into fixed data array --- - byte[] data00 = new byte[psbytes.Length + salt.Length]; - Array.Copy(psbytes, data00, psbytes.Length); //copy the pswd bytes - Array.Copy(salt, 0, data00, psbytes.Length, salt.Length); //concatenate the salt bytes - - // ---- do multi-hashing and concatenate results D1, D2 ... into keymaterial bytes ---- - MD5 md5 = MD5.Create(); - byte[]{{nrt?}} result = null; - byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget - - for (int j = 0; j < miter; j++) - { - // ---- Now hash consecutively for count times ------ - if (j == 0) - result = data00; //initialize - else - { - Array.Copy(result{{nrt!}}, hashtarget, result{{nrt!}}.Length); // TODO: what do we do if result is null here? - Array.Copy(data00, 0, hashtarget, result.Length, data00.Length); - result = hashtarget; - } - - for (int i = 0; i < count; i++) - result = md5.ComputeHash(result); - - Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //concatenate to keymaterial - } - byte[] deskey = new byte[24]; - Array.Copy(keymaterial, deskey, deskey.Length); - - Array.Clear(psbytes, 0, psbytes.Length); - Array.Clear(data00, 0, data00.Length); - Array.Clear(result{{nrt!}}, 0, result{{nrt!}}.Length); // TODO: what do we do if result is null here? - Array.Clear(hashtarget, 0, hashtarget.Length); - Array.Clear(keymaterial, 0, keymaterial.Length); - return deskey; - } - - private byte[]{{nrt?}} DecryptKey(byte[] cipherData, byte[] desKey, byte[] IV) - { - MemoryStream memst = new MemoryStream(); - TripleDES alg = TripleDES.Create(); - alg.Key = desKey; - alg.IV = IV; - try - { - CryptoStream cs = new CryptoStream(memst, alg.CreateDecryptor(), CryptoStreamMode.Write); - cs.Write(cipherData, 0, cipherData.Length); - cs.Close(); - } - catch (Exception) - { - return null; - } - byte[] decryptedData = memst.ToArray(); - return decryptedData; - } - - /// - /// Detect the key type from the pem file. - /// - /// key file path in pem format - /// - private PrivateKeyType GetKeyType(string keyFilePath) - { - if (!File.Exists(keyFilePath)) - throw new Exception("Key file path does not exist."); - - var ecPrivateKeyHeader = "BEGIN EC PRIVATE KEY"; - var ecPrivateKeyFooter = "END EC PRIVATE KEY"; - var rsaPrivateKeyHeader = "BEGIN RSA PRIVATE KEY"; - var rsaPrivateFooter = "END RSA PRIVATE KEY"; - //var pkcs8Header = "BEGIN PRIVATE KEY"; - //var pkcs8Footer = "END PRIVATE KEY"; - var keyType = PrivateKeyType.None; - var key = File.ReadAllLines(keyFilePath); - - if (key[0].ToString().Contains(rsaPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(rsaPrivateFooter)) - keyType = PrivateKeyType.RSA; - else if (key[0].ToString().Contains(ecPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - keyType = PrivateKeyType.ECDSA; - - else if (key[0].ToString().Contains(ecPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) - { - /* this type of key can hold many type different types of private key, but here due lack of pem header - Considering this as EC key - */ - //TODO :- update the key based on oid - keyType = PrivateKeyType.ECDSA; - } - else - throw new Exception("Either the key is invalid or key is not supported"); - - return keyType; - } - } -} diff --git a/generation/templates/libraries/generichost/HttpSigningToken.mustache b/generation/templates/libraries/generichost/HttpSigningToken.mustache deleted file mode 100644 index f9c0167a..00000000 --- a/generation/templates/libraries/generichost/HttpSigningToken.mustache +++ /dev/null @@ -1,45 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A token constructed from an HttpSigningConfiguration - /// - {{>visibility}} class HttpSignatureToken : TokenBase - { - private HttpSigningConfiguration _configuration; - - /// - /// Constructs an HttpSignatureToken object. - /// - /// - /// - public HttpSignatureToken(HttpSigningConfiguration configuration, TimeSpan? timeout = null) : base(timeout) - { - _configuration = configuration; - } - - /// - /// Places the token in the header. - /// - /// - /// - /// - public void UseInHeader(System.Net.Http.HttpRequestMessage request, string requestBody, CancellationToken cancellationToken = default{{^netstandard20OrLater}}(System.Threading.CancellationToken){{/netstandard20OrLater}}) - { - var signedHeaders = _configuration.GetHttpSignedHeader(request, requestBody, cancellationToken); - - foreach (var signedHeader in signedHeaders) - request.Headers.Add(signedHeader.Key, signedHeader.Value); - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/IApi.mustache b/generation/templates/libraries/generichost/IApi.mustache deleted file mode 100644 index af31cffe..00000000 --- a/generation/templates/libraries/generichost/IApi.mustache +++ /dev/null @@ -1,15 +0,0 @@ -using System.Net.Http; - -namespace {{packageName}}.{{apiPackage}} -{ - /// - /// Any Api client - /// - {{>visibility}} interface {{interfacePrefix}}Api - { - /// - /// The HttpClient - /// - HttpClient HttpClient { get; } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/IHostBuilderExtensions.mustache b/generation/templates/libraries/generichost/IHostBuilderExtensions.mustache deleted file mode 100644 index 948f0664..00000000 --- a/generation/templates/libraries/generichost/IHostBuilderExtensions.mustache +++ /dev/null @@ -1,55 +0,0 @@ -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using {{packageName}}.{{clientPackage}}; - -namespace {{packageName}}.Extensions -{ - /// - /// Extension methods for IHostBuilder - /// - {{>visibility}} static class IHostBuilderExtensions - { - {{^hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - IServiceCollectionExtensions.Add{{apiName}}(services, config); - }); - - return builder; - } - - {{/hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder, Action options) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - options(context, services, config); - - IServiceCollectionExtensions.Add{{apiName}}(services, config); - }); - - return builder; - } - } -} diff --git a/generation/templates/libraries/generichost/IHttpClientBuilderExtensions.mustache b/generation/templates/libraries/generichost/IHttpClientBuilderExtensions.mustache deleted file mode 100644 index 053c0226..00000000 --- a/generation/templates/libraries/generichost/IHttpClientBuilderExtensions.mustache +++ /dev/null @@ -1,75 +0,0 @@ -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Net.Http; -using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} -using Polly.Timeout; -using Polly.Extensions.Http; -using Polly;{{/supportsRetry}} - -namespace {{packageName}}.Extensions -{ - /// - /// Extension methods for IHttpClientBuilder - /// - {{>visibility}} static class IHttpClientBuilderExtensions - { - {{#supportsRetry}} - /// - /// Adds a Polly retry policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) - { - client.AddPolicyHandler(RetryPolicy(retries)); - - return client; - } - - /// - /// Adds a Polly timeout policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) - { - client.AddPolicyHandler(TimeoutPolicy(timeout)); - - return client; - } - - /// - /// Adds a Polly circuit breaker to your clients. - /// - /// - /// - /// - /// - public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - { - client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); - - return client; - } - - private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) - => HttpPolicyExtensions - .HandleTransientHttpError() - .Or() - .RetryAsync(retries); - - private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) - => Policy.TimeoutAsync(timeout); - - private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( - PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); - {{/supportsRetry}} - } -} diff --git a/generation/templates/libraries/generichost/IServiceCollectionExtensions.mustache b/generation/templates/libraries/generichost/IServiceCollectionExtensions.mustache deleted file mode 100644 index 14184ac4..00000000 --- a/generation/templates/libraries/generichost/IServiceCollectionExtensions.mustache +++ /dev/null @@ -1,69 +0,0 @@ -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Linq; -using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.{{clientPackage}}; - -namespace {{packageName}}.Extensions -{ - /// - /// Extension methods for IServiceCollection - /// - {{>visibility}} static class IServiceCollectionExtensions - { - {{^hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - public static void Add{{apiName}}(this IServiceCollection services) - { - HostConfiguration config = new{{^net70OrLater}} HostConfiguration{{/net70OrLater}}(services); - Add{{apiName}}(services, config); - } - - {{/hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static void Add{{apiName}}(this IServiceCollection services, Action options) - { - HostConfiguration config = new{{^net70OrLater}} HostConfiguration{{/net70OrLater}}(services); - options(config); - Add{{apiName}}(services, config); - } - - internal static void Add{{apiName}}(IServiceCollection services, HostConfiguration host) - { - if (!host.HttpClientsAdded) - host.Add{{apiName}}HttpClients(); - - services.AddSingleton(); - - // ensure that a token provider was provided for this token type - // if not, default to RateLimitProvider - var containerServices = services.Where(s => s.ServiceType.IsGenericType && - s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); - - foreach(var containerService in containerServices) - { - var tokenType = containerService.ServiceType.GenericTypeArguments[0]; - - var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); - - if (provider == null) - { - services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); - services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), - s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); - } - } - } - } -} diff --git a/generation/templates/libraries/generichost/ImplementsIEquatable.mustache b/generation/templates/libraries/generichost/ImplementsIEquatable.mustache deleted file mode 100644 index dd576dd0..00000000 --- a/generation/templates/libraries/generichost/ImplementsIEquatable.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#equatable}}{{#readOnlyVars}}{{#-first}}IEquatable<{{classname}}{{nrt?}}> {{/-first}}{{/readOnlyVars}}{{/equatable}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ImplementsValidatable.mustache b/generation/templates/libraries/generichost/ImplementsValidatable.mustache deleted file mode 100644 index 7c3f0e02..00000000 --- a/generation/templates/libraries/generichost/ImplementsValidatable.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#validatable}}IValidatableObject {{/validatable}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/JsonConverter.mustache b/generation/templates/libraries/generichost/JsonConverter.mustache deleted file mode 100644 index 189acfd7..00000000 --- a/generation/templates/libraries/generichost/JsonConverter.mustache +++ /dev/null @@ -1,648 +0,0 @@ - /// - /// A Json converter for type - /// - {{>visibility}} class {{classname}}JsonConverter : JsonConverter<{{classname}}> - { - {{#allVars}} - {{#isDateTime}} - /// - /// The format to use to serialize {{name}} - /// - public static string {{name}}Format { get; set; } = "{{{dateTimeFormat}}}"; - - {{/isDateTime}} - {{#isDate}} - /// - /// The format to use to serialize {{name}} - /// - public static string {{name}}Format { get; set; } = "{{{dateFormat}}}"; - - {{/isDate}} - {{/allVars}} - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - {{#lambda.trimTrailingWithNewLine}} - {{#lambda.trimLineBreaks}} - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - {{#allVars}} - Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; - {{#-last}} - - {{/-last}} - {{/allVars}} - {{#discriminator}} - {{#children}} - {{#-first}} - string{{nrt?}} discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "{{discriminator.propertyBaseName}}"); - - {{/-first}} - if (discriminator != null && discriminator.Equals("{{name}}")) - return JsonSerializer.Deserialize<{{{name}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - {{/children}} - {{/discriminator}} - {{#model.discriminator}} - {{#model.hasDiscriminatorWithNonEmptyMapping}} - {{#mappedModels}} - {{#model}} - {{^vendorExtensions.x-duplicated-data-type}} - {{classname}}{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} = null; - {{#-last}} - - {{/-last}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/model}} - {{/mappedModels}} - Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; - while (utf8JsonReaderDiscriminator.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) - { - string{{nrt?}} localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); - utf8JsonReaderDiscriminator.Read(); - if (localVarJsonPropertyName{{nrt?}}.Equals("{{propertyBaseName}}"){{#nrt}} ?? false{{/nrt}}) - { - string{{nrt?}} discriminator = utf8JsonReaderDiscriminator.GetString(); - {{#mappedModels}} - if (discriminator{{nrt?}}.Equals("{{mappingName}}"){{#nrt}} ?? false{{/nrt}}) - { - Utf8JsonReader utf8JsonReader{{model.classname}} = utf8JsonReader; - {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} = JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader{{model.classname}}, jsonSerializerOptions); - } - {{/mappedModels}} - } - } - } - - {{/model.hasDiscriminatorWithNonEmptyMapping}} - {{/model.discriminator}} - {{^model.discriminator}} - {{#composedSchemas}} - {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; - {{#-last}} - - Utf8JsonReader utf8JsonReaderOneOf = utf8JsonReader; - while (utf8JsonReaderOneOf.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderOneOf.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderOneOf.CurrentDepth) - break; - - if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) - { - {{#oneOf}} - Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; - ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); - {{^-last}} - - {{/-last}} - {{/oneOf}} - } - } - {{/-last}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/oneOf}} - - {{#anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; - {{#-last}} - - Utf8JsonReader utf8JsonReaderAnyOf = utf8JsonReader; - while (utf8JsonReaderAnyOf.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) - break; - - if (utf8JsonReaderAnyOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderAnyOf.CurrentDepth - 1) - { - {{#anyOf}} - Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; - ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); - {{^-last}} - - {{/-last}} - {{/anyOf}} - } - } - {{/-last}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/anyOf}} - - {{/composedSchemas}} - {{/model.discriminator}} - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string{{nrt?}} localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - {{#allVars}} - case "{{baseName}}": - {{#isString}} - {{^isMap}} - {{^isEnum}} - {{^isUuid}} - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetString(){{^isNullable}}{{nrt!}}{{/isNullable}}); - {{/isUuid}} - {{/isEnum}} - {{/isMap}} - {{/isString}} - {{#isBoolean}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetBoolean()); - {{/isBoolean}} - {{#isNumeric}} - {{^isEnum}} - {{#isDouble}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDouble()); - {{/isDouble}} - {{#isDecimal}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDecimal()); - {{/isDecimal}} - {{#isFloat}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}(float)utf8JsonReader.GetDouble()); - {{/isFloat}} - {{#isLong}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int64()); - {{/isLong}} - {{^isLong}} - {{^isFloat}} - {{^isDecimal}} - {{^isDouble}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); - {{/isDouble}} - {{/isDecimal}} - {{/isFloat}} - {{/isLong}} - {{/isEnum}} - {{/isNumeric}} - {{#isDate}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{#supportsDateOnly}}DateOnly{{/supportsDateOnly}}{{^supportsDateOnly}}DateTime{{/supportsDateOnly}}{{#isNullable}}?{{/isNullable}}>(ref utf8JsonReader, jsonSerializerOptions)); - {{/isDate}} - {{#isDateTime}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - {{/isDateTime}} - {{#isEnum}} - {{^isMap}} - {{#isNumeric}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}})utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); - {{/isNumeric}} - {{^isNumeric}} - string{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = utf8JsonReader.GetString(); - {{^isInnerEnum}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{{datatypeWithEnum}}}ValueConverter.FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); - {{/isInnerEnum}} - {{#isInnerEnum}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{classname}}.{{{datatypeWithEnum}}}FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); - {{/isInnerEnum}} - {{/isNumeric}} - {{/isMap}} - {{/isEnum}} - {{#isUuid}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetGuid()); - {{/isUuid}} - {{^isUuid}} - {{^isEnum}} - {{^isString}} - {{^isBoolean}} - {{^isNumeric}} - {{^isDate}} - {{^isDateTime}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref utf8JsonReader, jsonSerializerOptions){{^isNullable}}{{nrt!}}{{/isNullable}}); - {{/isDateTime}} - {{/isDate}} - {{/isNumeric}} - {{/isBoolean}} - {{/isString}} - {{/isEnum}} - {{/isUuid}} - break; - {{/allVars}} - default: - break; - } - } - } - - {{#allVars}} - {{#required}} - if (!{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet) - throw new ArgumentException("Property is required for class {{classname}}.", nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}})); - - {{/required}} - {{/allVars}} - {{#allVars}} - {{^isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet && {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.Value == null) - throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}), "Property is not nullable for class {{classname}}."); - - {{/isNullable}} - {{/allVars}} - {{^vendorExtensions.x-duplicated-data-type}} - {{#model.discriminator}} - {{#model.hasDiscriminatorWithNonEmptyMapping}} - {{#mappedModels}} - if ({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} != null) - return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); - - {{#-last}} - throw new JsonException(); - {{/-last}} - {{/mappedModels}} - {{/model.hasDiscriminatorWithNonEmptyMapping}} - {{/model.discriminator}} - {{^composedSchemas.oneOf}} - {{^required}} - {{#model.composedSchemas.anyOf}} - Option<{{baseType}}{{>NullConditionalProperty}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null - ? default - : new Option<{{baseType}}{{>NullConditionalProperty}}>({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); - {{/model.composedSchemas.anyOf}} - {{#-last}} - - {{/-last}} - {{/required}} - return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue{{#required}}.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/required}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); - {{/composedSchemas.oneOf}} - {{^model.discriminator}} - {{#composedSchemas}} - {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} != null) - return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}ParsedValue{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); - - {{/vendorExtensions.x-duplicated-data-type}} - {{#-last}} - throw new JsonException(); - {{/-last}} - {{/oneOf}} - {{/composedSchemas}} - {{/model.discriminator}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/lambda.trimLineBreaks}} - {{/lambda.trimTrailingWithNewLine}} - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) - { - {{#lambda.trimLineBreaks}} - {{#lambda.copy}} - {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} - {{/lambda.copy}} - {{#discriminator}} - {{#children}} - if ({{#lambda.pasteLine}}{{/lambda.pasteLine}} is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){ - JsonSerializer.Serialize<{{{name}}}>(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); - return; - } - - {{/children}} - {{/discriminator}} - writer.WriteStartObject(); - - {{#model.discriminator}} - {{#model.hasDiscriminatorWithNonEmptyMapping}} - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) - {{#isPrimitiveType}} - {{#isString}} - writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); - {{/isString}} - {{#isBoolean}} - writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isBoolean}} - {{#isNumeric}} - writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isNumeric}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - { - {{baseType}}JsonConverter {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}} = ({{baseType}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.GetType())); - {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}}.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - {{/isPrimitiveType}} - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - {{/model.hasDiscriminatorWithNonEmptyMapping}} - {{/model.discriminator}} - {{^model.discriminator}} - {{#composedSchemas}} - {{#anyOf}} - if ({{#lambda.joinWithAmpersand}}{{^required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet {{/required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null{{/lambda.joinWithAmpersand}}) - {{#isPrimitiveType}} - {{#isString}} - writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); - {{/isString}} - {{#isBoolean}} - writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isBoolean}} - {{#isNumeric}} - writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isNumeric}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - { - {{datatypeWithEnum}}JsonConverter {{datatypeWithEnum}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}.GetType())); - {{datatypeWithEnum}}JsonConverter.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}, jsonSerializerOptions); - } - {{/isPrimitiveType}} - - {{/anyOf}} - {{/composedSchemas}} - {{/model.discriminator}} - WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); - writer.WriteEndObject(); - {{/lambda.trimLineBreaks}} - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) - { - {{#lambda.trimTrailingWithNewLine}} - {{#lambda.trimLineBreaks}} - {{#allVars}} - {{^isDiscriminator}} - {{^isNullable}} - {{#vendorExtensions.x-is-reference-type}} - if ({{^required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet && {{/required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) - throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}), "Property is required for class {{classname}}."); - - {{/vendorExtensions.x-is-reference-type}} - {{/isNullable}} - {{/isDiscriminator}} - {{/allVars}} - {{#allVars}} - {{#isDiscriminator}} - {{^model.composedSchemas.anyOf}} - {{^model.composedSchemas.oneOf}} - writer.WriteString("{{baseName}}", {{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{/isEnum}}{{#isNew}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}.Value{{/required}}){{/isEnum}}{{/isNew}}); - - {{/model.composedSchemas.oneOf}} - {{/model.composedSchemas.anyOf}} - {{/isDiscriminator}} - {{^isDiscriminator}} - {{#isString}} - {{^isMap}} - {{^isEnum}} - {{^isUuid}} - {{#lambda.copy}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); - {{/lambda.copy}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isUuid}} - {{/isEnum}} - {{/isMap}} - {{/isString}} - {{#isBoolean}} - {{#lambda.copy}} - writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copy}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isBoolean}} - {{^isEnum}} - {{#isNumeric}} - {{#lambda.copy}} - writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copy}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isNumeric}} - {{/isEnum}} - {{#isDate}} - {{#lambda.copy}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); - {{/lambda.copy}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isDate}} - {{#isDateTime}} - {{#lambda.copy}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); - {{/lambda.copy}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isDateTime}} - {{#isEnum}} - {{#isNumeric}} - {{#lambda.copy}} - writer.WriteNumber("{{baseName}}", {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}})); - {{/lambda.copy}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isNumeric}} - {{^isMap}} - {{^isNumeric}} - {{#isInnerEnum}} - {{#isNullable}} - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); - else - writer.WriteNull("{{baseName}}"); - - {{/isNullable}} - {{^isNullable}} - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); - {{/isNullable}} - {{/isInnerEnum}} - {{^isInnerEnum}} - {{#lambda.copy}} - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} - {{/lambda.copy}} - {{#required}} - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) - writer.WriteNull("{{baseName}}"); - else - { - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.Value); - {{#allowableValues}} - {{#enumVars}} - {{#-first}} - {{#isString}} - if ({{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue != null){{! we cant use name here because enumVar also has a name property, so use the paste lambda instead }} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); - else - writer.WriteNull("{{baseName}}"); - {{/isString}} - {{^isString}} - writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); - {{/isString}} - {{/-first}} - {{/enumVars}} - {{/allowableValues}} - } - {{/isNullable}} - {{^isNullable}} - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); - {{#allowableValues}} - {{#enumVars}} - {{#-first}} - {{^isNumeric}} - writer.WriteString("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); - {{/isNumeric}} - {{#isNumeric}} - writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/lambda.camelcase_sanitize_param}}RawValue); - {{/isNumeric}} - {{/-first}} - {{/enumVars}} - {{/allowableValues}} - {{/isNullable}} - - {{/required}} - {{^required}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option{{nrt!}}.Value != null) - { - var {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value{{nrt!}}.Value); - writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); - } - else - writer.WriteNull("{{baseName}}"); - {{/isNullable}} - {{^isNullable}} - { - var {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{nrt!}}.Value); - writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); - } - {{/isNullable}} - {{/required}} - {{/isInnerEnum}} - {{/isNumeric}} - {{/isMap}} - {{/isEnum}} - {{#isUuid}} - {{#lambda.copy}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copy}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isUuid}} - {{^isUuid}} - {{^isEnum}} - {{^isString}} - {{^isBoolean}} - {{^isNumeric}} - {{^isDate}} - {{^isDateTime}} - {{#required}} - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) - { - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - else - writer.WriteNull("{{baseName}}"); - {{/isNullable}} - {{^isNullable}} - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - {{/isNullable}} - {{/required}} - {{^required}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value != null) - { - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - else - writer.WriteNull("{{baseName}}"); - {{/isNullable}} - {{^isNullable}} - { - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - {{/isNullable}} - {{/required}} - {{/isDateTime}} - {{/isDate}} - {{/isNumeric}} - {{/isBoolean}} - {{/isString}} - {{/isEnum}} - {{/isUuid}} - {{/isDiscriminator}} - {{/allVars}} - {{/lambda.trimLineBreaks}} - {{/lambda.trimTrailingWithNewLine}} - } - } \ No newline at end of file diff --git a/generation/templates/libraries/generichost/JsonSerializerOptionsProvider.mustache b/generation/templates/libraries/generichost/JsonSerializerOptionsProvider.mustache deleted file mode 100644 index 93f80540..00000000 --- a/generation/templates/libraries/generichost/JsonSerializerOptionsProvider.mustache +++ /dev/null @@ -1,29 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System.Text.Json; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Provides the JsonSerializerOptions - /// - {{>visibility}} class JsonSerializerOptionsProvider - { - /// - /// the JsonSerializerOptions - /// - public JsonSerializerOptions Options { get; } - - /// - /// Instantiates a JsonSerializerOptionsProvider - /// - public JsonSerializerOptionsProvider(JsonSerializerOptions options) - { - Options = options; - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ModelBaseSignature.mustache b/generation/templates/libraries/generichost/ModelBaseSignature.mustache deleted file mode 100644 index 909a68e3..00000000 --- a/generation/templates/libraries/generichost/ModelBaseSignature.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{parent}}{{/lambda.camelcase_sanitize_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#isInherited}}{{^isNew}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/isNew}}{{#isNew}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{^required}}.Value{{/required}}){{/isEnum}}{{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.ToString(){{/isEnum}}{{/isNew}} {{/isInherited}}{{/isDiscriminator}}{{/allVars}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ModelSignature.mustache b/generation/templates/libraries/generichost/ModelSignature.mustache deleted file mode 100644 index 39aa11f8..00000000 --- a/generation/templates/libraries/generichost/ModelSignature.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#model.allVars}}{{^isDiscriminator}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}{{#defaultValue}} = {{^required}}default{{/required}}{{#required}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{.}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/required}}{{/defaultValue}}{{^defaultValue}}{{#lambda.first}}{{#isNullable}} = default {{/isNullable}}{{^required}} = default {{/required}}{{/lambda.first}}{{/defaultValue}} {{/isDiscriminator}}{{/model.allVars}} diff --git a/generation/templates/libraries/generichost/OAuthToken.mustache b/generation/templates/libraries/generichost/OAuthToken.mustache deleted file mode 100644 index f450c3d0..00000000 --- a/generation/templates/libraries/generichost/OAuthToken.mustache +++ /dev/null @@ -1,41 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A token constructed with OAuth. - /// - {{>visibility}} class OAuthToken : TokenBase - { - private string _raw; - - /// - /// Consturcts an OAuthToken object. - /// - /// - /// - public OAuthToken(string value, TimeSpan? timeout = null) : base(timeout) - { - _raw = value; - } - - /// - /// Places the token in the header. - /// - /// - /// - public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName) - { - request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/OnDeserializationError.mustache b/generation/templates/libraries/generichost/OnDeserializationError.mustache deleted file mode 100644 index ff83a507..00000000 --- a/generation/templates/libraries/generichost/OnDeserializationError.mustache +++ /dev/null @@ -1,2 +0,0 @@ -if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); \ No newline at end of file diff --git a/generation/templates/libraries/generichost/OnErrorDefaultImplementation.mustache b/generation/templates/libraries/generichost/OnErrorDefaultImplementation.mustache deleted file mode 100644 index 7af8e076..00000000 --- a/generation/templates/libraries/generichost/OnErrorDefaultImplementation.mustache +++ /dev/null @@ -1,2 +0,0 @@ - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while sending the request to the server."); \ No newline at end of file diff --git a/generation/templates/libraries/generichost/OperationSignature.mustache b/generation/templates/libraries/generichost/OperationSignature.mustache deleted file mode 100644 index 83076f2b..00000000 --- a/generation/templates/libraries/generichost/OperationSignature.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#lambda.joinWithComma}}{{#allParams}}{{#required}}{{{dataType}}}{{>NullConditionalParameter}}{{/required}}{{^required}}Option<{{{dataType}}}{{>NullConditionalParameter}}>{{/required}} {{paramName}}{{#notRequiredOrIsNullable}} = default{{/notRequiredOrIsNullable}} {{/allParams}}System.Threading.CancellationToken cancellationToken = default{{^netstandard20OrLater}}(System.Threading.CancellationToken){{/netstandard20OrLater}}{{/lambda.joinWithComma}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/Option.mustache b/generation/templates/libraries/generichost/Option.mustache deleted file mode 100644 index eed49143..00000000 --- a/generation/templates/libraries/generichost/Option.mustache +++ /dev/null @@ -1,47 +0,0 @@ -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A wrapper for operation parameters which are not required - /// - public struct Option - { - /// - /// The value to send to the server - /// - public TType Value { get; } - - /// - /// When true the value will be sent to the server - /// - internal bool IsSet { get; } - - /// - /// A wrapper for operation parameters which are not required - /// - /// - public Option(TType value) - { - IsSet = true; - Value = value; - } - - /// - /// Implicitly converts this option to the contained type - /// - /// - public static implicit operator TType(Option option) => option.Value; - - /// - /// Implicitly converts the provided value to an Option - /// - /// - public static implicit operator Option(TType value) => new Option(value); - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/OptionProperty.mustache b/generation/templates/libraries/generichost/OptionProperty.mustache deleted file mode 100644 index d7504188..00000000 --- a/generation/templates/libraries/generichost/OptionProperty.mustache +++ /dev/null @@ -1 +0,0 @@ -new Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>( \ No newline at end of file diff --git a/generation/templates/libraries/generichost/README.client.mustache b/generation/templates/libraries/generichost/README.client.mustache deleted file mode 100644 index 371b9daa..00000000 --- a/generation/templates/libraries/generichost/README.client.mustache +++ /dev/null @@ -1,245 +0,0 @@ -# Created with Openapi Generator - - -## Run the following powershell command to generate the library - -```ps1 -$properties = @( - 'apiName={{apiName}}', - 'targetFramework={{targetFramework}}', - 'validatable={{validatable}}', - 'nullableReferenceTypes={{nullableReferenceTypes}}', - 'hideGenerationTimestamp={{hideGenerationTimestamp}}', - 'packageVersion={{packageVersion}}', - 'packageAuthors={{packageAuthors}}', - 'packageCompany={{packageCompany}}', - 'packageCopyright={{packageCopyright}}', - 'packageDescription={{packageDescription}}',{{#licenseId}} - 'licenseId={{.}}',{{/licenseId}} - 'packageName={{packageName}}', - 'packageTags={{packageTags}}', - 'packageTitle={{packageTitle}}' -) -join "," - -$global = @( - 'apiDocs={{generateApiDocs}}', - 'modelDocs={{generateModelDocs}}', - 'apiTests={{generateApiTests}}', - 'modelTests={{generateModelTests}}' -) -join "," - -java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate ` - -g csharp-netcore ` - -i .yaml ` - -o ` - --library generichost ` - --additional-properties $properties ` - --global-property $global ` - --git-host "{{gitHost}}" ` - --git-repo-id "{{gitRepoId}}" ` - --git-user-id "{{gitUserId}}" ` - --release-note "{{releaseNote}}" - # -t templates -``` - - -## Using the library in your project - -```cs -using System; -using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.Api; -using {{packageName}}.Client; -using {{packageName}}.Model; - -namespace YourProject -{ - public class Program - { - public static async Task Main(string[] args) - { - var host = CreateHostBuilder(args).Build();{{#apiInfo}}{{#apis}}{{#-first}} - var api = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - {{#operations}} - {{#-first}} - {{#operation}} - {{#-first}} - {{operationId}}ApiResponse apiResponse = await api.{{operationId}}Async("todo"); - {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}} model = apiResponse.Ok(); - {{/-first}} - {{/operation}} - {{/-first}} - {{/operations}} - {{/-first}} - {{/apis}} - {{/apiInfo}} - } - - public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .Configure{{apiName}}((context, options) => - { - {{#authMethods}} - {{#-first}} - // the type of token here depends on the api security specifications - ApiKeyToken token = new("", ClientUtils.ApiKeyHeader.Authorization); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - {{/-first}} - {{/authMethods}} - options.ConfigureJsonOptions((jsonOptions) => - { - // your custom converters if any - }); - - options.Add{{apiName}}HttpClients(builder: builder => builder - .AddRetryPolicy(2) - .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) - .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)) - // add whatever middleware you prefer - ); - }); - } -} -``` - -## Questions - -- What about HttpRequest failures and retries? - If supportsRetry is enabled, you can configure Polly in the ConfigureClients method. -- How are tokens used? - Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. - Other providers can be used with the UseProvider method. -- Does an HttpRequest throw an error when the server response is not Ok? - It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. - StatusCode and ReasonPhrase will contain information about the error. - If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. -- How do I validate requests and process responses? - Use the provided On and After methods in the Api class from the namespace {{packageName}}.Rest.DefaultApi. - Or provide your own class by using the generic Configure{{apiName}} method. - - -## Dependencies - -- [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later -- [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later{{#supportsRetry}} -- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later{{/supportsRetry}}{{#useCompareNetObjects}} -- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later{{/useCompareNetObjects}}{{#validatable}} -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later{{/validatable}}{{#apiDocs}} - - -## Documentation for API Endpoints - -All URIs are relative to *{{{basePath}}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | -------------{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} -*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}{{/apiDocs}}{{#modelDocs}} - - -## Documentation for Models - -{{#modelPackage}}{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md){{/model}}{{/models}}{{/modelPackage}} -{{^modelPackage}}No model defined in this package{{/modelPackage}}{{/modelDocs}} - - -## Documentation for Authorization - -{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} -{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} -{{#authMethods}} - -### {{name}} - -{{#isApiKey}}- **Type**: API key -- **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasicBasic}} -- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}} -- **Type**: Bearer Authentication -{{/isBasicBearer}} -{{#isHttpSignature}} -- **Type**: HTTP signature authentication -{{/isHttpSignature}} -{{#isOAuth}} -- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}}{{#scopes}} -- {{scope}}: {{description}}{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} - -## Build -- SDK version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Generator version: {{generatorVersion}} -- Build package: {{generatorClass}} - -## Api Information -- appName: {{appName}} -- appVersion: {{appVersion}} -- appDescription: {{appDescription}} - -## [OpenApi Global properties](https://openapi-generator.tech/docs/globals) -- generateAliasAsModel: {{generateAliasAsModel}} -- supportingFiles: {{supportingFiles}} -- models: omitted for brevity -- apis: omitted for brevity -- apiDocs: {{generateApiDocs}} -- modelDocs: {{generateModelDocs}} -- apiTests: {{generateApiTests}} -- modelTests: {{generateModelTests}} - -## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) -- allowUnicodeIdentifiers: {{allowUnicodeIdentifiers}} -- apiName: {{apiName}} -- caseInsensitiveResponseHeaders: {{caseInsensitiveResponseHeaders}} -- conditionalSerialization: {{conditionalSerialization}} -- disallowAdditionalPropertiesIfNotPresent: {{disallowAdditionalPropertiesIfNotPresent}} -- gitHost: {{gitHost}} -- gitRepoId: {{gitRepoId}} -- gitUserId: {{gitUserId}} -- hideGenerationTimestamp: {{hideGenerationTimestamp}} -- interfacePrefix: {{interfacePrefix}} -- library: {{library}} -- licenseId: {{licenseId}} -- modelPropertyNaming: {{modelPropertyNaming}} -- netCoreProjectFile: {{netCoreProjectFile}} -- nonPublicApi: {{nonPublicApi}} -- nullableReferenceTypes: {{nullableReferenceTypes}} -- optionalAssemblyInfo: {{optionalAssemblyInfo}} -- optionalEmitDefaultValues: {{optionalEmitDefaultValues}} -- optionalMethodArgument: {{optionalMethodArgument}} -- optionalProjectFile: {{optionalProjectFile}} -- packageAuthors: {{packageAuthors}} -- packageCompany: {{packageCompany}} -- packageCopyright: {{packageCopyright}} -- packageDescription: {{packageDescription}} -- packageGuid: {{packageGuid}} -- packageName: {{packageName}} -- packageTags: {{packageTags}} -- packageTitle: {{packageTitle}} -- packageVersion: {{packageVersion}} -- releaseNote: {{releaseNote}} -- returnICollection: {{returnICollection}} -- sortParamsByRequiredFlag: {{sortParamsByRequiredFlag}} -- sourceFolder: {{sourceFolder}} -- targetFramework: {{targetFramework}} -- useCollection: {{useCollection}} -- useDateTimeOffset: {{useDateTimeOffset}} -- useOneOfDiscriminatorLookup: {{useOneOfDiscriminatorLookup}} -- validatable: {{validatable}}{{#infoUrl}} -For more information, please visit [{{{.}}}]({{{.}}}){{/infoUrl}} - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/generation/templates/libraries/generichost/README.solution.mustache b/generation/templates/libraries/generichost/README.solution.mustache deleted file mode 100644 index f9c1c7f7..00000000 --- a/generation/templates/libraries/generichost/README.solution.mustache +++ /dev/null @@ -1 +0,0 @@ -# Created with Openapi Generator diff --git a/generation/templates/libraries/generichost/README.test.mustache b/generation/templates/libraries/generichost/README.test.mustache deleted file mode 100644 index e69de29b..00000000 diff --git a/generation/templates/libraries/generichost/RateLimitProvider`1.mustache b/generation/templates/libraries/generichost/RateLimitProvider`1.mustache deleted file mode 100644 index 4e44b3fd..00000000 --- a/generation/templates/libraries/generichost/RateLimitProvider`1.mustache +++ /dev/null @@ -1,76 +0,0 @@ -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Channels; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// Provides a token to the api clients. Tokens will be rate limited based on the provided TimeSpan. - /// - /// - {{>visibility}} class RateLimitProvider : TokenProvider where TTokenBase : TokenBase - { - internal Dictionary> AvailableTokens { get; } = new{{^net70OrLater}} Dictionary>{{/net70OrLater}}(); - - /// - /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. - /// - /// - public RateLimitProvider(TokenContainer container) : base(container.Tokens) - { - foreach(TTokenBase token in _tokens) - token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); - - {{#lambda.copy}} - BoundedChannelOptions options = new BoundedChannelOptions(_tokens.Length) - { - FullMode = BoundedChannelFullMode.DropWrite - }; - - AvailableTokens.Add(string.Empty, Channel.CreateBounded(options)); - {{/lambda.copy}} - {{#hasApiKeyMethods}} - if (container is TokenContainer apiKeyTokenContainer) - { - string[] headers = apiKeyTokenContainer.Tokens.Select(t => ClientUtils.ApiKeyHeaderToString(t.Header)).Distinct().ToArray(); - - foreach (string header in headers) - { - BoundedChannelOptions options = new BoundedChannelOptions(apiKeyTokenContainer.Tokens.Count(t => ClientUtils.ApiKeyHeaderToString(t.Header).Equals(header))) - { - FullMode = BoundedChannelFullMode.DropWrite - }; - - AvailableTokens.Add(header, Channel.CreateBounded(options)); - } - } - else - { - {{#lambda.indent1}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/lambda.indent1}} - } - {{/hasApiKeyMethods}} - {{^hasApiKeyMethods}} - {{#lambda.pasteLine}}{{/lambda.pasteLine}} - {{/hasApiKeyMethods}} - - foreach(Channel tokens in AvailableTokens.Values) - for (int i = 0; i < _tokens.Length; i++) - _tokens[i].TokenBecameAvailable += ((sender) => tokens.Writer.TryWrite((TTokenBase) sender)); - } - - internal override async System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(System.Threading.CancellationToken){{/netstandard20OrLater}}) - { - if (!AvailableTokens.TryGetValue(header, out Channel{{nrt?}} tokens)) - throw new KeyNotFoundException($"Could not locate a token for header '{header}'."); - - return await tokens.Reader.ReadAsync(cancellation).ConfigureAwait(false); - } - } -} diff --git a/generation/templates/libraries/generichost/SourceGenerationContext.mustache b/generation/templates/libraries/generichost/SourceGenerationContext.mustache deleted file mode 100644 index b1798c98..00000000 --- a/generation/templates/libraries/generichost/SourceGenerationContext.mustache +++ /dev/null @@ -1,9 +0,0 @@ -{{#useSourceGeneration}} - - /// - /// The {{classname}}SerializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] - [JsonSerializable(typeof({{classname}}))] - {{>visibility}} partial class {{classname}}SerializationContext : JsonSerializerContext { } -{{/useSourceGeneration}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/TokenBase.mustache b/generation/templates/libraries/generichost/TokenBase.mustache deleted file mode 100644 index 05f06b4a..00000000 --- a/generation/templates/libraries/generichost/TokenBase.mustache +++ /dev/null @@ -1,73 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// The base for all tokens. - /// - {{>visibility}} abstract class TokenBase - { - private DateTime _nextAvailable = DateTime.UtcNow; - private object _nextAvailableLock = new object(); - private readonly System.Timers.Timer _timer = new System.Timers.Timer(); - - - internal TimeSpan? Timeout { get; set; } - internal delegate void TokenBecameAvailableEventHandler(object sender); - internal event TokenBecameAvailableEventHandler{{nrt?}} TokenBecameAvailable; - - - /// - /// Initialize a TokenBase object. - /// - /// - internal TokenBase(TimeSpan? timeout = null) - { - Timeout = timeout; - - if (Timeout != null) - StartTimer(Timeout.Value); - } - - - /// - /// Starts the token's timer - /// - /// - internal void StartTimer(TimeSpan timeout) - { - Timeout = timeout; - _timer.Interval = Timeout.Value.TotalMilliseconds; - _timer.Elapsed += OnTimer; - _timer.AutoReset = true; - _timer.Start(); - } - - /// - /// Returns true while the token is rate limited. - /// - public bool IsRateLimited => _nextAvailable > DateTime.UtcNow; - - /// - /// Triggered when the server returns status code TooManyRequests - /// Once triggered the local timeout will be extended an arbitrary length of time. - /// - public void BeginRateLimit() - { - lock(_nextAvailableLock) - _nextAvailable = DateTime.UtcNow.AddSeconds(5); - } - - private void OnTimer(object{{nrt?}} sender, System.Timers.ElapsedEventArgs e) - { - if (TokenBecameAvailable != null && !IsRateLimited) - TokenBecameAvailable.Invoke(this); - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/TokenContainer`1.mustache b/generation/templates/libraries/generichost/TokenContainer`1.mustache deleted file mode 100644 index 3e8f1b15..00000000 --- a/generation/templates/libraries/generichost/TokenContainer`1.mustache +++ /dev/null @@ -1,39 +0,0 @@ -// -{{partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System.Linq; -using System.Collections.Generic; - -namespace {{packageName}}.{{clientPackage}} -{ - /// - /// A container for a collection of tokens. - /// - /// - {{>visibility}} sealed class TokenContainer where TTokenBase : TokenBase - { - /// - /// The collection of tokens - /// - public List Tokens { get; } = new List(); - - /// - /// Instantiates a TokenContainer - /// - public TokenContainer() - { - } - - /// - /// Instantiates a TokenContainer - /// - /// - public TokenContainer(System.Collections.Generic.IEnumerable tokens) - { - Tokens = tokens.ToList(); - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/TokenProvider`1.mustache b/generation/templates/libraries/generichost/TokenProvider`1.mustache deleted file mode 100644 index 52972546..00000000 --- a/generation/templates/libraries/generichost/TokenProvider`1.mustache +++ /dev/null @@ -1,38 +0,0 @@ -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Linq; -using System.Collections.Generic; -using {{packageName}}.{{clientPackage}}; - -namespace {{packageName}} -{ - /// - /// A class which will provide tokens. - /// - {{>visibility}} abstract class TokenProvider where TTokenBase : TokenBase - { - /// - /// The array of tokens. - /// - protected TTokenBase[] _tokens; - - internal abstract System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(System.Threading.CancellationToken){{/netstandard20OrLater}}); - - /// - /// Instantiates a TokenProvider. - /// - /// - public TokenProvider(IEnumerable tokens) - { - _tokens = tokens.ToArray(); - - if (_tokens.Length == 0) - throw new ArgumentException("You did not provide any tokens."); - } - } -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/ValidateRegex.mustache b/generation/templates/libraries/generichost/ValidateRegex.mustache deleted file mode 100644 index 78aba8fb..00000000 --- a/generation/templates/libraries/generichost/ValidateRegex.mustache +++ /dev/null @@ -1,7 +0,0 @@ -// {{{name}}} ({{{dataType}}}) pattern -Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); -{{#lambda.copy}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null && {{/lambda.copy}} -if ({{#lambda.first}}{{^required}}{{#lambda.pasteLine}}{{/lambda.pasteLine}} {{/required}}{{#isNullable}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/isNullable}}{{/lambda.first}}!regex{{{name}}}.Match(this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}}{{#isUuid}}.ToString(){{#lambda.first}}{{^required}}{{nrt!}} {{/required}}{{#isNullable}}! {{/isNullable}}{{/lambda.first}}{{/isUuid}}).Success) -{ - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/WriteProperty.mustache b/generation/templates/libraries/generichost/WriteProperty.mustache deleted file mode 100644 index 99659ac2..00000000 --- a/generation/templates/libraries/generichost/WriteProperty.mustache +++ /dev/null @@ -1,9 +0,0 @@ -{{#required}} -{{>WritePropertyHelper}} -{{/required}} -{{^required}} -if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) - {{#lambda.indent1}} - {{>WritePropertyHelper}} - {{/lambda.indent1}} -{{/required}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/WritePropertyHelper.mustache b/generation/templates/libraries/generichost/WritePropertyHelper.mustache deleted file mode 100644 index 183946cf..00000000 --- a/generation/templates/libraries/generichost/WritePropertyHelper.mustache +++ /dev/null @@ -1,9 +0,0 @@ -{{#isNullable}} -if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null) - {{#lambda.pasteLine}}{{/lambda.pasteLine}} -else - writer.WriteNull("{{baseName}}"); -{{/isNullable}} -{{^isNullable}} -{{#lambda.pasteLine}}{{/lambda.pasteLine}} -{{/isNullable}} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/api.mustache b/generation/templates/libraries/generichost/api.mustache deleted file mode 100644 index eccb02d5..00000000 --- a/generation/templates/libraries/generichost/api.mustache +++ /dev/null @@ -1,788 +0,0 @@ -{{#lambda.trimLineBreaks}} -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Collections.Generic; -{{#net80OrLater}} -{{#lambda.uniqueLines}} -{{#operations}} -{{#operation}} -{{#vendorExtensions.x-set-cookie}} -using System.Linq; -{{/vendorExtensions.x-set-cookie}} -{{/operation}} -{{/operations}} -{{/lambda.uniqueLines}} -{{/net80OrLater}} -using System.Net; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text.Json; -using {{packageName}}.{{clientPackage}}; -{{#hasImport}} -using {{packageName}}.{{modelPackage}}; -{{/hasImport}} -{{^netStandard}} -using System.Diagnostics.CodeAnalysis; -{{/netStandard}} - -namespace {{packageName}}.{{apiPackage}} -{ - {{#operations}} - /// - /// Represents a collection of functions to interact with the API endpoints - /// This class is registered as transient. - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}} : IApi - { - /// - /// The class containing the events - /// - {{classname}}Events Events { get; } - - {{#operation}} - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// <> - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - Task<{{interfacePrefix}}{{operationId}}ApiResponse> {{operationId}}Async({{>OperationSignature}}); - - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// <{{nrt?}}> - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - Task<{{interfacePrefix}}{{operationId}}ApiResponse{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}}); - {{^-last}} - - {{/-last}} - {{/operation}} - } - {{#operation}} - {{#responses}} - {{#-first}} - - /// - /// The - /// - {{>visibility}} interface {{interfacePrefix}}{{operationId}}ApiResponse : {{#lambda.joinWithComma}}{{packageName}}.{{clientPackage}}.{{interfacePrefix}}ApiResponse {{#responses}}{{#dataType}}{{interfacePrefix}}{{vendorExtensions.x-http-status}}<{{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{/dataType}}{{/responses}}{{/lambda.joinWithComma}} - { - {{#responses}} - {{#vendorExtensions.x-http-status-is-default}} - /// - /// Returns true if the response is the default response type - /// - /// - bool Is{{vendorExtensions.x-http-status}} { get; } - {{/vendorExtensions.x-http-status-is-default}} - {{^vendorExtensions.x-http-status-is-default}} - /// - /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}} - /// - /// - bool Is{{vendorExtensions.x-http-status}} { get; } - {{/vendorExtensions.x-http-status-is-default}} - {{^-last}} - - {{/-last}} - {{/responses}} - } - {{/-first}} - {{/responses}} - {{/operation}} - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} class {{classname}}Events - { - {{#lambda.trimTrailingWithNewLine}} - {{#operation}} - /// - /// The event raised after the server response - /// - public event EventHandler{{nrt?}} On{{operationId}}; - - /// - /// The event raised after an error querying the server - /// - public event EventHandler{{nrt?}} OnError{{operationId}}; - - internal void ExecuteOn{{operationId}}({{classname}}.{{operationId}}ApiResponse apiResponse) - { - On{{operationId}}?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnError{{operationId}}(Exception exception) - { - OnError{{operationId}}?.Invoke(this, new ExceptionEventArgs(exception)); - } - - {{/operation}} - {{/lambda.trimTrailingWithNewLine}} - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{classname}} - { - private JsonSerializerOptions _jsonSerializerOptions; - - /// - /// The logger factory - /// - public ILoggerFactory LoggerFactory { get; } - - /// - /// The logger - /// - public ILogger<{{classname}}> Logger { get; } - - /// - /// The HttpClient - /// - public HttpClient HttpClient { get; } - - /// - /// The class containing the events - /// - public {{classname}}Events Events { get; }{{#hasApiKeyMethods}} - - /// - /// A token provider of type - /// - public TokenProvider ApiKeyProvider { get; }{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - - /// - /// A token provider of type - /// - public TokenProvider BearerTokenProvider { get; }{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - - /// - /// A token provider of type - /// - public TokenProvider BasicTokenProvider { get; }{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - - /// - /// A token provider of type - /// - public TokenProvider HttpSignatureTokenProvider { get; }{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - - /// - /// A token provider of type - /// - public TokenProvider OauthTokenProvider { get; }{{/hasOAuthMethods}} - - {{#net80OrLater}} - {{#lambda.unique}} - {{#operation}} - {{#vendorExtensions.x-set-cookie}} - /// - /// The token cookie container - /// - public {{packageName}}.{{clientPackage}}.CookieContainer CookieContainer { get; } - - {{/vendorExtensions.x-set-cookie}} - {{/operation}} - {{/lambda.unique}} - {{/net80OrLater}} - /// - /// Initializes a new instance of the class. - /// - /// - public {{classname}}(ILogger<{{classname}}> logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, {{classname}}Events {{#lambda.camelcase_sanitize_param}}{{classname}}Events{{/lambda.camelcase_sanitize_param}}{{#hasApiKeyMethods}}, - TokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}}, - TokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}}, - TokenProvider basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}}, - TokenProvider httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}}, - TokenProvider oauthTokenProvider{{/hasOAuthMethods}}{{#net80OrLater}}{{#operation}}{{#lambda.uniqueLines}}{{#vendorExtensions.x-set-cookie}}, - {{packageName}}.{{clientPackage}}.CookieContainer cookieContainer{{/vendorExtensions.x-set-cookie}}{{/lambda.uniqueLines}}{{/operation}}{{/net80OrLater}}) - { - _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - LoggerFactory = loggerFactory; - Logger = LoggerFactory.CreateLogger<{{classname}}>(); - HttpClient = httpClient; - Events = {{#lambda.camelcase_sanitize_param}}{{classname}}Events{{/lambda.camelcase_sanitize_param}};{{#hasApiKeyMethods}} - ApiKeyProvider = apiKeyProvider;{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} - BearerTokenProvider = bearerTokenProvider;{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}} - BasicTokenProvider = basicTokenProvider;{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}} - HttpSignatureTokenProvider = httpSignatureTokenProvider;{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} - OauthTokenProvider = oauthTokenProvider;{{/hasOAuthMethods}}{{#net80OrLater}}{{#operation}}{{#lambda.uniqueLines}}{{#vendorExtensions.x-set-cookie}} - CookieContainer = cookieContainer;{{/vendorExtensions.x-set-cookie}}{{/lambda.uniqueLines}}{{/operation}}{{/net80OrLater}} - } - {{#operation}} - - {{#allParams}} - {{#-first}} - partial void Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - - {{/-first}} - {{/allParams}} - {{#vendorExtensions.x-has-not-nullable-reference-types}} - /// - /// Validates the request parameters - /// - {{#vendorExtensions.x-not-nullable-reference-types}} - /// - {{/vendorExtensions.x-not-nullable-reference-types}} - /// - private void Validate{{operationId}}({{#vendorExtensions.x-not-nullable-reference-types}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-not-nullable-reference-types}}) - { - {{#lambda.trimTrailingWithNewLine}} - {{#vendorExtensions.x-not-nullable-reference-types}} - {{#required}} - {{^vendorExtensions.x-is-value-type}} - if ({{paramName}} == null) - throw new ArgumentNullException(nameof({{paramName}})); - - {{/vendorExtensions.x-is-value-type}} - {{/required}} - {{^required}} - {{^vendorExtensions.x-is-value-type}} - if ({{paramName}}.IsSet && {{paramName}}.Value == null) - throw new ArgumentNullException(nameof({{paramName}})); - - {{/vendorExtensions.x-is-value-type}} - {{/required}} - {{/vendorExtensions.x-not-nullable-reference-types}} - {{/lambda.trimTrailingWithNewLine}} - } - - {{/vendorExtensions.x-has-not-nullable-reference-types}} - /// - /// Processes the server response - /// - /// - {{#allParams}} - /// - {{/allParams}} - private void After{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}{{interfacePrefix}}{{operationId}}ApiResponse apiResponseLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) - { - bool suppressDefaultLog = false; - After{{operationId}}({{#lambda.joinWithComma}}ref suppressDefaultLog apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); -{{>AfterOperationDefaultImplementation}} - } - - /// - /// Processes the server response - /// - /// - /// - {{#allParams}} - /// - {{/allParams}} - partial void After{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog {{interfacePrefix}}{{operationId}}ApiResponse apiResponseLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); - - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - {{#allParams}} - /// - {{/allParams}} - private void OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) - { - bool suppressDefaultLog = false; - OnError{{operationId}}({{#lambda.joinWithComma}}ref suppressDefaultLog exception pathFormat path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); -{{>OnErrorDefaultImplementation}} - } - - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - {{#allParams}} - /// - {{/allParams}} - partial void OnError{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); - - /// - /// {{summary}} {{notes}} - /// - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// <> - public async Task<{{interfacePrefix}}{{operationId}}ApiResponse{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}}) - { - try - { - return await {{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } - } - - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// <> - public async Task<{{interfacePrefix}}{{operationId}}ApiResponse> {{operationId}}Async({{>OperationSignature}}) - { - {{#lambda.trimLineBreaks}} - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - {{#vendorExtensions.x-has-not-nullable-reference-types}} - Validate{{operationId}}({{#vendorExtensions.x-not-nullable-reference-types}}{{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-not-nullable-reference-types}}); - - {{/vendorExtensions.x-has-not-nullable-reference-types}} - {{#allParams}} - {{#-first}} - Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - - {{/-first}} - {{/allParams}} - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - {{^servers}} - uriBuilderLocalVar.Host = HttpClient.BaseAddress{{nrt!}}.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "{{path}}"; - {{/servers}} - {{#servers}} - {{#-first}} - Uri urlLocalVar = httpRequestMessageLocalVar.RequestUri = new Uri("{{url}}"); - uriBuilderLocalVar.Host = urlLocalVar.Authority; - uriBuilderLocalVar.Scheme = urlLocalVar.Scheme; - uriBuilderLocalVar.Path = urlLocalVar.AbsolutePath; - {{/-first}} - {{/servers}} - {{#constantParams}} - {{#isPathParam}} - // Set client side default value of Path Param "{{baseName}}". - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString(ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}}))); // Constant path parameter - {{/isPathParam}} - {{/constantParams}} - {{#pathParams}} - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString({{paramName}}.ToString())); - {{#-last}} - - {{/-last}} - {{/pathParams}} - {{#queryParams}} - {{#-first}} - - System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - {{/-first}} - {{/queryParams}} - {{^queryParams}} - {{#authMethods}} - {{#isApiKey}} - {{#isKeyInQuery}} - - System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - {{/isKeyInQuery}} - {{/isApiKey}} - {{/authMethods}} - {{/queryParams}} - {{#queryParams}} - {{#required}} - {{#-first}} - - {{/-first}} - parseQueryStringLocalVar["{{baseName}}"] = ClientUtils.ParameterToString({{paramName}}); - {{/required}} - {{/queryParams}} - - {{#constantParams}} - {{#isQueryParam}} - // Set client side default value of Query Param "{{baseName}}". - parseQueryStringLocalVar["{{baseName}}"] = ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}}); // Constant query parameter - {{/isQueryParam}} - {{/constantParams}} - {{#queryParams}} - {{^required}} - if ({{paramName}}.IsSet) - // here too - parseQueryStringLocalVar["{{baseName}}"] = ClientUtils.ParameterToString({{paramName}}.Value); - - {{/required}} - {{#-last}} - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); - - {{/-last}} - {{/queryParams}} - {{#constantParams}} - {{#isHeaderParam}} - // Set client side default value of Header Param "{{baseName}}". - httpRequestMessageLocalVar.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter - {{/isHeaderParam}} - {{/constantParams}} - {{#headerParams}} - {{#required}} - httpRequestMessageLocalVar.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); - - {{/required}} - {{^required}} - if ({{paramName}}.IsSet) - httpRequestMessageLocalVar.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}.Value)); - - {{/required}} - {{/headerParams}} - {{#formParams}} - {{#-first}} - MultipartContent multipartContentLocalVar = new MultipartContent(); - - httpRequestMessageLocalVar.Content = multipartContentLocalVar; - - List> formParameterLocalVars = new List>(); - - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars));{{/-first}}{{^isFile}}{{#required}} - - formParameterLocalVars.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}))); - - {{/required}} - {{^required}} - if ({{paramName}}.IsSet) - formParameterLocalVars.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}.Value))); - - {{/required}} - {{/isFile}} - {{#isFile}} - {{#required}} - multipartContentLocalVar.Add(new StreamContent({{paramName}})); - - {{/required}} - {{^required}} - if ({{paramName}}.IsSet) - multipartContentLocalVar.Add(new StreamContent({{paramName}}.Value)); - - {{/required}} - {{/isFile}} - {{/formParams}} - {{#bodyParam}} - {{#required}} - httpRequestMessageLocalVar.Content = ({{paramName}}{{^required}}.Value{{/required}} as object) is System.IO.Stream stream - ? httpRequestMessageLocalVar.Content = new StreamContent(stream) - : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize({{paramName}}{{^required}}.Value{{/required}}, _jsonSerializerOptions)); - {{/required}} - {{^required}} - if ({{paramName}}.IsSet) - httpRequestMessageLocalVar.Content = ({{paramName}}{{^required}}.Value{{/required}} as object) is System.IO.Stream stream - ? httpRequestMessageLocalVar.Content = new StreamContent(stream) - : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize({{paramName}}{{^required}}.Value{{/required}}, _jsonSerializerOptions)); - {{/required}} - - {{/bodyParam}} - {{#authMethods}} - {{#-first}} - List tokenBaseLocalVars = new List(); - {{/-first}} - {{#isApiKey}} - {{^isKeyInCookie}} - ApiKeyToken apiKeyTokenLocalVar{{-index}} = (ApiKeyToken) await ApiKeyProvider.GetAsync("{{keyParamName}}", cancellationToken).ConfigureAwait(false); - tokenBaseLocalVars.Add(apiKeyTokenLocalVar{{-index}}); - {{#isKeyInHeader}} - apiKeyTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar); - - {{/isKeyInHeader}} - {{/isKeyInCookie}} - {{#isKeyInQuery}} - - apiKeyTokenLocalVar{{-index}}.UseInQuery(httpRequestMessageLocalVar, uriBuilderLocalVar, parseQueryStringLocalVar); - - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); - {{/isKeyInQuery}} - {{/isApiKey}} - {{/authMethods}} - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - {{#authMethods}} - {{#isBasicBasic}} - - BasicToken basicTokenLocalVar{{-index}} = (BasicToken) await BasicTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); - - tokenBaseLocalVars.Add(basicTokenLocalVar{{-index}}); - - basicTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, "{{keyParamName}}"); - {{/isBasicBasic}} - {{#isBasicBearer}} - - BearerToken bearerTokenLocalVar{{-index}} = (BearerToken) await BearerTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); - - tokenBaseLocalVars.Add(bearerTokenLocalVar{{-index}}); - - bearerTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, "{{keyParamName}}"); - {{/isBasicBearer}} - {{#isOAuth}} - - OAuthToken oauthTokenLocalVar{{-index}} = (OAuthToken) await OauthTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); - - tokenBaseLocalVars.Add(oauthTokenLocalVar{{-index}}); - - oauthTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, "{{keyParamName}}"); - {{/isOAuth}} - {{#isHttpSignature}} - - HttpSignatureToken httpSignatureTokenLocalVar{{-index}} = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); - - tokenBaseLocalVars.Add(httpSignatureTokenLocalVar{{-index}}); - - if (httpRequestMessageLocalVar.Content != null) { - string requestBodyLocalVar = await httpRequestMessageLocalVar.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); - - httpSignatureTokenLocalVar{{-index}}.UseInHeader(httpRequestMessageLocalVar, requestBodyLocalVar, cancellationToken); - } - {{/isHttpSignature}} - {{/authMethods}} - {{#consumes}} - {{#-first}} - - {{=<% %>=}} - string[] contentTypes = new string[] {<%/-first%> - <%={{ }}=%> - "{{{mediaType}}}"{{^-last}},{{/-last}}{{#-last}} - }; - {{/-last}} - {{/consumes}} - {{#consumes}} - {{#-first}} - - string{{nrt?}} contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes); - - if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null) - httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar); - - {{/-first}} - {{/consumes}} - {{#produces}} - {{#-first}} - - {{=<% %>=}} - string[] acceptLocalVars = new string[] {<%/-first%> - <%={{ }}=%> - "{{{mediaType}}}"{{^-last}},{{/-last}}{{#-last}} - }; - {{/-last}} - {{/produces}} - {{#produces}} - {{#-first}} - - string{{nrt?}} acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); - - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - {{/-first}} - {{/produces}} - {{#net60OrLater}} - - httpRequestMessageLocalVar.Method = HttpMethod.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}; - {{/net60OrLater}} - {{^net60OrLater}} - httpRequestMessageLocalVar.Method = new HttpMethod("{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}"); - {{/net60OrLater}} - - DateTime requestedAtLocalVar = DateTime.UtcNow; - - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); - - ILogger<{{operationId}}ApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<{{operationId}}ApiResponse>(); - - {{operationId}}ApiResponse apiResponseLocalVar = new{{^net60OrLater}} {{operationId}}ApiResponse{{/net60OrLater}}(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{path}}", requestedAtLocalVar, _jsonSerializerOptions); - - After{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); - - Events.ExecuteOn{{operationId}}(apiResponseLocalVar); - - {{#authMethods}} - {{#-first}} - if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429) - foreach(TokenBase tokenBaseLocalVar in tokenBaseLocalVars) - tokenBaseLocalVar.BeginRateLimit(); - - {{/-first}} - {{/authMethods}} - {{#net80OrLater}} - {{#responses}} - {{#vendorExtensions.x-set-cookie}} - if (httpResponseMessageLocalVar.StatusCode == (HttpStatusCode) {{code}} && httpResponseMessageLocalVar.Headers.TryGetValues("Set-Cookie", out var cookieHeadersLocalVar)) - { - foreach(string cookieHeader in cookieHeadersLocalVar) - { - IList setCookieHeaderValuesLocalVar = Microsoft.Net.Http.Headers.SetCookieHeaderValue.ParseList(cookieHeadersLocalVar.ToArray()); - - foreach(Microsoft.Net.Http.Headers.SetCookieHeaderValue setCookieHeaderValueLocalVar in setCookieHeaderValuesLocalVar) - { - Cookie cookieLocalVar = new Cookie(setCookieHeaderValueLocalVar.Name.ToString(), setCookieHeaderValueLocalVar.Value.ToString()) - { - HttpOnly = setCookieHeaderValueLocalVar.HttpOnly - }; - - if (setCookieHeaderValueLocalVar.Expires.HasValue) - cookieLocalVar.Expires = setCookieHeaderValueLocalVar.Expires.Value.UtcDateTime; - - if (setCookieHeaderValueLocalVar.Path.HasValue) - cookieLocalVar.Path = setCookieHeaderValueLocalVar.Path.Value; - - if (setCookieHeaderValueLocalVar.Domain.HasValue) - cookieLocalVar.Domain = setCookieHeaderValueLocalVar.Domain.Value; - - CookieContainer.Value.Add(new Uri($"{uriBuilderLocalVar.Scheme}://{uriBuilderLocalVar.Host}"), cookieLocalVar); - } - } - } - - {{/vendorExtensions.x-set-cookie}} - {{/responses}} - {{/net80OrLater}} - return apiResponseLocalVar; - } - } - } - catch(Exception e) - { - OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}e "{{path}}" uriBuilderLocalVar.Path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); - Events.ExecuteOnError{{operationId}}(e); - throw; - } - {{/lambda.trimLineBreaks}} - } - {{#responses}} - {{#-first}} - - /// - /// The - /// - {{>visibility}} partial class {{operationId}}ApiResponse : {{packageName}}.{{clientPackage}}.ApiResponse, {{interfacePrefix}}{{operationId}}ApiResponse - { - /// - /// The logger - /// - public ILogger<{{operationId}}ApiResponse> Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public {{operationId}}ApiResponse(ILogger<{{operationId}}ApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } - - partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); - {{#responses}} - - {{#vendorExtensions.x-http-status-is-default}} - /// - /// Returns true if the response is the default response type - /// - /// - public bool Is{{vendorExtensions.x-http-status}} => {{#vendorExtensions.x-only-default}}true{{/vendorExtensions.x-only-default}}{{^vendorExtensions.x-only-default}}{{#lambda.joinConditions}}{{#responses}}{{^vendorExtensions.x-http-status-is-default}}!Is{{vendorExtensions.x-http-status}} {{/vendorExtensions.x-http-status-is-default}}{{/responses}}{{/lambda.joinConditions}}{{/vendorExtensions.x-only-default}}; - {{/vendorExtensions.x-http-status-is-default}} - {{^vendorExtensions.x-http-status-is-default}} - /// - /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}} - /// - /// - public bool Is{{vendorExtensions.x-http-status}} => {{code}} == (int)StatusCode; - {{/vendorExtensions.x-http-status-is-default}} - {{#dataType}} - - /// - /// Deserializes the response if the response is {{code}} {{vendorExtensions.x-http-status}} - /// - /// - public {{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{vendorExtensions.x-http-status}}() - { - {{#lambda.trimTrailingWithNewLine}} - {{#lambda.indent4}} - {{>AsModel}} - {{/lambda.indent4}} - {{/lambda.trimTrailingWithNewLine}} - } - - /// - /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}} and the deserialized response is not null - /// - /// - /// - public bool Try{{vendorExtensions.x-http-status}}({{#net60OrLater}}[NotNullWhen(true)]{{/net60OrLater}}out {{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} result) - { - result = null; - - try - { - result = {{vendorExtensions.x-http-status}}(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode){{code}}); - } - - return result != null; - } - {{/dataType}} - {{#-last}} - - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) - { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - {{#lambda.trimTrailingWithNewLine}} - {{#lambda.indent4}} - {{>OnDeserializationError}} - {{/lambda.indent4}} - {{/lambda.trimTrailingWithNewLine}} - } - - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - {{/-last}} - {{/responses}} - } - {{/-first}} - {{/responses}} - {{/operation}} - } - {{/operations}} -} -{{/lambda.trimLineBreaks}} diff --git a/generation/templates/libraries/generichost/api_test.mustache b/generation/templates/libraries/generichost/api_test.mustache deleted file mode 100644 index 02ce2216..00000000 --- a/generation/templates/libraries/generichost/api_test.mustache +++ /dev/null @@ -1,51 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Xunit; -using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.{{apiPackage}};{{#hasImport}} -using {{packageName}}.{{modelPackage}};{{/hasImport}} - - -{{>testInstructions}} - - -namespace {{packageName}}.Test.{{apiPackage}} -{ - /// - /// Class for testing {{classname}} - /// - public sealed class {{classname}}Tests : ApiTestsBase - { - private readonly {{interfacePrefix}}{{classname}} _instance; - - public {{classname}}Tests(): base(Array.Empty()) - { - _instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); - } - {{#operations}} - {{#operation}} - - /// - /// Test {{operationId}} - /// - [Fact (Skip = "not implemented")] - public async Task {{operationId}}AsyncTest() - { - {{#allParams}} - {{^required}}Client.Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} = default{{nrt!}}; - {{/allParams}} - {{#returnType}} - var response = await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - var model = response.{{#lambda.first}}{{#responses}}{{vendorExtensions.x-http-status}} {{/responses}}{{/lambda.first}}(); - Assert.IsType<{{{.}}}>(model); - {{/returnType}} - {{^returnType}} - await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{/returnType}} - } - {{/operation}} - {{/operations}} - } -} diff --git a/generation/templates/libraries/generichost/git_push.ps1.mustache b/generation/templates/libraries/generichost/git_push.ps1.mustache deleted file mode 100644 index f263c2bc..00000000 --- a/generation/templates/libraries/generichost/git_push.ps1.mustache +++ /dev/null @@ -1,75 +0,0 @@ -param( - [Parameter()][Alias("g")][String]$GitHost = "{{{gitHost}}}", - [Parameter()][Alias("u")][String]$GitUserId = "{{{gitUserId}}}", - [Parameter()][Alias("r")][String]$GitRepoId = "{{{gitRepoId}}}", - [Parameter()][Alias("m")][string]$Message = "{{{releaseNote}}}", - [Parameter()][Alias("h")][switch]$Help -) - -function Publish-ToGitHost{ - if ([string]::IsNullOrWhiteSpace($Message) -or $Message -eq "Minor update"){ - # it seems unlikely that we would want our git commit message to be the default, so lets prompt the user - $Message = Read-Host -Prompt "Please provide a commit message or press enter" - $Message = if([string]::IsNullOrWhiteSpace($Message)) { "no message provided" } else { $Message } - } - - git init - git add . - git commit -am "${Message}" - $branchName=$(git rev-parse --abbrev-ref HEAD) - $gitRemote=$(git remote) - - if([string]::IsNullOrWhiteSpace($gitRemote)){ - git remote add origin https://${GitHost}/${GitUserId}/${GitRepoId}.git - } - - Write-Output "Pulling from https://${GitHost}/${GitUserId}/${GitRepoId}.git" - git pull origin $branchName --ff-only - - if ($LastExitCode -ne 0){ - if (${GitHost} -eq "github.com"){ - Write-Output "The ${GitRepoId} repository may not exist yet. Creating it now with the GitHub CLI." - gh auth login --hostname github.com --web - gh repo create $GitRepoId --private - # sleep 2 seconds to ensure git finishes creation of the repo - Start-Sleep -Seconds 2 - } - else{ - throw "There was an issue pulling the origin branch. The remote repository may not exist yet." - } - } - - Write-Output "Pushing to https://${GitHost}/${GitUserId}/${GitRepoId}.git" - git push origin $branchName -} - -$ErrorActionPreference = "Stop" -Set-StrictMode -Version 3.0 - -if ($Help){ - Write-Output " - This script will initialize a git repository, then add and commit all files. - The local repository will then be pushed to your preferred git provider. - If the remote repository does not exist yet and you are using GitHub, - the repository will be created for you provided you have the GitHub CLI installed. - - Parameters: - -g | -GitHost -> ex: github.com - -m | -Message -> the git commit message - -r | -GitRepoId -> the name of the repository - -u | -GitUserId -> your user id - " - - return -} - -$rootPath=Resolve-Path -Path $PSScriptRoot/../.. - -Push-Location $rootPath - -try { - Publish-ToGitHost $GitHost $GitUserId $GitRepoId $Message -} -finally{ - Pop-Location -} \ No newline at end of file diff --git a/generation/templates/libraries/generichost/git_push.sh.mustache b/generation/templates/libraries/generichost/git_push.sh.mustache deleted file mode 100644 index 3d4b710d..00000000 --- a/generation/templates/libraries/generichost/git_push.sh.mustache +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=${1:-{{{gitUserId}}}} -git_repo_id=${2:-{{{gitRepoId}}}} -release_note=${3:-{{{releaseNote}}}} -git_host=${4:-{{{gitHost}}}} - -starting_directory=$(pwd) -script_root="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" -cd $script_root -cd ../.. - -if [ "$release_note" = "" ] || [ "$release_note" = "Minor update" ]; then - # it seems unlikely that we would want our git commit message to be the default, so lets prompt the user - echo "Please provide a commit message or press enter" - read user_input - release_note=$user_input - if [ "$release_note" = "" ]; then - release_note="no message provided" - fi -fi - -git init -git add . -git commit -am "$release_note" -branch_name=$(git rev-parse --abbrev-ref HEAD) -git_remote=$(git remote) - -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -echo "[INFO] Pulling from https://${git_host}/${git_user_id}/${git_repo_id}.git" -git pull origin $branch_name --ff-only - -echo "[INFO] Pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin $branch_name - -cd $starting_directory diff --git a/generation/templates/libraries/generichost/model.mustache b/generation/templates/libraries/generichost/model.mustache deleted file mode 100644 index f9931574..00000000 --- a/generation/templates/libraries/generichost/model.mustache +++ /dev/null @@ -1,50 +0,0 @@ -// -{{>partial_header}} -{{#nrt}} -#nullable enable - -{{/nrt}} -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -{{^useGenericHost}} -using System.Runtime.Serialization; -{{/useGenericHost}} -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -{{#validatable}} -using System.ComponentModel.DataAnnotations; -{{/validatable}} -{{#useCompareNetObjects}} -using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; -{{/useCompareNetObjects}} -{{#useGenericHost}} -{{#useSourceGeneration}} -using System.Text.Json.Serialization.Metadata; -{{/useSourceGeneration}} -using {{packageName}}.{{clientPackage}}; -{{/useGenericHost}} -{{#models}} -{{#lambda.trimTrailingWithNewLine}} -{{#model}} - -namespace {{packageName}}.{{modelPackage}} -{ -{{#isEnum}} -{{>modelEnum}} -{{/isEnum}} -{{^isEnum}} -{{>modelGeneric}} - -{{>JsonConverter}} -{{/isEnum}} -{{>SourceGenerationContext}} -{{/model}} -{{/lambda.trimTrailingWithNewLine}} -{{/models}} -} diff --git a/generation/templates/libraries/generichost/modelGeneric.mustache b/generation/templates/libraries/generichost/modelGeneric.mustache deleted file mode 100644 index ad821487..00000000 --- a/generation/templates/libraries/generichost/modelGeneric.mustache +++ /dev/null @@ -1,377 +0,0 @@ - /// - /// {{description}}{{^description}}{{classname}}{{/description}} - /// - {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}}{{#readOnlyVars}}{{#-first}} : .{{/-first}}{{/readOnlyVars}}{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{>ImplementsIEquatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} - { - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - /// - /// Initializes a new instance of the class. - /// - /// - {{#composedSchemas.anyOf}} - /// - {{/composedSchemas.anyOf}} - {{#allVars}} - {{^isDiscriminator}} - /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} - {{/isDiscriminator}} - {{/allVars}} - {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{#model.composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{baseType}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{parent}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} - { - {{#composedSchemas.anyOf}} - {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/composedSchemas.anyOf}} - {{name}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{#allVars}} - {{^isDiscriminator}} - {{^isInherited}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isInherited}} - {{#isInherited}} - {{#isNew}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isNew}} - {{/isInherited}} - {{/isDiscriminator}} - {{/allVars}} - OnCreated(); - } - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - {{^composedSchemas.oneOf}} - /// - /// Initializes a new instance of the class. - /// - {{#composedSchemas.anyOf}} - /// - {{/composedSchemas.anyOf}} - {{#allVars}} - {{^isDiscriminator}} - /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} - {{/isDiscriminator}} - {{/allVars}} - {{^composedSchemas.anyOf}} - [JsonConstructor] - {{/composedSchemas.anyOf}} - {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{baseType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} - { - {{#composedSchemas.anyOf}} - {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/composedSchemas.anyOf}} - {{#allVars}} - {{^isDiscriminator}} - {{^isInherited}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isInherited}} - {{#isInherited}} - {{#isNew}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isNew}} - {{/isInherited}} - {{/isDiscriminator}} - {{/allVars}} - OnCreated(); - } - - {{/composedSchemas.oneOf}} - partial void OnCreated(); - - {{#vars}} - {{#items.isEnum}} - {{#items}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/items}} - {{/items.isEnum}} - {{#isEnum}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/isEnum}} - {{^isDiscriminator}} - {{#isEnum}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{#example}} - /// {{.}} - {{/example}} - [JsonPropertyName("{{baseName}}")] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{#isNew}}new {{/isNew}}{{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/isEnum}} - {{/isDiscriminator}} - {{/vars}} - {{#composedSchemas.anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /// {{.}} - {{/example}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option; } {{^isReadOnly}}set { this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.anyOf}} - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - /// - /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /// {{.}} - {{/example}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}}{{>NullConditionalProperty}} {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - {{#allVars}} - {{#isDiscriminator}} - {{^model.composedSchemas.anyOf}} - {{^model.composedSchemas.oneOf}} - /// - /// The discriminator - /// - [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public {{#isNew}}new {{/isNew}}{{datatypeWithEnum}} {{name}} { get; } = {{^isNew}}"{{classname}}"{{/isNew}}{{#isNew}}{{^isEnum}}"{{classname}}"{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), "{{classname}}"){{/isEnum}}{{/isNew}}; - - {{/model.composedSchemas.oneOf}} - {{/model.composedSchemas.anyOf}} - {{/isDiscriminator}} - {{^isDiscriminator}} - {{^isEnum}} - {{#isInherited}} - {{#isNew}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /// {{.}} - {{/example}} - [JsonPropertyName("{{baseName}}")] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public new {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/isNew}} - {{/isInherited}} - {{^isInherited}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /// {{.}} - {{/example}} - [JsonPropertyName("{{baseName}}")] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/isInherited}} - {{/isEnum}} - {{/isDiscriminator}} - {{/allVars}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); - {{#parent}} - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); - {{/parent}} - {{#vars}} - {{^isDiscriminator}} - sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); - {{/isDiscriminator}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - sb.Append("}\n"); - return sb.ToString(); - } - {{#equatable}} - {{#readOnlyVars}} - {{#-first}} - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object{{nrt?}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - return this.Equals(input as {{classname}}); - {{/useCompareNetObjects}} - } - - /// - /// Returns true if {{classname}} instances are equal - /// - /// Instance of {{classname}} to be compared - /// Boolean - public bool Equals({{classname}}{{nrt?}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - if (input == null) - return false; - - return {{#parent}}base.Equals(input) && {{/parent}}{{#readOnlyVars}}{{^isInherited}}{{^isContainer}} - ( - {{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}} - ({{name}} != null && - {{name}}.Equals(input.{{name}})) - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - {{name}}.Equals(input.{{name}}) - {{/vendorExtensions.x-is-value-type}} - ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} - ( - {{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}}{{name}} != null && - input.{{name}} != null && - {{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(input.{{name}}) - ){{^-last}} && {{/-last}}{{/isContainer}}{{/isInherited}}{{/readOnlyVars}}{{^readOnlyVars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/readOnlyVars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any()); - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - {{/useCompareNetObjects}} - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - {{#parent}} - int hashCode = base.GetHashCode(); - {{/parent}} - {{^parent}} - int hashCode = 41; - {{/parent}} - {{#readOnlyVars}} - {{#required}} - {{^isNullable}} - hashCode = (hashCode * 59) + {{name}}.GetHashCode(); - {{/isNullable}} - {{/required}} - {{/readOnlyVars}} - {{#readOnlyVars}} - {{#lambda.copy}} - - if ({{name}} != null) - hashCode = (hashCode * 59) + {{name}}.GetHashCode(); - {{/lambda.copy}} - {{#isNullable}} - {{#lambda.pasteOnce}}{{/lambda.pasteOnce}} - {{/isNullable}} - {{^required}} - {{#lambda.pasteOnce}}{{/lambda.pasteOnce}} - {{/required}} - {{/readOnlyVars}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - - return hashCode; - } - } - {{/-first}} - {{/readOnlyVars}} - {{/equatable}} -{{#validatable}} -{{^parentModel}} - -{{>validatable}} -{{/parentModel}} -{{/validatable}} - } \ No newline at end of file diff --git a/generation/templates/libraries/generichost/testInstructions.mustache b/generation/templates/libraries/generichost/testInstructions.mustache deleted file mode 100644 index 7bf738e2..00000000 --- a/generation/templates/libraries/generichost/testInstructions.mustache +++ /dev/null @@ -1,18 +0,0 @@ -/* ********************************************************************************* -* Follow these manual steps to construct tests. -* This file will not be overwritten. -* ********************************************************************************* -* 1. Navigate to ApiTests.Base.cs and ensure any tokens are being created correctly. -* Take care not to commit credentials to any repository. -* -* 2. Mocking is coordinated by ApiTestsBase#AddApiHttpClients. -* To mock the client, use the generic AddApiHttpClients. -* To mock the server, change the client's BaseAddress. -* -* 3. Locate the test you want below -* - remove the skip property from the Fact attribute -* - set the value of any variables if necessary -* -* 4. Run the tests and ensure they work. -* -*/ \ No newline at end of file diff --git a/generation/templates/libraries/httpclient/ApiClient.mustache b/generation/templates/libraries/httpclient/ApiClient.mustache deleted file mode 100644 index 9bed800e..00000000 --- a/generation/templates/libraries/httpclient/ApiClient.mustache +++ /dev/null @@ -1,792 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters; -using System.Text; -using System.Threading; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -{{^netStandard}} -using System.Web; -{{/netStandard}} -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; -using System.Net.Http; -using System.Net.Http.Headers; -{{#supportsRetry}} -using Polly; -{{/supportsRetry}} - -namespace {{packageName}}.Client -{ - /// - /// To Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. - /// - internal class CustomJsonCodec - { - private readonly IReadableConfiguration _configuration; - private static readonly string _contentType = "application/json"; - private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - public CustomJsonCodec(IReadableConfiguration configuration) - { - _configuration = configuration; - } - - public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) - { - _serializerSettings = serializerSettings; - _configuration = configuration; - } - - /// - /// Serialize the object into a JSON string. - /// - /// Object to be serialized. - /// A JSON string. - public string Serialize(object obj) - { - if (obj != null && obj is {{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema) - { - // the object to be serialized is an oneOf/anyOf schema - return (({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema)obj).ToJson(); - } - else - { - return JsonConvert.SerializeObject(obj, _serializerSettings); - } - } - - public async Task Deserialize(HttpResponseMessage response) - { - var result = (T) await Deserialize(response, typeof(T)).ConfigureAwait(false); - return result; - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - internal async Task Deserialize(HttpResponseMessage response, Type type) - { - IList headers = new List(); - // process response headers, e.g. Access-Control-Allow-Methods - foreach (var responseHeader in response.Headers) - { - headers.Add(responseHeader.Key + "=" + ClientUtils.ParameterToString(responseHeader.Value)); - } - - // process response content headers, e.g. Content-Type - foreach (var responseHeader in response.Content.Headers) - { - headers.Add(responseHeader.Key + "=" + ClientUtils.ParameterToString(responseHeader.Value)); - } - - // RFC 2183 & RFC 2616 - var fileNameRegex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$", RegexOptions.IgnoreCase); - if (type == typeof(byte[])) // return byte array - { - return await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); - } - else if (type == typeof(FileParameter)) - { - if (headers != null) { - foreach (var header in headers) - { - var match = fileNameRegex.Match(header.ToString()); - if (match.Success) - { - string fileName = ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - return new FileParameter(fileName, await response.Content.ReadAsStreamAsync().ConfigureAwait(false)); - } - } - } - return new FileParameter(await response.Content.ReadAsStreamAsync().ConfigureAwait(false)); - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - var bytes = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); - if (headers != null) - { - var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) - ? Path.GetTempPath() - : _configuration.TempFolderPath; - - foreach (var header in headers) - { - var match = fileNameRegex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, bytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(bytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(await response.Content.ReadAsStringAsync().ConfigureAwait(false), null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return Convert.ChangeType(await response.Content.ReadAsStringAsync().ConfigureAwait(false), type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), type, _serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - public string RootElement { get; set; } - public string Namespace { get; set; } - public string DateFormat { get; set; } - - public string ContentType - { - get { return _contentType; } - set { throw new InvalidOperationException("Not allowed to set content type."); } - } - } - /// - /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), - /// encapsulating general REST accessor use cases. - /// - /// - /// The Dispose method will manage the HttpClient lifecycle when not passed by constructor. - /// - {{>visibility}} partial class ApiClient : IDisposable, ISynchronousClient{{#supportsAsync}}, IAsynchronousClient{{/supportsAsync}} - { - private readonly string _baseUrl; - - private readonly HttpClientHandler _httpClientHandler; - private readonly HttpClient _httpClient; - private readonly bool _disposeClient; - - /// - /// Specifies the settings on a object. - /// These settings can be adjusted to accommodate custom serialization rules. - /// - public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Initializes a new instance of the , defaulting to the global configurations' base url. - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - public ApiClient() : - this({{packageName}}.Client.GlobalConfiguration.Instance.BasePath) - { - } - - /// - /// Initializes a new instance of the . - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - /// The target service's base path in URL format. - /// - public ApiClient(string basePath) - { - if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); - - _httpClientHandler = new HttpClientHandler(); - _httpClient = new HttpClient(_httpClientHandler, true); - _disposeClient = true; - _baseUrl = basePath; - } - - /// - /// Initializes a new instance of the , defaulting to the global configurations' base url. - /// - /// An instance of HttpClient. - /// An optional instance of HttpClientHandler that is used by HttpClient. - /// - /// - /// Some configuration settings will not be applied without passing an HttpClientHandler. - /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. - /// - public ApiClient(HttpClient client, HttpClientHandler handler = null) : - this(client, {{packageName}}.Client.GlobalConfiguration.Instance.BasePath, handler) - { - } - - /// - /// Initializes a new instance of the . - /// - /// An instance of HttpClient. - /// The target service's base path in URL format. - /// An optional instance of HttpClientHandler that is used by HttpClient. - /// - /// - /// - /// Some configuration settings will not be applied without passing an HttpClientHandler. - /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. - /// - public ApiClient(HttpClient client, string basePath, HttpClientHandler handler = null) - { - if (client == null) throw new ArgumentNullException("client cannot be null"); - if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); - - _httpClientHandler = handler; - _httpClient = client; - _baseUrl = basePath; - } - - /// - /// Disposes resources if they were created by us - /// - public void Dispose() - { - if(_disposeClient) { - _httpClient.Dispose(); - } - } - - /// Prepares multipart/form-data content - {{! TODO: Add handling of improper usage }} - HttpContent PrepareMultipartFormDataContent(RequestOptions options) - { - string boundary = "---------" + Guid.NewGuid().ToString().ToUpperInvariant(); - var multipartContent = new MultipartFormDataContent(boundary); - foreach (var formParameter in options.FormParameters) - { - multipartContent.Add(new StringContent(formParameter.Value), formParameter.Key); - } - - if (options.FileParameters != null && options.FileParameters.Count > 0) - { - foreach (var fileParam in options.FileParameters) - { - foreach (var file in fileParam.Value) - { - var content = new StreamContent(file.Content); - content.Headers.ContentType = new MediaTypeHeaderValue(file.ContentType); - multipartContent.Add(content, fileParam.Key, file.Name); - } - } - } - return multipartContent; - } - - /// - /// Provides all logic for constructing a new HttpRequestMessage. - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the a HttpRequestMessage. - /// - /// The http verb. - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// [private] A new HttpRequestMessage instance. - /// - private HttpRequestMessage NewRequest( - HttpMethod method, - string path, - RequestOptions options, - IReadableConfiguration configuration) - { - if (path == null) throw new ArgumentNullException("path"); - if (options == null) throw new ArgumentNullException("options"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - WebRequestPathBuilder builder = new WebRequestPathBuilder(_baseUrl, path); - - builder.AddPathParameters(options.PathParameters); - - builder.AddQueryParameters(options.QueryParameters); - - HttpRequestMessage request = new HttpRequestMessage(method, builder.GetFullUri()); - - if (configuration.UserAgent != null) - { - request.Headers.TryAddWithoutValidation("User-Agent", configuration.UserAgent); - } - - if (configuration.DefaultHeaders != null) - { - foreach (var headerParam in configuration.DefaultHeaders) - { - request.Headers.Add(headerParam.Key, headerParam.Value); - } - } - - if (options.HeaderParameters != null) - { - foreach (var headerParam in options.HeaderParameters) - { - foreach (var value in headerParam.Value) - { - // Todo make content headers actually content headers - request.Headers.TryAddWithoutValidation(headerParam.Key, value); - } - } - } - - List> contentList = new List>(); - - string contentType = null; - if (options.HeaderParameters != null && options.HeaderParameters.ContainsKey("Content-Type")) - { - var contentTypes = options.HeaderParameters["Content-Type"]; - contentType = contentTypes.FirstOrDefault(); - } - - {{!// TODO Add error handling in case of improper usage}} - if (contentType == "multipart/form-data") - { - request.Content = PrepareMultipartFormDataContent(options); - } - else if (contentType == "application/x-www-form-urlencoded") - { - request.Content = new FormUrlEncodedContent(options.FormParameters); - } - else - { - if (options.Data != null) - { - if (options.Data is FileParameter fp) - { - contentType = contentType ?? "application/octet-stream"; - - var streamContent = new StreamContent(fp.Content); - streamContent.Headers.ContentType = new MediaTypeHeaderValue(contentType); - request.Content = streamContent; - } - else - { - var serializer = new CustomJsonCodec(SerializerSettings, configuration); - request.Content = new StringContent(serializer.Serialize(options.Data), new UTF8Encoding(), - "application/json"); - } - } - } - - - - // TODO provide an alternative that allows cookies per request instead of per API client - if (options.Cookies != null && options.Cookies.Count > 0) - { - request.Properties["CookieContainer"] = options.Cookies; - } - - return request; - } - - partial void InterceptRequest(HttpRequestMessage req); - partial void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response); - - private async Task> ToApiResponse(HttpResponseMessage response, object responseData, Uri uri) - { - T result = (T) responseData; - string rawContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - - var transformed = new ApiResponse(response.StatusCode, new Multimap({{#caseInsensitiveResponseHeaders}}StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), result, rawContent) - { - ErrorText = response.ReasonPhrase, - Cookies = new List() - }; - - // process response headers, e.g. Access-Control-Allow-Methods - if (response.Headers != null) - { - foreach (var responseHeader in response.Headers) - { - transformed.Headers.Add(responseHeader.Key, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - - // process response content headers, e.g. Content-Type - if (response.Content.Headers != null) - { - foreach (var responseHeader in response.Content.Headers) - { - transformed.Headers.Add(responseHeader.Key, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - - if (_httpClientHandler != null && response != null) - { - try { - foreach (Cookie cookie in _httpClientHandler.CookieContainer.GetCookies(uri)) - { - transformed.Cookies.Add(cookie); - } - } - catch (PlatformNotSupportedException) {} - } - - return transformed; - } - - private ApiResponse Exec(HttpRequestMessage req, IReadableConfiguration configuration) - { - return ExecAsync(req, configuration).GetAwaiter().GetResult(); - } - - private async Task> ExecAsync(HttpRequestMessage req, - IReadableConfiguration configuration, - System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - CancellationTokenSource timeoutTokenSource = null; - CancellationTokenSource finalTokenSource = null; - var deserializer = new CustomJsonCodec(SerializerSettings, configuration); - var finalToken = cancellationToken; - - try - { - if (configuration.Timeout > 0) - { - timeoutTokenSource = new CancellationTokenSource(configuration.Timeout); - finalTokenSource = CancellationTokenSource.CreateLinkedTokenSource(finalToken, timeoutTokenSource.Token); - finalToken = finalTokenSource.Token; - } - - if (configuration.Proxy != null) - { - if(_httpClientHandler == null) throw new InvalidOperationException("Configuration `Proxy` not supported when the client is explicitly created without an HttpClientHandler, use the proper constructor."); - _httpClientHandler.Proxy = configuration.Proxy; - } - - if (configuration.ClientCertificates != null) - { - if(_httpClientHandler == null) throw new InvalidOperationException("Configuration `ClientCertificates` not supported when the client is explicitly created without an HttpClientHandler, use the proper constructor."); - _httpClientHandler.ClientCertificates.AddRange(configuration.ClientCertificates); - } - - var cookieContainer = req.Properties.ContainsKey("CookieContainer") ? req.Properties["CookieContainer"] as List : null; - - if (cookieContainer != null) - { - if(_httpClientHandler == null) throw new InvalidOperationException("Request property `CookieContainer` not supported when the client is explicitly created without an HttpClientHandler, use the proper constructor."); - foreach (var cookie in cookieContainer) - { - _httpClientHandler.CookieContainer.Add(cookie); - } - } - - InterceptRequest(req); - - HttpResponseMessage response; - {{#supportsRetry}} - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy - .ExecuteAndCaptureAsync(() => _httpClient.SendAsync(req, finalToken)) - .ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? - policyResult.Result : new HttpResponseMessage() - { - ReasonPhrase = policyResult.FinalException.ToString(), - RequestMessage = req - }; - } - else - { - {{/supportsRetry}} - response = await _httpClient.SendAsync(req, finalToken).ConfigureAwait(false); - {{#supportsRetry}} - } - {{/supportsRetry}} - - if (!response.IsSuccessStatusCode) - { - return await ToApiResponse(response, default(T), req.RequestUri).ConfigureAwait(false); - } - - object responseData = await deserializer.Deserialize(response).ConfigureAwait(false); - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - responseData = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - responseData = (T) (object) await response.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - - InterceptResponse(req, response); - - return await ToApiResponse(response, responseData, req.RequestUri).ConfigureAwait(false); - } - catch (OperationCanceledException original) - { - if (timeoutTokenSource != null && timeoutTokenSource.IsCancellationRequested) - { - throw new TaskCanceledException($"[{req.Method}] {req.RequestUri} was timeout.", - new TimeoutException(original.Message, original)); - } - throw; - } - finally - { - if (timeoutTokenSource != null) - { - timeoutTokenSource.Dispose(); - } - - if (finalTokenSource != null) - { - finalTokenSource.Dispose(); - } - } - } - - {{#supportsAsync}} - #region IAsynchronousClient - /// - /// Make a HTTP GET request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP POST request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP PUT request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP DELETE request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP HEAD request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP OPTION request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP PATCH request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(new HttpMethod("PATCH"), path, options, config), config, cancellationToken); - } - #endregion IAsynchronousClient - {{/supportsAsync}} - - #region ISynchronousClient - /// - /// Make a HTTP GET request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); - } - - /// - /// Make a HTTP POST request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); - } - - /// - /// Make a HTTP PUT request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); - } - - /// - /// Make a HTTP DELETE request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); - } - - /// - /// Make a HTTP HEAD request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); - } - - /// - /// Make a HTTP OPTION request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); - } - - /// - /// Make a HTTP PATCH request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(new HttpMethod("PATCH"), path, options, config), config); - } - #endregion ISynchronousClient - } -} diff --git a/generation/templates/libraries/httpclient/FileParameter.mustache b/generation/templates/libraries/httpclient/FileParameter.mustache deleted file mode 100644 index 87e5fcdc..00000000 --- a/generation/templates/libraries/httpclient/FileParameter.mustache +++ /dev/null @@ -1,72 +0,0 @@ -{{>partial_header}} - -using System.IO; - -namespace {{packageName}}.Client -{ - - /// - /// Represents a File passed to the API as a Parameter, allows using different backends for files - /// - public class FileParameter - { - /// - /// The filename - /// - public string Name { get; set; } = "no_name_provided"; - - /// - /// The content type of the file - /// - public string ContentType { get; set; } = "application/octet-stream"; - - /// - /// The content of the file - /// - public Stream Content { get; set; } - - /// - /// Construct a FileParameter just from the contents, will extract the filename from a filestream - /// - /// The file content - public FileParameter(Stream content) - { - if (content is FileStream fs) - { - Name = fs.Name; - } - Content = content; - } - - /// - /// Construct a FileParameter from name and content - /// - /// The filename - /// The file content - public FileParameter(string filename, Stream content) - { - Name = filename; - Content = content; - } - - /// - /// Construct a FileParameter from name and content - /// - /// The filename - /// The content type of the file - /// The file content - public FileParameter(string filename, string contentType, Stream content) - { - Name = filename; - ContentType = contentType; - Content = content; - } - - /// - /// Implicit conversion of stream to file parameter. Useful for backwards compatibility. - /// - /// Stream to convert - /// FileParameter - public static implicit operator FileParameter(Stream s) => new FileParameter(s); - } -} \ No newline at end of file diff --git a/generation/templates/libraries/httpclient/RequestOptions.mustache b/generation/templates/libraries/httpclient/RequestOptions.mustache deleted file mode 100644 index 25e76d03..00000000 --- a/generation/templates/libraries/httpclient/RequestOptions.mustache +++ /dev/null @@ -1,66 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; - -namespace {{packageName}}.Client -{ - /// - /// A container for generalized request inputs. This type allows consumers to extend the request functionality - /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). - /// - public class RequestOptions - { - /// - /// Parameters to be bound to path parts of the Request's URL - /// - public Dictionary PathParameters { get; set; } - - /// - /// Query parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap QueryParameters { get; set; } - - /// - /// Header parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap HeaderParameters { get; set; } - - /// - /// Form parameters to be sent along with the request. - /// - public Dictionary FormParameters { get; set; } - - /// - /// File parameters to be sent along with the request. - /// - public Multimap FileParameters { get; set; } - - /// - /// Cookies to be sent along with the request. - /// - public List Cookies { get; set; } - - /// - /// Any data associated with a request body. - /// - public Object Data { get; set; } - - /// - /// Constructs a new instance of - /// - public RequestOptions() - { - PathParameters = new Dictionary(); - QueryParameters = new Multimap(); - HeaderParameters = new Multimap(); - FormParameters = new Dictionary(); - FileParameters = new Multimap(); - Cookies = new List(); - } - } -} diff --git a/generation/templates/libraries/httpclient/api.mustache b/generation/templates/libraries/httpclient/api.mustache deleted file mode 100644 index 22c8fd0c..00000000 --- a/generation/templates/libraries/httpclient/api.mustache +++ /dev/null @@ -1,766 +0,0 @@ -{{>partial_header}} - -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 {{packageName}}.Client; -{{#hasImport}}using {{packageName}}.{{modelPackage}}; -{{/hasImport}} - -namespace {{packageName}}.{{apiPackage}} -{ - {{#operations}} - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}}Sync : IApiAccessor - { - #region Synchronous Operations - {{#operation}} - /// - /// {{summary}} - /// - {{#notes}} - /// - /// {{.}} - /// - {{/notes}} - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); - - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); - {{/operation}} - #endregion Synchronous Operations - } - - {{#supportsAsync}} - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}}Async : IApiAccessor - { - #region Asynchronous Operations - {{#operation}} - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - {{/operation}} - #endregion Asynchronous Operations - } - {{/supportsAsync}} - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}} : {{interfacePrefix}}{{classname}}Sync{{#supportsAsync}}, {{interfacePrefix}}{{classname}}Async{{/supportsAsync}} - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} partial class {{classname}} : IDisposable, {{interfacePrefix}}{{classname}} - { - private {{packageName}}.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - /// - public {{classname}}() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - /// The target service's base path in URL format. - /// - /// - public {{classname}}(string basePath) - { - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - new {{packageName}}.Client.Configuration { BasePath = basePath } - ); - this.ApiClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - this.Client = this.ApiClient; - {{#supportsAsync}} - this.AsynchronousClient = this.ApiClient; - {{/supportsAsync}} - this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class using Configuration object. - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - /// An instance of Configuration. - /// - /// - public {{classname}}({{packageName}}.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - configuration - ); - this.ApiClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - this.Client = this.ApiClient; - {{#supportsAsync}} - this.AsynchronousClient = this.ApiClient; - {{/supportsAsync}} - ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class. - /// - /// An instance of HttpClient. - /// An optional instance of HttpClientHandler that is used by HttpClient. - /// - /// - /// - /// Some configuration settings will not be applied without passing an HttpClientHandler. - /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. - /// - public {{classname}}(HttpClient client, HttpClientHandler handler = null) : this(client, (string)null, handler) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// An instance of HttpClient. - /// The target service's base path in URL format. - /// An optional instance of HttpClientHandler that is used by HttpClient. - /// - /// - /// - /// - /// Some configuration settings will not be applied without passing an HttpClientHandler. - /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. - /// - public {{classname}}(HttpClient client, string basePath, HttpClientHandler handler = null) - { - if (client == null) throw new ArgumentNullException("client"); - - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - new {{packageName}}.Client.Configuration { BasePath = basePath } - ); - this.ApiClient = new {{packageName}}.Client.ApiClient(client, this.Configuration.BasePath, handler); - this.Client = this.ApiClient; - {{#supportsAsync}} - this.AsynchronousClient = this.ApiClient; - {{/supportsAsync}} - this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class using Configuration object. - /// - /// An instance of HttpClient. - /// An instance of Configuration. - /// An optional instance of HttpClientHandler that is used by HttpClient. - /// - /// - /// - /// Some configuration settings will not be applied without passing an HttpClientHandler. - /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. - /// - public {{classname}}(HttpClient client, {{packageName}}.Client.Configuration configuration, HttpClientHandler handler = null) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - if (client == null) throw new ArgumentNullException("client"); - - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - configuration - ); - this.ApiClient = new {{packageName}}.Client.ApiClient(client, this.Configuration.BasePath, handler); - this.Client = this.ApiClient; - {{#supportsAsync}} - this.AsynchronousClient = this.ApiClient; - {{/supportsAsync}} - ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access.{{#supportsAsync}} - /// The client interface for asynchronous API access.{{/supportsAsync}} - /// The configuration object. - /// - public {{classname}}({{packageName}}.Client.ISynchronousClient client, {{#supportsAsync}}{{packageName}}.Client.IAsynchronousClient asyncClient, {{/supportsAsync}}{{packageName}}.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - {{#supportsAsync}} - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - {{/supportsAsync}} - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - {{#supportsAsync}} - this.AsynchronousClient = asyncClient; - {{/supportsAsync}} - this.Configuration = configuration; - this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Disposes resources if they were created by us - /// - public void Dispose() - { - this.ApiClient?.Dispose(); - } - - /// - /// Holds the ApiClient if created - /// - public {{packageName}}.Client.ApiClient ApiClient { get; set; } = null; - - {{#supportsAsync}} - /// - /// The client for accessing this underlying API asynchronously. - /// - public {{packageName}}.Client.IAsynchronousClient AsynchronousClient { get; set; } - {{/supportsAsync}} - - /// - /// The client for accessing this underlying API synchronously. - /// - public {{packageName}}.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public {{packageName}}.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public {{packageName}}.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - {{#operation}} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - { - {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} - } - - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - { - {{#allParams}} - {{#required}} - {{^vendorExtensions.x-csharp-value-type}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - - {{/vendorExtensions.x-csharp-value-type}} - {{/required}} - {{/allParams}} - {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/consumes}} - }; - - // to determine the Accept header - string[] _accepts = new string[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - - var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - - {{#pathParams}} - {{#required}} - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - } - {{/required}} - {{/pathParams}} - {{#queryParams}} - {{#required}} - {{#isDeepObject}} - {{#items.vars}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); - {{/items.vars}} - {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); - {{/items}} - {{/isDeepObject}} - {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/isDeepObject}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isDeepObject}} - {{#items.vars}} - if ({{paramName}}.{{name}} != null) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); - } - {{/items.vars}} - {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); - {{/items}} - {{/isDeepObject}} - {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/isDeepObject}} - } - {{/required}} - {{/queryParams}} - {{#headerParams}} - {{#required}} - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - } - {{/required}} - {{/headerParams}} - {{#formParams}} - {{#required}} - {{#isFile}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isFile}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - } - {{/required}} - {{/formParams}} - {{#bodyParam}} - localVarRequestOptions.Data = {{paramName}}; - {{/bodyParam}} - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInCookie}} - // cookie parameter support - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInCookie}} - {{#isKeyInHeader}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasicBasic}} - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isBasicBearer}} - {{#isOAuth}} - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isOAuth}} - {{#isHttpSignature}} - if (this.Configuration.HttpSigningConfiguration != null) - { - var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); - foreach (var headerItem in HttpSigningHeaders) - { - if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) - { - localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; - } - else - { - localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); - } - } - } - {{/isHttpSignature}} - {{/authMethods}} - - // make the HTTP request - var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); - if (_exception != null) throw _exception; - } - - return localVarResponse; - } - - {{#supportsAsync}} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} - } - - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - {{#allParams}} - {{#required}} - {{^vendorExtensions.x-csharp-value-type}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - - {{/vendorExtensions.x-csharp-value-type}} - {{/required}} - {{/allParams}} - - {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}}, {{/-last}} - {{/consumes}} - }; - - // to determine the Accept header - string[] _accepts = new string[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - - - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - - var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - - {{#constantParams}} - {{#isPathParam}} - // Set client side default value of Path Param "{{baseName}}". - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant path parameter - {{/isPathParam}} - {{/constantParams}} - {{#pathParams}} - {{#required}} - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - } - {{/required}} - {{/pathParams}} - {{#constantParams}} - {{#isQueryParam}} - // Set client side default value of Query Param "{{baseName}}". - localVarRequestOptions.QueryParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant query parameter - {{/isQueryParam}} - {{/constantParams}} - {{#queryParams}} - {{#required}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - } - {{/required}} - {{/queryParams}} - {{#constantParams}} - {{#isHeaderParam}} - // Set client side default value of Header Param "{{baseName}}". - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}})); // Constant header parameter - {{/isHeaderParam}} - {{/constantParams}} - {{#headerParams}} - {{#required}} - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - } - {{/required}} - {{/headerParams}} - {{#formParams}} - {{#required}} - {{#isFile}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isFile}} - localVarRequestOptions.FileParameters.Add("{{baseName}}", {{paramName}}); - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - } - {{/required}} - {{/formParams}} - {{#bodyParam}} - localVarRequestOptions.Data = {{paramName}}; - {{/bodyParam}} - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInCookie}} - // cookie parameter support - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInCookie}} - {{#isKeyInHeader}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasic}} - {{#isBasicBasic}} - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isBasicBearer}} - {{/isBasic}} - {{#isOAuth}} - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isOAuth}} - {{#isHttpSignature}} - if (this.Configuration.HttpSigningConfiguration != null) - { - var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); - foreach (var headerItem in HttpSigningHeaders) - { - if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) - { - localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; - } - else - { - localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); - } - } - } - {{/isHttpSignature}} - {{/authMethods}} - - // make the HTTP request - - var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); - if (_exception != null) throw _exception; - } - - return localVarResponse; - } - - {{/supportsAsync}} - {{/operation}} - } - {{/operations}} -} diff --git a/generation/templates/libraries/httpclient/model.mustache b/generation/templates/libraries/httpclient/model.mustache deleted file mode 100644 index f84de7f6..00000000 --- a/generation/templates/libraries/httpclient/model.mustache +++ /dev/null @@ -1,51 +0,0 @@ -{{>partial_header}} - -{{#models}} -{{#model}} -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -{{#vendorExtensions.x-com-visible}} -using System.Runtime.InteropServices; -{{/vendorExtensions.x-com-visible}} -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -{{#discriminator}} -using JsonSubTypes; -{{/discriminator}} -{{/model}} -{{/models}} -{{#validatable}} -using System.ComponentModel.DataAnnotations; -{{/validatable}} -using FileParameter = {{packageName}}.Client.FileParameter; -using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter; -{{#useCompareNetObjects}} -using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; -{{/useCompareNetObjects}} -{{#models}} -{{#model}} -{{#oneOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/oneOf}} -{{#anyOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/anyOf}} - -namespace {{packageName}}.{{modelPackage}} -{ -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric}}{{/anyOf}}{{/oneOf}}{{/isEnum}} -{{/model}} -{{/models}} -} diff --git a/generation/templates/libraries/unityWebRequest/ApiClient.mustache b/generation/templates/libraries/unityWebRequest/ApiClient.mustache deleted file mode 100644 index 908c829f..00000000 --- a/generation/templates/libraries/unityWebRequest/ApiClient.mustache +++ /dev/null @@ -1,639 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters; -using System.Text; -using System.Threading; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; -using System.Net.Http; -using System.Net.Http.Headers; -using UnityEngine.Networking; -using UnityEngine; - -namespace {{packageName}}.Client -{ - /// - /// To Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. - /// - internal class CustomJsonCodec - { - private readonly IReadableConfiguration _configuration; - private static readonly string _contentType = "application/json"; - private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - public CustomJsonCodec(IReadableConfiguration configuration) - { - _configuration = configuration; - } - - public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) - { - _serializerSettings = serializerSettings; - _configuration = configuration; - } - - /// - /// Serialize the object into a JSON string. - /// - /// Object to be serialized. - /// A JSON string. - public string Serialize(object obj) - { - if (obj != null && obj is {{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema) - { - // the object to be serialized is an oneOf/anyOf schema - return (({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema)obj).ToJson(); - } - else - { - return JsonConvert.SerializeObject(obj, _serializerSettings); - } - } - - public T Deserialize(UnityWebRequest request) - { - var result = (T) Deserialize(request, typeof(T)); - return result; - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The UnityWebRequest after it has a response. - /// Object type. - /// Object representation of the JSON string. - internal object Deserialize(UnityWebRequest request, Type type) - { - if (type == typeof(byte[])) // return byte array - { - return request.downloadHandler.data; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - // NOTE: Ignoring Content-Disposition filename support, since not all platforms - // have a location on disk to write arbitrary data (tvOS, consoles). - return new MemoryStream(request.downloadHandler.data); - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(request.downloadHandler.text, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return Convert.ChangeType(request.downloadHandler.text, type); - } - - var contentType = request.GetResponseHeader("Content-Type"); - - if (!string.IsNullOrEmpty(contentType) && contentType.Contains("application/json")) - { - var text = request.downloadHandler?.text; - - // Generated APIs that don't expect a return value provide System.Object as the type - if (type == typeof(System.Object) && (string.IsNullOrEmpty(text) || text.Trim() == "null")) - { - return null; - } - - if (request.responseCode >= 200 && request.responseCode < 300) - { - try - { - // Deserialize as a model - return JsonConvert.DeserializeObject(text, type, _serializerSettings); - } - catch (Exception e) - { - throw new UnexpectedResponseException(request, type, e.ToString()); - } - } - else - { - throw new ApiException((int)request.responseCode, request.error, text); - } - } - - if (type != typeof(System.Object) && request.responseCode >= 200 && request.responseCode < 300) - { - throw new UnexpectedResponseException(request, type); - } - - return null; - - } - - public string RootElement { get; set; } - public string Namespace { get; set; } - public string DateFormat { get; set; } - - public string ContentType - { - get { return _contentType; } - set { throw new InvalidOperationException("Not allowed to set content type."); } - } - } - /// - /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), - /// encapsulating general REST accessor use cases. - /// - /// - /// The Dispose method will manage the HttpClient lifecycle when not passed by constructor. - /// - {{>visibility}} partial class ApiClient : IDisposable, ISynchronousClient{{#supportsAsync}}, IAsynchronousClient{{/supportsAsync}} - { - private readonly string _baseUrl; - - /// - /// Specifies the settings on a object. - /// These settings can be adjusted to accommodate custom serialization rules. - /// - public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Initializes a new instance of the , defaulting to the global configurations' base url. - /// - public ApiClient() : - this({{packageName}}.Client.GlobalConfiguration.Instance.BasePath) - { - } - - /// - /// Initializes a new instance of the . - /// - /// The target service's base path in URL format. - /// - public ApiClient(string basePath) - { - if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); - - _baseUrl = basePath; - } - - /// - /// Disposes resources if they were created by us - /// - public void Dispose() - { - } - - /// - /// Provides all logic for constructing a new UnityWebRequest. - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the UnityWebRequest. - /// - /// The http verb. - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// [private] A new UnityWebRequest instance. - /// - private UnityWebRequest NewRequest( - string method, - string path, - RequestOptions options, - IReadableConfiguration configuration) - { - if (path == null) throw new ArgumentNullException("path"); - if (options == null) throw new ArgumentNullException("options"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - WebRequestPathBuilder builder = new WebRequestPathBuilder(_baseUrl, path); - - builder.AddPathParameters(options.PathParameters); - - builder.AddQueryParameters(options.QueryParameters); - - string contentType = null; - if (options.HeaderParameters != null && options.HeaderParameters.ContainsKey("Content-Type")) - { - var contentTypes = options.HeaderParameters["Content-Type"]; - contentType = contentTypes.FirstOrDefault(); - } - - var uri = builder.GetFullUri(); - UnityWebRequest request = null; - - if (contentType == "multipart/form-data") - { - var formData = new List(); - foreach (var formParameter in options.FormParameters) - { - formData.Add(new MultipartFormDataSection(formParameter.Key, formParameter.Value)); - } - - request = UnityWebRequest.Post(uri, formData); - request.method = method; - } - else if (contentType == "application/x-www-form-urlencoded") - { - var form = new WWWForm(); - foreach (var kvp in options.FormParameters) - { - form.AddField(kvp.Key, kvp.Value); - } - - request = UnityWebRequest.Post(uri, form); - request.method = method; - } - else if (options.Data != null) - { - var serializer = new CustomJsonCodec(SerializerSettings, configuration); - var jsonData = serializer.Serialize(options.Data); - - // Making a post body application/json encoded is whack with UnityWebRequest. - // See: https://stackoverflow.com/questions/68156230/unitywebrequest-post-not-sending-body - request = UnityWebRequest.Put(uri, jsonData); - request.method = method; - request.SetRequestHeader("Content-Type", "application/json"); - } - else - { - request = new UnityWebRequest(builder.GetFullUri(), method); - } - - if (request.downloadHandler == null && typeof(T) != typeof(System.Object)) - { - request.downloadHandler = new DownloadHandlerBuffer(); - } - -#if UNITY_EDITOR || !UNITY_WEBGL - if (configuration.UserAgent != null) - { - request.SetRequestHeader("User-Agent", configuration.UserAgent); - } -#endif - - if (configuration.DefaultHeaders != null) - { - foreach (var headerParam in configuration.DefaultHeaders) - { - request.SetRequestHeader(headerParam.Key, headerParam.Value); - } - } - - if (options.HeaderParameters != null) - { - foreach (var headerParam in options.HeaderParameters) - { - foreach (var value in headerParam.Value) - { - // Todo make content headers actually content headers - request.SetRequestHeader(headerParam.Key, value); - } - } - } - - if (options.Cookies != null && options.Cookies.Count > 0) - { - #if UNITY_WEBGL - throw new System.InvalidOperationException("UnityWebRequest does not support setting cookies in WebGL"); - #else - if (options.Cookies.Count != 1) - { - UnityEngine.Debug.LogError("Only one cookie supported, ignoring others"); - } - - request.SetRequestHeader("Cookie", options.Cookies[0].ToString()); - #endif - } - - return request; - - } - - partial void InterceptRequest(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration); - partial void InterceptResponse(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration, ref object responseData); - - private ApiResponse ToApiResponse(UnityWebRequest request, object responseData) - { - T result = (T) responseData; - - var transformed = new ApiResponse((HttpStatusCode)request.responseCode, new Multimap({{#caseInsensitiveResponseHeaders}}StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), result, request.downloadHandler?.text ?? "") - { - ErrorText = request.error, - Cookies = new List() - }; - - // process response headers, e.g. Access-Control-Allow-Methods - var responseHeaders = request.GetResponseHeaders(); - if (responseHeaders != null) - { - foreach (var responseHeader in request.GetResponseHeaders()) - { - transformed.Headers.Add(responseHeader.Key, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - - return transformed; - } - - private async Task> ExecAsync( - UnityWebRequest request, - string path, - RequestOptions options, - IReadableConfiguration configuration, - System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var deserializer = new CustomJsonCodec(SerializerSettings, configuration); - - using (request) - { - if (configuration.Timeout > 0) - { - request.timeout = (int)Math.Ceiling(configuration.Timeout / 1000.0f); - } - - if (configuration.Proxy != null) - { - throw new InvalidOperationException("Configuration `Proxy` not supported by UnityWebRequest"); - } - - if (configuration.ClientCertificates != null) - { - // Only Android/iOS/tvOS/Standalone players can support certificates, and this - // implementation is intended to work on all platforms. - // - // TODO: Could optionally allow support for this on these platforms. - // - // See: https://docs.unity3d.com/ScriptReference/Networking.CertificateHandler.html - throw new InvalidOperationException("Configuration `ClientCertificates` not supported by UnityWebRequest on all platforms"); - } - - InterceptRequest(request, path, options, configuration); - - var asyncOp = request.SendWebRequest(); - - TaskCompletionSource tsc = new TaskCompletionSource(); - asyncOp.completed += (_) => tsc.TrySetResult(request.result); - - using (var tokenRegistration = cancellationToken.Register(request.Abort, true)) - { - await tsc.Task; - } - - if (request.result == UnityWebRequest.Result.ConnectionError || - request.result == UnityWebRequest.Result.DataProcessingError) - { - throw new ConnectionException(request); - } - - object responseData = deserializer.Deserialize(request); - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof({{{packageName}}}.{{modelPackage}}.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - responseData = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { new ByteArrayContent(request.downloadHandler.data) }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - responseData = (T) (object) new MemoryStream(request.downloadHandler.data); - } - - InterceptResponse(request, path, options, configuration, ref responseData); - - return ToApiResponse(request, responseData); - } - } - - {{#supportsAsync}} - #region IAsynchronousClient - /// - /// Make a HTTP GET request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest("GET", path, options, config), path, options, config, cancellationToken); - } - - /// - /// Make a HTTP POST request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest("POST", path, options, config), path, options, config, cancellationToken); - } - - /// - /// Make a HTTP PUT request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest("PUT", path, options, config), path, options, config, cancellationToken); - } - - /// - /// Make a HTTP DELETE request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest("DELETE", path, options, config), path, options, config, cancellationToken); - } - - /// - /// Make a HTTP HEAD request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest("HEAD", path, options, config), path, options, config, cancellationToken); - } - - /// - /// Make a HTTP OPTION request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest("OPTIONS", path, options, config), path, options, config, cancellationToken); - } - - /// - /// Make a HTTP PATCH request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest("PATCH", path, options, config), path, options, config, cancellationToken); - } - #endregion IAsynchronousClient - {{/supportsAsync}} - - #region ISynchronousClient - /// - /// Make a HTTP GET request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); - } - - /// - /// Make a HTTP POST request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); - } - - /// - /// Make a HTTP PUT request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); - } - - /// - /// Make a HTTP DELETE request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); - } - - /// - /// Make a HTTP HEAD request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); - } - - /// - /// Make a HTTP OPTION request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); - } - - /// - /// Make a HTTP PATCH request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - throw new System.NotImplementedException("UnityWebRequest does not support synchronous operation"); - } - #endregion ISynchronousClient - } -} \ No newline at end of file diff --git a/generation/templates/libraries/unityWebRequest/ConnectionException.mustache b/generation/templates/libraries/unityWebRequest/ConnectionException.mustache deleted file mode 100644 index 108ea3bf..00000000 --- a/generation/templates/libraries/unityWebRequest/ConnectionException.mustache +++ /dev/null @@ -1,21 +0,0 @@ -{{>partial_header}} - -using System; -using UnityEngine.Networking; - -namespace {{packageName}}.Client -{ - public class ConnectionException : Exception - { - public UnityWebRequest.Result Result { get; private set; } - public string Error { get; private set; } - - // NOTE: Cannot keep reference to the request since it will be disposed. - public ConnectionException(UnityWebRequest request) - : base($"result={request.result} error={request.error}") - { - Result = request.result; - Error = request.error ?? ""; - } - } -} diff --git a/generation/templates/libraries/unityWebRequest/README.mustache b/generation/templates/libraries/unityWebRequest/README.mustache deleted file mode 100644 index b0a140dd..00000000 --- a/generation/templates/libraries/unityWebRequest/README.mustache +++ /dev/null @@ -1,175 +0,0 @@ -# {{packageName}} - the C# library for the {{appName}} - -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: {{appVersion}} -- SDK version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Generator version: {{generatorVersion}} -- Build package: {{generatorClass}} -{{#infoUrl}} - For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - - -## Version support -This generator should support all current LTS versions of Unity -- Unity 2020.3 (LTS) and up -- .NET Standard 2.1 / .NET Framework - - -## Dependencies - -- [Newtonsoft.Json](https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@3.0/manual/index.html) - 3.0.2 or later -- [Unity Test Framework](https://docs.unity3d.com/Packages/com.unity.test-framework@1.1/manual/index.html) - 1.1.33 or later - - -## Installation -Add the dependencies to `Packages/manifest.json` -``` -{ - "dependencies": { - ... - "com.unity.nuget.newtonsoft-json": "3.0.2", - "com.unity.test-framework": "1.1.33", - } -} -``` - -Then use the namespaces: -```csharp -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; -``` - - -## Getting Started - -```csharp -using System; -using System.Collections.Generic; -using UnityEngine; -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; - -namespace {{packageName}}Example -{ -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - public class {{operationId}}Example : MonoBehaviour - { - async void Start() - { - Configuration config = new Configuration(); - config.BasePath = "{{{basePath}}}"; - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - config.Username = "YOUR_USERNAME"; - config.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure Bearer token for authorization: {{{name}}} - config.AccessToken = "YOUR_BEARER_TOKEN"; - {{/isBasicBearer}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - config.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - config.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - - {{/hasAuthMethods}} - var apiInstance = new {{classname}}(config); - {{#allParams}} - {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{/allParams}} - - try - { - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}{{{.}}} result = {{/returnType}}await apiInstance.{{{operationId}}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.Log(result);{{/returnType}} - Debug.Log("Done!"); - } - catch (ApiException e) - { - Debug.LogError("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); - Debug.LogError("Status Code: "+ e.ErrorCode); - Debug.LogError(e.StackTrace); - } -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} - } - } -} -``` - - -## Documentation for API Endpoints - -All URIs are relative to *{{{basePath}}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{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}} - - -## Documentation for Authorization - -{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} -{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} -{{#authMethods}} - -### {{name}} - -{{#isApiKey}}- **Type**: API key -- **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasicBasic}}- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}}- **Type**: Bearer Authentication -{{/isBasicBearer}} -{{#isHttpSignature}}- **Type**: HTTP signature authentication -{{/isHttpSignature}} -{{#isOAuth}}- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - {{scope}}: {{description}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} diff --git a/generation/templates/libraries/unityWebRequest/RequestOptions.mustache b/generation/templates/libraries/unityWebRequest/RequestOptions.mustache deleted file mode 100644 index 0dd18c4e..00000000 --- a/generation/templates/libraries/unityWebRequest/RequestOptions.mustache +++ /dev/null @@ -1,60 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; - -namespace {{packageName}}.Client -{ - /// - /// A container for generalized request inputs. This type allows consumers to extend the request functionality - /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). - /// - public class RequestOptions - { - /// - /// Parameters to be bound to path parts of the Request's URL - /// - public Dictionary PathParameters { get; set; } - - /// - /// Query parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap QueryParameters { get; set; } - - /// - /// Header parameters to be applied to to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap HeaderParameters { get; set; } - - /// - /// Form parameters to be sent along with the request. - /// - public Dictionary FormParameters { get; set; } - - /// - /// Cookies to be sent along with the request. - /// - public List Cookies { get; set; } - - /// - /// Any data associated with a request body. - /// - public Object Data { get; set; } - - /// - /// Constructs a new instance of - /// - public RequestOptions() - { - PathParameters = new Dictionary(); - QueryParameters = new Multimap(); - HeaderParameters = new Multimap(); - FormParameters = new Dictionary(); - Cookies = new List(); - } - } -} diff --git a/generation/templates/libraries/unityWebRequest/UnexpectedResponseException.mustache b/generation/templates/libraries/unityWebRequest/UnexpectedResponseException.mustache deleted file mode 100644 index a976b2a7..00000000 --- a/generation/templates/libraries/unityWebRequest/UnexpectedResponseException.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{>partial_header}} - -using System; -using UnityEngine.Networking; - -namespace {{packageName}}.Client -{ - // Thrown when a backend doesn't return an expected response based on the expected type - // of the response data. - public class UnexpectedResponseException : Exception - { - public int ErrorCode { get; private set; } - - // NOTE: Cannot keep reference to the request since it will be disposed. - public UnexpectedResponseException(UnityWebRequest request, System.Type type, string extra = "") - : base(CreateMessage(request, type, extra)) - { - ErrorCode = (int)request.responseCode; - } - - private static string CreateMessage(UnityWebRequest request, System.Type type, string extra) - { - return $"httpcode={request.responseCode}, expected {type.Name} but got data: {extra}"; - } - } -} diff --git a/generation/templates/libraries/unityWebRequest/api.mustache b/generation/templates/libraries/unityWebRequest/api.mustache deleted file mode 100644 index 6b0a5883..00000000 --- a/generation/templates/libraries/unityWebRequest/api.mustache +++ /dev/null @@ -1,690 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using {{packageName}}.Client; -{{#hasImport}}using {{packageName}}.{{modelPackage}}; -{{/hasImport}} - -namespace {{packageName}}.{{apiPackage}} -{ - {{#operations}} - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}}Sync : IApiAccessor - { - #region Synchronous Operations - {{#operation}} - /// - /// {{summary}} - /// - {{#notes}} - /// - /// {{.}} - /// - {{/notes}} - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); - - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); - {{/operation}} - #endregion Synchronous Operations - } - - {{#supportsAsync}} - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}}Async : IApiAccessor - { - #region Asynchronous Operations - {{#operation}} - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// {{summary}} - /// - /// - /// {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - {{/operation}} - #endregion Asynchronous Operations - } - {{/supportsAsync}} - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}} : {{interfacePrefix}}{{classname}}Sync{{#supportsAsync}}, {{interfacePrefix}}{{classname}}Async{{/supportsAsync}} - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} partial class {{classname}} : IDisposable, {{interfacePrefix}}{{classname}} - { - private {{packageName}}.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - /// - public {{classname}}() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - /// The target service's base path in URL format. - /// - /// - public {{classname}}(string basePath) - { - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - new {{packageName}}.Client.Configuration { BasePath = basePath } - ); - this.ApiClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - this.Client = this.ApiClient; - {{#supportsAsync}} - this.AsynchronousClient = this.ApiClient; - {{/supportsAsync}} - this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class using Configuration object. - /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHandler. - /// - /// An instance of Configuration. - /// - /// - public {{classname}}({{packageName}}.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = {{packageName}}.Client.Configuration.MergeConfigurations( - {{packageName}}.Client.GlobalConfiguration.Instance, - configuration - ); - this.ApiClient = new {{packageName}}.Client.ApiClient(this.Configuration.BasePath); - this.Client = this.ApiClient; - {{#supportsAsync}} - this.AsynchronousClient = this.ApiClient; - {{/supportsAsync}} - ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access.{{#supportsAsync}} - /// The client interface for asynchronous API access.{{/supportsAsync}} - /// The configuration object. - /// - public {{classname}}({{packageName}}.Client.ISynchronousClient client, {{#supportsAsync}}{{packageName}}.Client.IAsynchronousClient asyncClient, {{/supportsAsync}}{{packageName}}.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - {{#supportsAsync}} - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - {{/supportsAsync}} - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - {{#supportsAsync}} - this.AsynchronousClient = asyncClient; - {{/supportsAsync}} - this.Configuration = configuration; - this.ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Disposes resources if they were created by us - /// - public void Dispose() - { - this.ApiClient?.Dispose(); - } - - /// - /// Holds the ApiClient if created - /// - public {{packageName}}.Client.ApiClient ApiClient { get; set; } = null; - - {{#supportsAsync}} - /// - /// The client for accessing this underlying API asynchronously. - /// - public {{packageName}}.Client.IAsynchronousClient AsynchronousClient { get; set; } - {{/supportsAsync}} - - /// - /// The client for accessing this underlying API synchronously. - /// - public {{packageName}}.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public {{packageName}}.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public {{packageName}}.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - {{#operation}} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - { - {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} - } - - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - { - {{#allParams}} - {{#required}} - {{^vendorExtensions.x-csharp-value-type}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - - {{/vendorExtensions.x-csharp-value-type}} - {{/required}} - {{/allParams}} - {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/consumes}} - }; - - // to determine the Accept header - string[] _accepts = new string[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - - var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - - {{#pathParams}} - {{#required}} - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - } - {{/required}} - {{/pathParams}} - {{#queryParams}} - {{#required}} - {{#isDeepObject}} - {{#items.vars}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); - {{/items.vars}} - {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); - {{/items}} - {{/isDeepObject}} - {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/isDeepObject}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isDeepObject}} - {{#items.vars}} - if ({{paramName}}.{{name}} != null) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); - } - {{/items.vars}} - {{^items}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); - {{/items}} - {{/isDeepObject}} - {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/isDeepObject}} - } - {{/required}} - {{/queryParams}} - {{#headerParams}} - {{#required}} - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - } - {{/required}} - {{/headerParams}} - {{#formParams}} - {{#required}} - {{#isFile}} - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isFile}} - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - } - {{/required}} - {{/formParams}} - {{#bodyParam}} - localVarRequestOptions.Data = {{paramName}}; - {{/bodyParam}} - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInCookie}} - // cookie parameter support - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInCookie}} - {{#isKeyInHeader}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasicBasic}} - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isBasicBearer}} - {{#isOAuth}} - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isOAuth}} - {{#isHttpSignature}} - if (this.Configuration.HttpSigningConfiguration != null) - { - var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); - foreach (var headerItem in HttpSigningHeaders) - { - if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) - { - localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; - } - else - { - localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); - } - } - } - {{/isHttpSignature}} - {{/authMethods}} - - // make the HTTP request - var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); - if (_exception != null) throw _exception; - } - - return localVarResponse; - } - - {{#supportsAsync}} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of {{returnType}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var task = {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); - {{#returnType}} -#if UNITY_EDITOR || !UNITY_WEBGL - {{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await task.ConfigureAwait(false); -#else - {{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await task; -#endif - return localVarResponse.Data; - {{/returnType}} - {{^returnType}} -#if UNITY_EDITOR || !UNITY_WEBGL - await task.ConfigureAwait(false); -#else - await task; -#endif - {{/returnType}} - } - - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - {{#allParams}} - {{#required}} - {{^vendorExtensions.x-csharp-value-type}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - - {{/vendorExtensions.x-csharp-value-type}} - {{/required}} - {{/allParams}} - - {{packageName}}.Client.RequestOptions localVarRequestOptions = new {{packageName}}.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}}, {{/-last}} - {{/consumes}} - }; - - // to determine the Accept header - string[] _accepts = new string[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - - - var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - - var localVarAccept = {{packageName}}.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - - {{#pathParams}} - {{#required}} - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.PathParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // path parameter - } - {{/required}} - {{/pathParams}} - {{#queryParams}} - {{#required}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); - } - {{/required}} - {{/queryParams}} - {{#headerParams}} - {{#required}} - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - localVarRequestOptions.HeaderParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // header parameter - } - {{/required}} - {{/headerParams}} - {{#formParams}} - {{#required}} - {{#isFile}} - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - {{/required}} - {{^required}} - if ({{paramName}} != null) - { - {{#isFile}} - {{/isFile}} - {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}})); // form parameter - {{/isFile}} - } - {{/required}} - {{/formParams}} - {{#bodyParam}} - localVarRequestOptions.Data = {{paramName}}; - {{/bodyParam}} - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInCookie}} - // cookie parameter support - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.Cookies.Add(new Cookie("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInCookie}} - {{#isKeyInHeader}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.HeaderParameters.Add("{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}")); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasic}} - {{#isBasicBasic}} - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + {{packageName}}.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isBasicBearer}} - {{/isBasic}} - {{#isOAuth}} - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - {{/isOAuth}} - {{#isHttpSignature}} - if (this.Configuration.HttpSigningConfiguration != null) - { - var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "{{{httpMethod}}}", "{{{path}}}", localVarRequestOptions); - foreach (var headerItem in HttpSigningHeaders) - { - if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) - { - localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; - } - else - { - localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); - } - } - } - {{/isHttpSignature}} - {{/authMethods}} - - // make the HTTP request - - var task = this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken); - -#if UNITY_EDITOR || !UNITY_WEBGL - var localVarResponse = await task.ConfigureAwait(false); -#else - var localVarResponse = await task; -#endif - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("{{operationId}}", localVarResponse); - if (_exception != null) throw _exception; - } - - return localVarResponse; - } - - {{/supportsAsync}} - {{/operation}} - } - {{/operations}} -} diff --git a/generation/templates/libraries/unityWebRequest/api_test.mustache b/generation/templates/libraries/unityWebRequest/api_test.mustache deleted file mode 100644 index 0f7f49f7..00000000 --- a/generation/templates/libraries/unityWebRequest/api_test.mustache +++ /dev/null @@ -1,74 +0,0 @@ -{{>partial_header}} -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using NUnit.Framework; - -using {{packageName}}.Client; -using {{packageName}}.{{apiPackage}}; -{{#hasImport}} -// uncomment below to import models -//using {{packageName}}.{{modelPackage}}; -{{/hasImport}} - -namespace {{packageName}}.Test.Api -{ - /// - /// Class for testing {{classname}} - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class {{classname}}Tests : IDisposable - { - {{^nonPublicApi}} - private {{classname}} instance; - - {{/nonPublicApi}} - public {{classname}}Tests() - { - {{^nonPublicApi}} - instance = new {{classname}}(); - {{/nonPublicApi}} - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of {{classname}} - /// - [Test] - public void {{operationId}}InstanceTest() - { - // TODO uncomment below to test 'IsType' {{classname}} - //Assert.IsType<{{classname}}>(instance); - } - {{#operations}} - {{#operation}} - - /// - /// Test {{operationId}} - /// - [Test] - public void {{operationId}}Test() - { - // TODO uncomment below to test the method and replace null with proper value - {{#allParams}} - //{{{dataType}}} {{paramName}} = null; - {{/allParams}} - //{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{#returnType}} - //Assert.IsType<{{{.}}}>(response); - {{/returnType}} - } - {{/operation}} - {{/operations}} - } -} diff --git a/generation/templates/libraries/unityWebRequest/asmdef.mustache b/generation/templates/libraries/unityWebRequest/asmdef.mustache deleted file mode 100644 index a30cba8c..00000000 --- a/generation/templates/libraries/unityWebRequest/asmdef.mustache +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "{{packageName}}", - "overrideReferences": true, - "precompiledReferences": [ - "Newtonsoft.Json.dll" - ] -} diff --git a/generation/templates/libraries/unityWebRequest/asmdef_test.mustache b/generation/templates/libraries/unityWebRequest/asmdef_test.mustache deleted file mode 100644 index c5e2d585..00000000 --- a/generation/templates/libraries/unityWebRequest/asmdef_test.mustache +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "{{testPackageName}}", - "references": [ - "{{packageName}}", - "UnityEngine.TestRunner" - ], - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "Newtonsoft.Json.dll" - ], - "defineConstraints": [ - "UNITY_INCLUDE_TESTS" - ] -} diff --git a/generation/templates/libraries/unityWebRequest/model.mustache b/generation/templates/libraries/unityWebRequest/model.mustache deleted file mode 100644 index 3c1c6c0e..00000000 --- a/generation/templates/libraries/unityWebRequest/model.mustache +++ /dev/null @@ -1,47 +0,0 @@ -{{>partial_header}} - -{{#models}} -{{#model}} -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -{{#vendorExtensions.x-com-visible}} -using System.Runtime.InteropServices; -{{/vendorExtensions.x-com-visible}} -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -{{/model}} -{{/models}} -{{#validatable}} -using System.ComponentModel.DataAnnotations; -{{/validatable}} -using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter; -{{#useCompareNetObjects}} -using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; -{{/useCompareNetObjects}} -{{#models}} -{{#model}} -{{#oneOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/oneOf}} -{{#anyOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/anyOf}} - -namespace {{packageName}}.{{modelPackage}} -{ -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric}}{{/anyOf}}{{/oneOf}}{{/isEnum}} -{{/model}} -{{/models}} -} diff --git a/generation/templates/model.mustache b/generation/templates/model.mustache index 0d0c0b68..39247573 100644 --- a/generation/templates/model.mustache +++ b/generation/templates/model.mustache @@ -6,17 +6,27 @@ using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; using System.IO; +using System.Linq; +{{#oneOf}} +{{#-first}} +using System.Reflection; +{{/-first}} +{{/oneOf}} +{{#anyOf}} +{{#-first}} +using System.Reflection; +{{/-first}} +{{/anyOf}} {{#vendorExtensions.x-com-visible}} using System.Runtime.InteropServices; {{/vendorExtensions.x-com-visible}} using System.Runtime.Serialization; using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.Json.Serialization.Metadata; using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; {{#discriminator}} using JsonSubTypes; {{/discriminator}} @@ -25,26 +35,12 @@ using JsonSubTypes; {{#validatable}} using System.ComponentModel.DataAnnotations; {{/validatable}} -using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter; {{#useCompareNetObjects}} using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; {{/useCompareNetObjects}} {{#models}} {{#model}} -{{#oneOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/oneOf}} -{{#anyOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/anyOf}} -namespace {{packageName}}.{{modelPackage}} -{ -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric}}{{/anyOf}}{{/oneOf}}{{/isEnum}} -{{/model}} -{{/models}} -} +namespace {{packageName}}.{{modelPackage}}; + +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric}}{{/anyOf}}{{/oneOf}}{{/isEnum}}{{/model}}{{/models}} \ No newline at end of file diff --git a/generation/templates/modelAnyOf.mustache b/generation/templates/modelAnyOf.mustache index f3eac973..2e132902 100644 --- a/generation/templates/modelAnyOf.mustache +++ b/generation/templates/modelAnyOf.mustache @@ -1,4 +1,5 @@ {{#model}} +#region "AnyOf Schema" /// /// {{description}}{{^description}}{{classname}}{{/description}} /// @@ -9,7 +10,6 @@ [ComVisible({{{.}}})] {{/vendorExtensions.x-com-visible}} [JsonConverter(typeof({{classname}}JsonConverter))] - [DataContract(Name = "{{{name}}}")] {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} { {{#isNullable}} @@ -18,8 +18,8 @@ /// public {{classname}}() { - IsNullable = true; - SchemaType= "anyOf"; + this.IsNullable = true; + this.SchemaType= "anyOf"; } {{/isNullable}} @@ -33,9 +33,9 @@ /// An instance of {{dataType}}. public {{classname}}({{{dataType}}} actualInstance) { - IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}}; - SchemaType= "anyOf"; - 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}}; + this.IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}}; + this.SchemaType= "anyOf"; + 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}}; } {{/isNull}} @@ -58,7 +58,7 @@ {{#anyOf}} {{^-first}}else {{/-first}}if (value.GetType() == typeof({{{.}}})) { - _actualInstance = value; + this._actualInstance = value; } {{/anyOf}} else @@ -78,7 +78,7 @@ /// An instance of {{dataType}} public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}() { - return ({{{dataType}}})ActualInstance; + return ({{{dataType}}})this.ActualInstance; } {{/isNull}} {{/vendorExtensions.x-duplicated-data-type}} @@ -92,7 +92,7 @@ { var sb = new StringBuilder(); sb.Append("class {{classname}} {\n"); - sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -103,7 +103,7 @@ /// JSON string presentation of the object public override string ToJson() { - return JsonConvert.SerializeObject(ActualInstance, {{classname}}.SerializerSettings); + return JsonSerializer.Serialize(this.ActualInstance, {{classname}}.SerializerSettings); } /// @@ -123,7 +123,7 @@ try { - new{{classname}} = new {{classname}}(JsonConvert.DeserializeObject<{{{.}}}>(jsonString, {{classname}}.SerializerSettings)); + new{{classname}} = new {{classname}}(JsonSerializer.Deserialize<{{{.}}}>(jsonString, {{classname}}.SerializerSettings)); // deserialization is considered successful at this point if no exception has been thrown. return new{{classname}}; } @@ -150,7 +150,7 @@ return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; {{/useCompareNetObjects}} {{^useCompareNetObjects}} - return Equals(input as {{classname}}); + return this.Equals(input as {{classname}}); {{/useCompareNetObjects}} } @@ -168,7 +168,7 @@ if (input == null) return false; - return ActualInstance.Equals(input.ActualInstance); + return this.ActualInstance.Equals(input.ActualInstance); {{/useCompareNetObjects}} } @@ -181,8 +181,8 @@ unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (ActualInstance != null) - hashCode = hashCode * 59 + ActualInstance.GetHashCode(); + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); return hashCode; } } @@ -227,39 +227,11 @@ /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - switch(reader.TokenType) + if(reader.TokenType != JsonToken.Null) { - {{#composedSchemas.anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{#isInteger}} - case JsonToken.Integer: - return new {{classname}}(Convert.ToInt32(reader.Value)); - {{/isInteger}} - {{#isNumber}} - case JsonToken.Float: - return new {{classname}}(Convert.ToDecimal(reader.Value)); - {{/isNumber}} - {{#isString}} - case JsonToken.String: - return new {{classname}}(Convert.ToString(reader.Value)); - {{/isString}} - {{#isBoolean}} - case JsonToken.Boolean: - return new {{classname}}(Convert.ToBoolean(reader.Value)); - {{/isBoolean}} - {{#isDate}} - case JsonToken.Date: - return new {{classname}}(Convert.ToDateTime(reader.Value)); - {{/isDate}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.anyOf}} - case JsonToken.StartObject: - return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); - case JsonToken.StartArray: - return {{classname}}.FromJson(JArray.Load(reader).ToString(Formatting.None)); - default: - return null; + return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); } + return null; } /// @@ -272,4 +244,5 @@ return false; } } +#endregion {{/model}} \ No newline at end of file diff --git a/generation/templates/modelEnum.mustache b/generation/templates/modelEnum.mustache index 37fb53f5..e000a1cf 100644 --- a/generation/templates/modelEnum.mustache +++ b/generation/templates/modelEnum.mustache @@ -1,185 +1,62 @@ - /// - /// {{description}}{{^description}}Defines {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{#vendorExtensions.x-cls-compliant}} - [CLSCompliant({{{.}}})] - {{/vendorExtensions.x-cls-compliant}} - {{#vendorExtensions.x-com-visible}} - [ComVisible({{{.}}})] - {{/vendorExtensions.x-com-visible}} +/// +/// {{description}}{{^description}}Defines {{{name}}}{{/description}} +/// +{{#description}} +/// {{.}} +{{/description}} +[JsonConverter(typeof({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter))] +{{>visibility}} class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} +{ + private string _value; + {{#allowableValues}} {{#enumVars}} {{#-first}} - {{#isString}} - {{^useGenericHost}} - [JsonConverter(typeof(StringEnumConverter))] - {{/useGenericHost}} - {{/isString}} + internal {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}() + { + _value = "{{value}}"; + } {{/-first}} {{/enumVars}} {{/allowableValues}} - {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} - { - {{#allowableValues}} - {{#enumVars}} - /// - /// Enum {{name}} for value: {{value}} - /// - {{#isString}} - {{^useGenericHost}} - {{! EnumMember not currently supported in System.Text.Json, use a converter instead }} - [EnumMember(Value = "{{{value}}}")] - {{/useGenericHost}} - {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}}{{^vendorExtensions.x-zero-based-enum}} = {{-index}}{{/vendorExtensions.x-zero-based-enum}}{{/isString}}{{^-last}},{{/-last}} - {{^-last}} - - {{/-last}} - {{/enumVars}} - {{/allowableValues}} - } - {{#useGenericHost}} /// - /// Converts to and from the JSON value + /// Create a new instance of {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} with a custom value. /// - public static class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter + /// 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) { - /// - /// Parses a given value to - /// - /// - /// - public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} FromString(string value) - { - {{#allowableValues}} - {{#enumVars}} - if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) - return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; - - {{/enumVars}} - {{/allowableValues}} - throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? FromStringOrDefault(string value) - { - {{#allowableValues}} - {{#enumVars}} - if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) - return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; - - {{/enumVars}} - {{/allowableValues}} - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static {{>EnumValueDataType}} ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value) - { - {{^isString}} - return ({{>EnumValueDataType}}) value; - {{/isString}} - {{#isString}} - {{#allowableValues}} - {{#enumVars}} - if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}) - return {{^isNumeric}}"{{/isNumeric}}{{{value}}}{{^isNumeric}}"{{/isNumeric}}; - - {{/enumVars}} - {{/allowableValues}} - throw new NotImplementedException($"Value could not be handled: '{value}'"); - {{/isString}} - } + _value = value; } + {{#allowableValues}} + {{#enumVars}} /// - /// A Json converter for type + /// Enum {{name}} for value: {{value}} /// - /// - public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> - { - /// - /// Returns a {{datatypeWithEnum}} from the Json object - /// - /// - /// - /// - /// - public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string{{nrt?}} rawValue = reader.GetString(); - - {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null - ? null - : {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter.FromStringOrDefault(rawValue); + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{name}} { get; } = new("{{value}}"); - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions options) - { - writer.WriteStringValue({{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}.ToString()); - } - } + {{^-last}} - /// - /// A Json converter for type - /// - public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableJsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}?> - { - /// - /// Returns a {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} from the Json object - /// - /// - /// - /// - /// - public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string{{nrt?}} rawValue = reader.GetString(); + {{/-last}} + {{/enumVars}} + {{/allowableValues}} - {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null - ? null - : {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter.FromStringOrDefault(rawValue); + public override string ToString() => _value; +} - if (result != null) - return result.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; - throw new JsonException(); - } + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? {{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions options) - { - writer.WriteStringValue({{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}?.ToString() ?? "null"); - } - } - {{/useGenericHost}} + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}); +} \ No newline at end of file diff --git a/generation/templates/modelEnum_test.mustache b/generation/templates/modelEnum_test.mustache new file mode 100644 index 00000000..f7b433f5 --- /dev/null +++ b/generation/templates/modelEnum_test.mustache @@ -0,0 +1,56 @@ +{{#models}} +{{#model}} + /// + /// Class for testing {{classname}} + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class {{classname}}Tests + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + [Fact] + public void ParameterlessConstructorSetsDefaultValue() + { + var testModel = new {{classname}}(); + Assert.Equal("{{value}}", testModel.ToString()); + } + {{/-first}} + + [Fact] + public void {{name}}Test() + { + var testModel = {{classname}}.{{name}}; + Assert.Equal("{{value}}", testModel.ToString()); + } + {{/enumVars}} + {{/allowableValues}} + + + [Fact] + public void CustomValueTest() + { + var testModel = new {{classname}}("a custom value"); + Assert.Equal("a custom value", testModel.ToString()); + } + + /// + /// Test deserialize a {{classname}} from a string + /// + [Fact] + public void CanDeserializeFromStringTest() + { + var testModel = JsonSerializer.Deserialize<{{{classname}}}>("\"a custom value\""); + Assert.IsType<{{{classname}}}>(testModel); + Assert.Equal("a custom value", testModel.ToString()); + } + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } +{{/model}} +{{/models}} diff --git a/generation/templates/modelGeneric.mustache b/generation/templates/modelGeneric.mustache index 432b6e34..beb447d2 100644 --- a/generation/templates/modelGeneric.mustache +++ b/generation/templates/modelGeneric.mustache @@ -1,426 +1,242 @@ - /// - /// {{description}}{{^description}}{{classname}}{{/description}} - /// - {{#vendorExtensions.x-cls-compliant}} - [CLSCompliant({{{vendorExtensions.x-cls-compliant}}})] - {{/vendorExtensions.x-cls-compliant}} - {{#vendorExtensions.x-com-visible}} - [ComVisible({{{vendorExtensions.x-com-visible}}})] - {{/vendorExtensions.x-com-visible}} - [DataContract(Name = "{{{name}}}")] - {{^useUnityWebRequest}} - {{#discriminator}} - [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")] - {{#mappedModels}} - [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] - {{/mappedModels}} - {{/discriminator}} - {{/useUnityWebRequest}} - {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}} : .{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} - { - {{#vars}} - {{#items.isEnum}} - {{#items}} - {{^complexType}} +/// +/// {{description}}{{^description}}{{classname}}{{/description}} +/// +{{#vendorExtensions.x-cls-compliant}} +[CLSCompliant({{{vendorExtensions.x-cls-compliant}}})] +{{/vendorExtensions.x-cls-compliant}} +{{#vendorExtensions.x-com-visible}} +[ComVisible({{{vendorExtensions.x-com-visible}}})] +{{/vendorExtensions.x-com-visible}} +{{^useUnityWebRequest}} +{{#discriminator}} +[JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")] +{{#mappedModels}} +[JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] +{{/mappedModels}} +{{/discriminator}} +{{/useUnityWebRequest}} +{{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}} : .{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} +{ + {{#vars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} {{>modelInnerEnum}} - {{/complexType}} - {{/items}} - {{/items.isEnum}} - {{#isEnum}} - {{^complexType}} + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{#isEnum}} + {{^complexType}} {{>modelInnerEnum}} - {{/complexType}} - {{/isEnum}} - {{#isEnum}} + {{/complexType}} + {{/isEnum}} + {{#isEnum}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} CLOVUS + /// + {{#description}} + /// {{.}} + {{/description}} + {{#example}} + /// + /// {{.}} + /// + {{/example}} + [JsonPropertyName("{{baseName}}")]{{#required}} + [JsonRequired]{{/required}} + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; }{{#required}} = new(); + + {{/required}} + {{/isEnum}} + {{/vars}} + + {{#vars}} + {{^isInherited}} + {{^isEnum}} + {{#items.vars}} + {{#-first}} + public class {{classname}}Item + { + {{/-first}} /// /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} + /// {{#description}} + /// {{.}}{{/description}} {{#example}} - /// {{.}} + /// + /// {{.}} + /// {{/example}} - {{^conditionalSerialization}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } - {{#isReadOnly}} - - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{#isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + [JsonPropertyName("{{baseName}}")]{{#required}} + [JsonRequired]{{/required}} + {{#isDate}} + [JsonConverter(typeof(DateJsonConverter))] + {{/isDate}} {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } - + public {{{dataType}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; } - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} + {{#-last}} + } + {{/-last}} + {{/items.vars}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#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; } + + {{/isEnum}} + {{/isInherited}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } - {{^isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} - { - get{ return _{{name}};} - set - { - _{{name}} = value; - _flag{{name}} = true; - } - } - private {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}}; - private bool _flag{{name}}; + {{/isAdditionalPropertiesTrue}} - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return _flag{{name}}; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{/isEnum}} + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class {{classname}} {\n"); + {{#parent}} + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + {{/parent}} + {{#vars}} + sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); {{/vars}} - {{#hasRequired}} - {{^hasOnlyReadOnly}} - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - {{^isAdditionalPropertiesTrue}} - protected {{classname}}() { } - {{/isAdditionalPropertiesTrue}} {{#isAdditionalPropertiesTrue}} - protected {{classname}}() - { - this.AdditionalProperties = new Dictionary(); - } + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); {{/isAdditionalPropertiesTrue}} - {{/hasOnlyReadOnly}} - {{/hasRequired}} - /// - /// Initializes a new instance of the class. - /// - {{#readWriteVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. - {{/readWriteVars}} - {{#hasOnlyReadOnly}} - [JsonConstructorAttribute] - {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} - { - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{#required}} - {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) - { - throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); - } - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) - { - throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); - } - this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{/required}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{^required}} - {{#defaultValue}} - {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // use default value if no "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" provided - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} ?? {{#isString}}@{{/isString}}{{{defaultValue}}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{/defaultValue}} - {{^defaultValue}} - {{^conditionalSerialization}} - this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - {{/conditionalSerialization}} - {{#conditionalSerialization}} - this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; - if (this.{{name}} != null) - { - this._flag{{name}} = true; - } - {{/conditionalSerialization}} - {{/defaultValue}} - {{/required}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - this.AdditionalProperties = new Dictionary(); - {{/isAdditionalPropertiesTrue}} - } + sb.Append("}\n"); + return sb.ToString(); + } - {{#vars}} - {{^isInherited}} - {{^isEnum}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /// {{.}} - {{/example}} - {{^conditionalSerialization}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#isDate}} - {{^supportsDateOnly}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/supportsDateOnly}} - {{/isDate}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public {{#parent}}{{^isArray}}{{^isMap}}override {{/isMap}}{{/isArray}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson(JsonSerializerOptions options) + { + return JsonSerializer.Serialize(this, options); + } + {{#equatable}} - {{#isReadOnly}} - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{#isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}} {{name}} { get; private set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + return this.Equals(input as {{classname}}); + {{/useCompareNetObjects}} + } - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() + /// + /// Returns true if {{classname}} instances are equal + /// + /// Instance of {{classname}} to be compared + /// Boolean + public bool Equals({{classname}} input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + if (input == null) { return false; } - {{/isReadOnly}} - {{^isReadOnly}} - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}} {{name}} - { - get{ return _{{name}};} - set - { - _{{name}} = value; - _flag{{name}} = true; - } - } - private {{{dataType}}} _{{name}}; - private bool _flag{{name}}; - - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return _flag{{name}}; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{/isEnum}} - {{/isInherited}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} + ( + this.{{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}} + (this.{{name}} != null && + this.{{name}}.Equals(input.{{name}})) + {{/vendorExtensions.x-is-value-type}} + {{#vendorExtensions.x-is-value-type}} + this.{{name}}.Equals(input.{{name}}) + {{/vendorExtensions.x-is-value-type}} + ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} + ( + this.{{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}}this.{{name}} != null && + input.{{name}} != null && + {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} + {{#isAdditionalPropertiesTrue}} + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + {{/isAdditionalPropertiesTrue}} + {{/useCompareNetObjects}} + } - {{/isAdditionalPropertiesTrue}} - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap { - StringBuilder sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); {{#parent}} - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + int hashCode = base.GetHashCode(); + {{/parent}} + {{^parent}} + int hashCode = 41; {{/parent}} {{#vars}} - sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); - {{/vars}} - {{#isAdditionalPropertiesTrue}} - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - {{/isAdditionalPropertiesTrue}} - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public {{#parent}}{{^isArray}}{{^isMap}}override {{/isMap}}{{/isArray}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - {{#equatable}} - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - return this.Equals(input as {{classname}}); - {{/useCompareNetObjects}} - } - - /// - /// Returns true if {{classname}} instances are equal - /// - /// Instance of {{classname}} to be compared - /// Boolean - public bool Equals({{classname}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - if (input == null) + {{^vendorExtensions.x-is-value-type}} + if (this.{{name}} != null) { - return false; + hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); } - return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} - ( - this.{{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}} - (this.{{name}} != null && - this.{{name}}.Equals(input.{{name}})) - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - this.{{name}}.Equals(input.{{name}}) - {{/vendorExtensions.x-is-value-type}} - ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} - ( - this.{{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}}this.{{name}} != null && - input.{{name}} != null && - {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) - ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} - {{#isAdditionalPropertiesTrue}} - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - {{/isAdditionalPropertiesTrue}} - {{/useCompareNetObjects}} - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap + {{/vendorExtensions.x-is-value-type}} + {{#vendorExtensions.x-is-value-type}} + hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); + {{/vendorExtensions.x-is-value-type}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + if (this.AdditionalProperties != null) { - {{#parent}} - int hashCode = base.GetHashCode(); - {{/parent}} - {{^parent}} - int hashCode = 41; - {{/parent}} - {{#vars}} - {{^vendorExtensions.x-is-value-type}} - if (this.{{name}} != null) - { - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - } - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - {{/vendorExtensions.x-is-value-type}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - {{/isAdditionalPropertiesTrue}} - return hashCode; + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); } + {{/isAdditionalPropertiesTrue}} + return hashCode; } - {{/equatable}} + } + {{/equatable}} {{#validatable}} {{>validatable}} {{/validatable}} - } +} \ No newline at end of file diff --git a/generation/templates/libraries/unityWebRequest/model_test.mustache b/generation/templates/modelGeneric_test.mustache similarity index 64% rename from generation/templates/libraries/unityWebRequest/model_test.mustache rename to generation/templates/modelGeneric_test.mustache index 40462328..694703c6 100644 --- a/generation/templates/libraries/unityWebRequest/model_test.mustache +++ b/generation/templates/modelGeneric_test.mustache @@ -1,20 +1,5 @@ -{{>partial_header}} - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.{{modelPackage}}; -using {{packageName}}.{{clientPackage}}; -using System.Reflection; -using Newtonsoft.Json; -using NUnit.Framework; - {{#models}} {{#model}} -namespace {{packageName}}.Test.Model -{ /// /// Class for testing {{classname}} /// @@ -38,27 +23,47 @@ namespace {{packageName}}.Test.Model // Cleanup when everything is done. } + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} /// /// Test an instance of {{classname}} /// - [Test] + [Fact] public void {{classname}}InstanceTest() { // TODO uncomment below to test "IsType" {{classname}} //Assert.IsType<{{classname}}>(instance); } + {{#discriminator}} + {{#children}} + + /// + /// Test deserialize a {{classname}} from type {{parent}} + /// + [Fact] + public void {{classname}}DeserializeFrom{{parent}}Test() + { + // TODO uncomment below to test deserialize a {{classname}} from type {{parent}} + //Assert.IsType<{{parent}}>(JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson())); + } + + {{/children}} + {{/discriminator}} {{#vars}} + + /// /// Test the property '{{name}}' /// - [Test] + [Fact] public void {{name}}Test() { // TODO unit test for the property '{{name}}' } {{/vars}} + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} } -} {{/model}} {{/models}} diff --git a/generation/templates/modelInnerEnum.mustache b/generation/templates/modelInnerEnum.mustache index 462ded84..5bf28b4d 100644 --- a/generation/templates/modelInnerEnum.mustache +++ b/generation/templates/modelInnerEnum.mustache @@ -1,99 +1,56 @@ - {{^isContainer}} - /// - /// {{description}}{{^description}}Defines {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{#isString}} - {{^useGenericHost}} - [JsonConverter(typeof(StringEnumConverter))] - {{/useGenericHost}} - {{/isString}} - {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} + {{^isContainer}} + /// + /// {{description}}{{^description}}Defines {{{name}}}{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + [JsonConverter(typeof({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter))] + {{>visibility}} class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + { + private string _value; + + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + internal {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}() { - {{#allowableValues}} - {{#enumVars}} - /// - /// Enum {{name}} for value: {{value}} - /// - {{^useGenericHost}} - {{#isString}} - [EnumMember(Value = "{{{value}}}")] - {{/isString}} - {{/useGenericHost}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}}{{^vendorExtensions.x-zero-based-enum}} = {{-index}}{{/vendorExtensions.x-zero-based-enum}}{{/isString}}{{^-last}},{{/-last}} - {{^-last}} - - {{/-last}} - {{/enumVars}} - {{/allowableValues}} + _value = "{{value}}"; } - {{#useGenericHost}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} - /// - /// Returns a - /// - /// - /// - /// - public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromString(string value) + public {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}(string value) { - {{#allowableValues}} - {{#enumVars}} - if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) - return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; - {{/enumVars}} - {{/allowableValues}} - throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'"); } + {{#allowableValues}} + {{#enumVars}} /// - /// Returns a + /// Enum {{name}} for value: {{value}} /// - /// - /// - public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromStringOrDefault(string value) - { - {{#allowableValues}} - {{#enumVars}} - if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) - return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{name}} { get; } = new("{{value}}"); - {{/enumVars}} - {{/allowableValues}} - return null; - } + {{^-last}} - /// - /// Converts the to the json value - /// - /// - /// - {{#isString}} - /// - {{/isString}} - public static {{>EnumValueDataType}}{{#lambda.first}}{{#nrt}}{{#isString}}{{#isNullable}}{{nrt?}} {{^nrt}}{{#vendorExtensions.x-is-value-type}}? {{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}}{{/isString}}{{/nrt}}{{/lambda.first}} {{datatypeWithEnum}}ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#isString}}{{>NullConditionalProperty}}{{/isString}} value) - { - {{^isString}} - return ({{>EnumValueDataType}}) value; - {{/isString}} - {{#isString}} - {{#isNullable}} - if (value == null) - return null; + {{/-last}} + {{/enumVars}} + {{/allowableValues}} - {{/isNullable}} - {{#allowableValues}} - {{#enumVars}} - if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}) - return {{^isNumeric}}"{{/isNumeric}}{{{value}}}{{^isNumeric}}"{{/isNumeric}}; + public override string ToString() => _value; + } - {{/enumVars}} - {{/allowableValues}} - throw new NotImplementedException($"Value could not be handled: '{value}'"); - {{/isString}} - } - {{/useGenericHost}} - {{/isContainer}} \ No newline at end of file + 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; + + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); + + public override bool CanConvert(Type typeToConvert) => + typeToConvert == typeof({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}); + } +{{/isContainer}} \ No newline at end of file diff --git a/generation/templates/modelOneOf.mustache b/generation/templates/modelOneOf.mustache index ab42e4ee..826a46e7 100644 --- a/generation/templates/modelOneOf.mustache +++ b/generation/templates/modelOneOf.mustache @@ -1,320 +1,381 @@ {{#model}} +/// +/// {{description}}{{^description}}{{classname}}{{/description}} +/// +{{#vendorExtensions.x-cls-compliant}} +[CLSCompliant({{{.}}})] +{{/vendorExtensions.x-cls-compliant}} +{{#vendorExtensions.x-com-visible}} +[ComVisible({{{.}}})] +{{/vendorExtensions.x-com-visible}} +[JsonConverter(typeof({{classname}}JsonConverter))] +//[DataContract(Name = "{{{name}}}")] +{{>visibility}} partial class {{classname}} : {{#lambda.joinWithComma}}AbstractOpenAPISchema {{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} +{ +{{#composedSchemas.allOf}} + {{#allVars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} +{{>modelInnerEnum}} + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{#isEnum}} + {{^complexType}} +{{>modelInnerEnum}} + {{/complexType}} + {{/isEnum}} + {{#isEnum}} + + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + {{#example}} + /// + /// {{.}} + /// + {{/example}} + [JsonPropertyName("{{baseName}}")]{{#required}} + [JsonRequired]{{/required}} + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; }{{#required}} = new(); + + {{/required}} + {{/isEnum}} + {{/allVars}} + + {{#allVars}} + {{^isInherited}} + {{^isEnum}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /// + /// {{.}} + /// + {{/example}} + [JsonPropertyName("{{baseName}}")]{{#required}} + [JsonRequired]{{/required}} + {{#isDate}} + [JsonConverter(typeof(DateJsonConverter))] + {{/isDate}} + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{dataType}}} {{name}} { get; set; } + + {{/isEnum}} + {{/isInherited}} + {{/allVars}} +{{/composedSchemas.allOf}} + {{#isAdditionalPropertiesTrue}} + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + {{/isAdditionalPropertiesTrue}} + + {{#isNullable}} /// - /// {{description}}{{^description}}{{classname}}{{/description}} + /// Initializes a new instance of the class. /// - {{#vendorExtensions.x-cls-compliant}} - [CLSCompliant({{{.}}})] - {{/vendorExtensions.x-cls-compliant}} - {{#vendorExtensions.x-com-visible}} - [ComVisible({{{.}}})] - {{/vendorExtensions.x-com-visible}} - [JsonConverter(typeof({{classname}}JsonConverter))] - [DataContract(Name = "{{{name}}}")] - {{>visibility}} partial class {{classname}} : {{#lambda.joinWithComma}}AbstractOpenAPISchema {{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} + public {{classname}}() { - {{#isNullable}} - /// - /// Initializes a new instance of the class. - /// - public {{classname}}() - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - } + this.IsNullable = true; + this.SchemaType = "oneOf"; + } - {{/isNullable}} - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{^isNull}} - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of {{dataType}}. - public {{classname}}({{{dataType}}} actualInstance) - { - 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}}; - } + {{/isNullable}} + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^isNull}} + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of {{dataType}}. + public {{classname}}({{{dataType}}} actualInstance) + { + 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}}; + } - {{/isNull}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} + {{/isNull}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} - private Object _actualInstance; + private Object _actualInstance; - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get { - get + return _actualInstance; + } + set + { + {{#composedSchemas.oneOf}} + {{^-first}}else {{/-first}}if (value.GetType() == typeof({{{dataType}}})) { - return _actualInstance; + this._actualInstance = value; } - set + {{/composedSchemas.oneOf}} + else { - {{#oneOf}} - {{^-first}}else {{/-first}}if (value.GetType() == typeof({{{.}}}) || value is {{{.}}}) - { - this._actualInstance = value; - } - {{/oneOf}} - else - { - throw new ArgumentException("Invalid instance found. Must be the following types:{{#oneOf}} {{{.}}}{{^-last}},{{/-last}}{{/oneOf}}"); - } + throw new ArgumentException("Invalid instance found. Must be the following types:{{#composedSchemas.oneOf}} {{{dataType}}}{{^-last}},{{/-last}}{{/composedSchemas.oneOf}}"); } } - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{^isNull}} - - /// - /// Get the actual instance of `{{dataType}}`. If the actual instance is not `{{dataType}}`, - /// the InvalidClassException will be thrown - /// - /// An instance of {{dataType}} - public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}() - { - return ({{{dataType}}})this.ActualInstance; - } - {{/isNull}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} + } + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^isNull}} - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } + /// + /// Get the actual instance of `{{dataType}}`. If the actual instance is not `{{dataType}}`, + /// the InvalidClassException will be thrown + /// + /// An instance of {{dataType}} + public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}() + { + return ({{{dataType}}})this.ActualInstance; + } + {{/isNull}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, {{classname}}.SerializerSettings); - } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class {{classname}} {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - /// - /// Converts the JSON string into an instance of {{classname}} - /// - /// JSON string - /// An instance of {{classname}} - public static {{classname}} FromJson(string jsonString) - { - {{classname}} new{{classname}} = null; +{{#composedSchemas.allOf}} + {{#allVars}} + sb.Append(" {{name}}: ").Append(this.{{name}}).Append("\n"); + {{/allVars}} +{{/composedSchemas.allOf}} + sb.Append("}\n"); + return sb.ToString(); + } - if (string.IsNullOrEmpty(jsonString)) - { - return new{{classname}}; - } - {{#useOneOfDiscriminatorLookup}} - {{#discriminator}} + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonSerializer.Serialize(this.ActualInstance, {{classname}}.SerializerSettings); + } - try - { - var discriminatorObj = JObject.Parse(jsonString)["{{{propertyBaseName}}}"]; - string discriminatorValue = discriminatorObj == null ?string.Empty :discriminatorObj.ToString(); - switch (discriminatorValue) - { - {{#mappedModels}} - case "{{{mappingName}}}": - new{{classname}} = new {{classname}}(JsonConvert.DeserializeObject<{{{modelName}}}>(jsonString, {{classname}}.AdditionalPropertiesSerializerSettings)); - return new{{classname}}; - {{/mappedModels}} - default: - System.Diagnostics.Debug.WriteLine(string.Format("Failed to lookup discriminator value `{0}` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", discriminatorValue)); - break; - } - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine(string.Format("Failed to parse the json data : `{0}` {1}", jsonString, ex.ToString())); - } + {{#equatable}} + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + return this.Equals(input as {{classname}}); + {{/useCompareNetObjects}} + } + + /// + /// Returns true if {{classname}} instances are equal + /// + /// Instance of {{classname}} to be compared + /// Boolean + public bool Equals({{classname}} input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + if (input == null) + return false; + + return this.ActualInstance.Equals(input.ActualInstance); + {{/useCompareNetObjects}} + } - {{/discriminator}} - {{/useOneOfDiscriminatorLookup}} - int match = 0; - List matchedTypes = new List(); - {{#oneOf}} + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + {{/equatable}} + {{#validatable}} - try + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + {{/validatable}} +} + +/// +/// Custom JSON converter for {{classname}} +/// +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) + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = { - // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize - if (typeof({{{.}}}).GetProperty("AdditionalProperties") == null) - { - new{{classname}} = new {{classname}}(JsonConvert.DeserializeObject<{{{.}}}>(jsonString, {{classname}}.SerializerSettings)); - } - else + static typeInfo => { - new{{classname}} = new {{classname}}(JsonConvert.DeserializeObject<{{{.}}}>(jsonString, {{classname}}.AdditionalPropertiesSerializerSettings)); - } - matchedTypes.Add("{{{.}}}"); - match++; - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into {{{.}}}: {1}", jsonString, exception.ToString())); - } - {{/oneOf}} + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; - if (match == 0) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); - } - else if (match > 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); + 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; + } + } + } } - - // deserialization is considered successful at this point if no exception has been thrown. - return new{{classname}}; } + }; - {{#equatable}} - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - return this.Equals(input as {{classname}}); - {{/useCompareNetObjects}} - } + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// Serializer options + public override void Write(Utf8JsonWriter writer, {{classname}} value, JsonSerializerOptions options) + { + writer.WriteStartObject(); - /// - /// Returns true if {{classname}} instances are equal - /// - /// Instance of {{classname}} to be compared - /// Boolean - public bool Equals({{classname}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - {{/useCompareNetObjects}} - } +{{#composedSchemas.allOf}} + {{#allVars}} + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, value.{{name}}, options); + {{/allVars}} +{{/composedSchemas.allOf}} - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() + var node = JsonSerializer.SerializeToNode(value.ActualInstance, options); + foreach (var prop in node?.AsObject() ?? []) { - unchecked // Overflow is fine, just wrap + if (prop.Value != null) { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; + writer.WritePropertyName(prop.Key); + prop.Value.WriteTo(writer, options); } } - {{/equatable}} - {{#validatable}} - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - {{/validatable}} + + writer.WriteEndObject(); } /// - /// Custom JSON converter for {{classname}} + /// To convert a JSON string into an object /// - public class {{classname}}JsonConverter : JsonConverter + /// JSON reader + /// Object type to convert + /// Serializer options + /// The object converted from the JSON string + public override {{classname}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + if (reader.TokenType == JsonTokenType.Null) { - writer.WriteRawValue((string)(typeof({{classname}}).GetMethod("ToJson").Invoke(value, null))); + return null; } - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + var jsonDoc = JsonDocument.ParseValue(ref reader); + {{classname}} new{{classname}} = null; + + int match = 0; + var matchedTypes = new List(); + {{#composedSchemas.oneOf}} + + try { - switch(reader.TokenType) - { - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{#isInteger}} - case JsonToken.Integer: - return new {{classname}}(Convert.ToInt32(reader.Value)); - {{/isInteger}} - {{#isNumber}} - case JsonToken.Float: - return new {{classname}}(Convert.ToDecimal(reader.Value)); - {{/isNumber}} - {{#isString}} - case JsonToken.String: - return new {{classname}}(Convert.ToString(reader.Value)); - {{/isString}} - {{#isBoolean}} - case JsonToken.Boolean: - return new {{classname}}(Convert.ToBoolean(reader.Value)); - {{/isBoolean}} - {{#isDate}} - case JsonToken.Date: - return new {{classname}}(Convert.ToDateTime(reader.Value)); - {{/isDate}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - case JsonToken.StartObject: - return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); - case JsonToken.StartArray: - return {{classname}}.FromJson(JArray.Load(reader).ToString(Formatting.None)); - default: - return null; - } + new{{classname}} = new {{classname}}(JsonSerializer.Deserialize<{{{dataType}}}>(jsonDoc, DeserializingOptions)); + + matchedTypes.Add("{{{dataType}}}"); + match++; + } + 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())); + } + {{/composedSchemas.oneOf}} + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonDoc + "` cannot be deserialized into any schema defined."); } - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) + if (match > 1) { - return false; + 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}}; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return typeof({{classname}}).IsAssignableFrom(objectType); } -{{/model}} +}{{/model}} \ No newline at end of file diff --git a/generation/templates/modelOneOf_test.mustache b/generation/templates/modelOneOf_test.mustache new file mode 100644 index 00000000..1d80c2ef --- /dev/null +++ b/generation/templates/modelOneOf_test.mustache @@ -0,0 +1,96 @@ +{{#models}} +{{#model}} + /// + /// Class for testing {{classname}} + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class {{classname}}Tests : IDisposable + { + // TODO uncomment below to declare an instance variable for {{classname}} + //private {{classname}} instance; + + public {{classname}}Tests() + { + // TODO uncomment below to create an instance of {{classname}} + //instance = new {{classname}}(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + /// + /// Test an instance of {{classname}} + /// + [Fact] + public void {{classname}}InstanceTest() + { + // TODO uncomment below to test "IsType" {{classname}} + //Assert.IsType<{{classname}}>(instance); + } + + {{#discriminator}} + {{#children}} + + /// + /// Test deserialize a {{classname}} from type {{parent}} + /// + [Fact] + public void {{classname}}DeserializeFrom{{parent}}Test() + { + // TODO uncomment below to test deserialize a {{classname}} from type {{parent}} + //Assert.IsType<{{parent}}>(JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson())); + } + + {{/children}} + {{/discriminator}} + {{#composedSchemas.allOf}} + {{#allVars}} + + + /// + /// Test the property '{{name}}' + /// + [Fact] + public void {{name}}Test() + { + // TODO unit test for the property '{{name}}' + } + {{/allVars}} + {{/composedSchemas.allOf}} + + + + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^isNull}} + /// + /// Initializes a new instance of the class + /// with the class + /// + [Fact] + public void ActualInstanceIs{{dataType}}Test() + { + var testModel = new {{classname}}(new {{{dataType}}}()); + Assert.IsType<{{{dataType}}}>(testModel.ActualInstance); + Assert.IsType<{{{dataType}}}>(testModel.Get{{{dataType}}}()); + } + + {{/isNull}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + + + + + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } +{{/model}} +{{/models}} \ No newline at end of file diff --git a/generation/templates/model_test.mustache b/generation/templates/model_test.mustache index 1feaeb9d..800cd97b 100644 --- a/generation/templates/model_test.mustache +++ b/generation/templates/model_test.mustache @@ -1,87 +1,20 @@ {{>partial_header}} using Xunit; - using System; using System.Linq; using System.IO; using System.Collections.Generic; +using System.Text.Json; using {{packageName}}.{{modelPackage}}; using {{packageName}}.{{clientPackage}}; using System.Reflection; -{{^useGenericHost}} -using Newtonsoft.Json; -{{/useGenericHost}} +namespace {{packageName}}.Test.Model +{ {{#models}} {{#model}} -namespace {{packageName}}.Test.Model -{ - /// - /// Class for testing {{classname}} - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class {{classname}}Tests : IDisposable - { - // TODO uncomment below to declare an instance variable for {{classname}} - //private {{classname}} instance; - - public {{classname}}Tests() - { - // TODO uncomment below to create an instance of {{classname}} - //instance = new {{classname}}(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - {{#lambda.trimTrailingWithNewLine}} - {{#lambda.trimLineBreaks}} - /// - /// Test an instance of {{classname}} - /// - [Fact] - public void {{classname}}InstanceTest() - { - // TODO uncomment below to test "IsType" {{classname}} - //Assert.IsType<{{classname}}>(instance); - } - - {{#discriminator}} - {{#children}} - - /// - /// Test deserialize a {{classname}} from type {{parent}} - /// - [Fact] - public void {{classname}}DeserializeFrom{{parent}}Test() - { - // TODO uncomment below to test deserialize a {{classname}} from type {{parent}} - //Assert.IsType<{{parent}}>(JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson())); - } - - {{/children}} - {{/discriminator}} - {{#vars}} - - - /// - /// Test the property '{{name}}' - /// - [Fact] - public void {{name}}Test() - { - // TODO unit test for the property '{{name}}' - } - {{/vars}} - {{/lambda.trimLineBreaks}} - {{/lambda.trimTrailingWithNewLine}} - } -} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf_test}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf_test}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric_test}}{{/anyOf}}{{/oneOf}}{{/isEnum}} {{/model}} {{/models}} +} diff --git a/generation/templates/netcore_project.additions.mustache b/generation/templates/netcore_project.additions.mustache deleted file mode 100644 index 8c6f3ad5..00000000 --- a/generation/templates/netcore_project.additions.mustache +++ /dev/null @@ -1 +0,0 @@ -{{! if needed users can add this file to their templates folder to append to the csproj }} \ No newline at end of file diff --git a/generation/templates/netcore_project.mustache b/generation/templates/netcore_project.mustache deleted file mode 100644 index 7dd6228f..00000000 --- a/generation/templates/netcore_project.mustache +++ /dev/null @@ -1,84 +0,0 @@ - - - {{#useGenericHost}} - true {{/useGenericHost}}{{^useGenericHost}} - false{{/useGenericHost}} - {{targetFramework}} - {{packageName}} - {{packageName}} - Library - {{packageAuthors}} - {{packageCompany}} - {{packageTitle}} - {{packageDescription}} - {{packageCopyright}} - {{packageName}} - {{packageVersion}} - bin\$(Configuration)\$(TargetFramework)\{{packageName}}.xml{{#licenseId}} - {{.}}{{/licenseId}} - https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}.git - git{{#releaseNote}} - {{.}}{{/releaseNote}}{{#packageTags}} - {{{.}}}{{/packageTags}}{{#nrt}} - {{#useGenericHost}}enable{{/useGenericHost}}{{^useGenericHost}}annotations{{/useGenericHost}}{{/nrt}} - false - - - - {{#useCompareNetObjects}} - - {{/useCompareNetObjects}} - {{^useGenericHost}} - - - {{/useGenericHost}} - {{#useRestSharp}} - - {{/useRestSharp}} - {{#useGenericHost}} - - - {{#supportsRetry}} - - {{/supportsRetry}} - {{#net80OrLater}} - - {{/net80OrLater}} - {{^net60OrLater}} - - {{#net47OrLater}} - - {{/net47OrLater}} - {{/net60OrLater}} - {{/useGenericHost}} - {{^useGenericHost}} - {{#supportsRetry}} - - {{/supportsRetry}} - {{/useGenericHost}} - {{#validatable}} - {{^net60OrLater}} - - {{/net60OrLater}} - {{/validatable}} - - -{{^useGenericHost}} - - {{^net60OrLater}} - - {{/net60OrLater}} - {{#net48}} - - {{/net48}} - - - {{^net60OrLater}} - - {{/net60OrLater}} - {{#net48}} - - {{/net48}} - -{{/useGenericHost}} -{{>netcore_project.additions}} diff --git a/generation/templates/netcore_testproject.additions.mustache b/generation/templates/netcore_testproject.additions.mustache deleted file mode 100644 index 8c6f3ad5..00000000 --- a/generation/templates/netcore_testproject.additions.mustache +++ /dev/null @@ -1 +0,0 @@ -{{! if needed users can add this file to their templates folder to append to the csproj }} \ No newline at end of file diff --git a/generation/templates/netcore_testproject.mustache b/generation/templates/netcore_testproject.mustache deleted file mode 100644 index 90d11eb8..00000000 --- a/generation/templates/netcore_testproject.mustache +++ /dev/null @@ -1,20 +0,0 @@ - - - - {{testPackageName}} - {{testPackageName}} - {{testTargetFramework}} - false{{#nrt}} - {{#useGenericHost}}enable{{/useGenericHost}}{{^useGenericHost}}annotations{{/useGenericHost}}{{/nrt}} - - - - - - - - - - - -{{>netcore_testproject.additions}} diff --git a/generation/templates/nuspec.mustache b/generation/templates/nuspec.mustache deleted file mode 100644 index 18fe4aac..00000000 --- a/generation/templates/nuspec.mustache +++ /dev/null @@ -1,57 +0,0 @@ - - - - - $id$ - {{packageTitle}} - - - $version$ - - - $author$ - - - $author$ - false - false - - - {{packageDescription}} - {{#termsOfService}} - {{.}} - {{/termsOfService}} - {{#licenseUrl}} - {{.}} - {{/licenseUrl}} - - - - - - {{#useRestSharp}} - - {{/useRestSharp}} - {{#useCompareNetObjects}} - - {{/useCompareNetObjects}} - - {{#validatable}} - - {{/validatable}} - {{#supportsRetry}} - - {{/supportsRetry}} - - - - - - - - - - - diff --git a/generation/templates/openapi.mustache b/generation/templates/openapi.mustache deleted file mode 100644 index 34fbb53f..00000000 --- a/generation/templates/openapi.mustache +++ /dev/null @@ -1 +0,0 @@ -{{{openapi-yaml}}} diff --git a/generation/templates/partial_header.mustache b/generation/templates/partial_header.mustache index 1562058a..7257ee65 100644 --- a/generation/templates/partial_header.mustache +++ b/generation/templates/partial_header.mustache @@ -3,10 +3,6 @@ * {{{.}}} * {{/appName}} - {{#appDescription}} - * {{{.}}} - * - {{/appDescription}} {{#version}} * The version of the OpenAPI document: {{{.}}} {{/version}} diff --git a/generation/templates/validatable.mustache b/generation/templates/validatable.mustache index a79db1a6..b06b98fc 100644 --- a/generation/templates/validatable.mustache +++ b/generation/templates/validatable.mustache @@ -4,7 +4,7 @@ /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -14,7 +14,7 @@ /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { {{/discriminator}} {{^discriminator}} @@ -24,7 +24,7 @@ /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { return this.BaseValidate(validationContext); } @@ -34,7 +34,7 @@ /// /// Validation context /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { {{/parent}} {{^parent}} @@ -43,7 +43,7 @@ /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { {{/parent}} {{/discriminator}} @@ -64,7 +64,7 @@ // {{{name}}} ({{{dataType}}}) maxLength if (this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}}) { - yield return new ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); } {{/maxLength}} @@ -72,7 +72,7 @@ // {{{name}}} ({{{dataType}}}) minLength if (this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}}) { - yield return new ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); } {{/minLength}} @@ -80,7 +80,7 @@ // {{{name}}} ({{{dataType}}}) maximum if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} > ({{{dataType}}}){{maximum}}) { - yield return new ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" }); } {{/maximum}} @@ -88,7 +88,7 @@ // {{{name}}} ({{{dataType}}}) minimum if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} < ({{{dataType}}}){{minimum}}) { - yield return new ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" }); } {{/minimum}} diff --git a/generation/templates/visibility.mustache b/generation/templates/visibility.mustache deleted file mode 100644 index a1d1f416..00000000 --- a/generation/templates/visibility.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} \ No newline at end of file diff --git a/openapitools.json b/openapitools.json index f227cf2d..d49bc8ea 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,24 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.7.0" + "version": "7.7.0", + "generators": { + "csharp": { + "generatorName": "csharp", + "output": ".", + "inputSpec": "./generation/swagger.json", + "templateDir": "./generation/templates", + "skipValidateSpec": true, + "packageName": "ShipEngineSDK", + "ignoreFileOverride": "./.openapi-generator-ignore", + "additionalProperties": { + "packageVersion": "2.1.0", + "targetFramework": "netstandard2.0", + "validatable": false, + "sourceFolder": "", + "optionalProjectFile": false + } + } + } } } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..9303a6bc --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1368 @@ +{ + "name": "shipengine-dotnet", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "shipengine-dotnet", + "version": "1.0.0", + "license": "Apache-2.0", + "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.13.4" + } + }, + "node_modules/@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nestjs/axios": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.0.2.tgz", + "integrity": "sha512-Z6GuOUdNQjP7FX+OuV2Ybyamse+/e0BFdTWBX5JxpBDKA+YkdLynDgG6HTF04zy6e9zPa19UX0WA2VDoehwhXQ==", + "dev": true, + "peerDependencies": { + "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0", + "axios": "^1.3.1", + "rxjs": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/@nestjs/common": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.3.0.tgz", + "integrity": "sha512-DGv34UHsZBxCM3H5QGE2XE/+oLJzz5+714JQjBhjD9VccFlQs3LRxo/epso4l7nJIiNlZkPyIUC8WzfU/5RTsQ==", + "dev": true, + "dependencies": { + "iterare": "1.2.1", + "tslib": "2.6.2", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/core": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.3.0.tgz", + "integrity": "sha512-N06P5ncknW/Pm8bj964WvLIZn2gNhHliCBoAO1LeBvNImYkecqKcrmLbY49Fa1rmMfEM3MuBHeDys3edeuYAOA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.2.0", + "tslib": "2.6.2", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.13.4.tgz", + "integrity": "sha512-4JKyrk55ohQK2FcuZbPdNvxdyXD14jjOIvE8hYjJ+E1cHbRbfXQXbYnjTODFE52Gx8eAxz8C9icuhDYDLn7nww==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nestjs/axios": "3.0.2", + "@nestjs/common": "10.3.0", + "@nestjs/core": "10.3.0", + "@nuxtjs/opencollective": "0.3.2", + "axios": "1.6.8", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "10.1.0", + "glob": "7.2.3", + "https-proxy-agent": "7.0.4", + "inquirer": "8.2.6", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.1", + "tslib": "2.6.2" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/openapi_generator" + } + }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/compare-versions": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concurrently": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, + "node_modules/console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "dependencies": { + "easy-table": "1.1.0" + }, + "engines": { + "node": "> 0.10" + } + }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "optionalDependencies": { + "wcwidth": ">=1.0.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", + "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", + "dev": true + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "dev": true, + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..0e76ce8f --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "shipengine-dotnet", + "version": "1.0.0", + "description": "Package primarily used to generate the API and models from OpenApi spec\"", + "main": "index.js", + "directories": { + "doc": "docs" + }, + "scripts": { + "generate": "npx @openapitools/openapi-generator-cli generate" + }, + "author": "Auctane", + "license": "Apache-2.0", + "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.13.4" + } +} diff --git a/shipengine-dotnet.sln b/shipengine-dotnet.sln index eeb10e22..6d716e6b 100644 --- a/shipengine-dotnet.sln +++ b/shipengine-dotnet.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShipEngine", "ShipEngine\ShipEngine.csproj", "{913C6F69-889E-4B38-852C-5DCEC539152A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShipEngineSDK", "ShipEngineSDK\ShipEngineSDK.csproj", "{913C6F69-889E-4B38-852C-5DCEC539152A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShipEngine.Tests", "ShipEngine.Tests\ShipEngine.Tests.csproj", "{A875A01E-ACEA-4488-B90E-CC564A892557}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShipEngineSDK.Test", "ShipEngineSDK.Test\ShipEngineSDK.Test.csproj", "{A875A01E-ACEA-4488-B90E-CC564A892557}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution